---
description: Details about the noise generation and how to use it.
---

# Noise Generation

### Temperature & Humidity System

Noise can output contain any number of parameters the developer need.&#x20;

By default The current system register 3 parameters generated from the noise in the Mesh Vertex Colour  :&#x20;

* Height (Red Channel)
* Temperature (Green Channel)
* Humidity (Blue Channel)

to be used by the material to color the grass, put mountain and snow texture, or any creative way you can find. [(Refer to Terrain Material)](https://qanga.gitbook.io/worldscape-plugin/getting-started/terrain-material) (If you ever want to change this, you'll have to edit the plugin source code)

![](https://76368384-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Mfo4Lr0jJ_GjLKGCOfM%2F-Mfp8bKaZVAnFWRJu72N%2F-Mfp8ezF0eVdJqNezRho%2Fezgif.com-gif-maker%20\(2\).gif?alt=media\&token=d34a8ab8-539a-4992-bba4-8977dc855613)

### Noise Seed

![Change value in Seed parameter](https://76368384-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Mfo4Lr0jJ_GjLKGCOfM%2F-MfoxYMmiL6UkrxFZNcv%2F-MfoynK_6iXzNB7NA_TV%2Fezgif.com-gif-maker%20\(1\).gif?alt=media\&token=9eb13690-395a-4f88-8094-0992a9d76c41)

![](https://76368384-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Mfo4Lr0jJ_GjLKGCOfM%2F-MfoQk8fN4TuLpgLH5bK%2F-MfoQzBQ50yEAavIkGEz%2FjjQhiamxsR.jpg?alt=media\&token=8b683db5-12d7-40df-ace8-ac13388ec431)

## Editing the Noise in C++

WorldScape plugin is aimed to have the noise edited in C++.\
You have the possibility to modify the noise yourself and integrate your own Noise and parameters.   There is a barebone example of the noise with comment to guide you.

### FNoiseData

#### The noise Data are stored in a FNoiseData Struct. you can edit it to fit your need, by default, WorldScape will use and need the folowing parameters :

* _double_ **HeightNormalize** - The height normalized from 0 to 1, also registered in the Red channel of Vertex Color.
* _double_ **Height** - The height in Unreal Unit that will displace the terrain either from the center of the planet or up depending on the generation type.
* _float_ **Temperature** - Registered in the Green channel of Vertex color, also used for foliage masking.
* _float_ **Humidity** - Registered in the Blue channel of Vertex colors, also used for foliage masking.
* _float_ **WaterMask** - Used for foliage masking, also set to true for HeightMap Influencer when ocean is higher than terrain.
* _float_ **FoliageMask** - Used for foliage Masking.

![](https://76368384-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Mfo4Lr0jJ_GjLKGCOfM%2F-Mg6lVPc6fDoFJDp8DSj%2F-Mg6mZtHls5Nbd7Uz0yY%2Fdevenv_ZxB4iN7aJX.png?alt=media\&token=8e178945-ac7b-4afa-aa7d-6ade36ce8387)

### Noise Parameter

#### Noise Parameter is a struct used as an interface to influence the noise from the viewport

Noise Parameter is a struct present in the WorldScapeRoot component to allow developer to interact with your noise. You can use it to simply change the scale/intensity of the noise, or allow to have completely different generation rule.

![](https://76368384-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mfo4Lr0jJ_GjLKGCOfM%2Fuploads%2FcNzMmD6NVFapwNScKZB6%2FWorldSettings7.PNG?alt=media\&token=1329a255-8407-4cc3-9b4b-15085bb8ab55)

![](https://76368384-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Mfo4Lr0jJ_GjLKGCOfM%2F-MfoR-VwvMFv-s1ekWHc%2F-MfoS0GW4E-r4omaZW9f%2FAUrgt0Zlqc.png?alt=media\&token=8b244e1a-efd8-49ef-89c7-6c2fa8923154)

### Required Functions

#### WorldScape will use 2 specific function from the WorldScapeNoiseClass :&#x20;

* _FNoiseData_ **GetHeight** - responsible for terrain Noise.
* _FNoiseData_ **GetOceanHeight** - responsible for Ocean Noise. It can be used for ocean, river and lake generation.

Rest of the class can be edited as you see fit, you are free to follow the already existing guideline and biome system or write you own system.

![](https://76368384-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Mfo4Lr0jJ_GjLKGCOfM%2F-Mg6lVPc6fDoFJDp8DSj%2F-Mg6mBftfw1yeoR6Bl7k%2Fdevenv_bVsmIO5V3z.png?alt=media\&token=3514fcb1-7f7c-4602-8247-6fb15db01d8f)
