Skip to content

Add More Noise Filter

In this part, I would like to add another noise filter so this project will have multiple filters to use.

The filter we use called ridge noise filter. The function of this filter to add the mountainous effect in the continent. The filter has a similar definition with the picture below.

This filter takes the absolute value from the noise. Similar to above equation we use 1-abs(noise value). This equation will make our value always has a positive value. The code will be shown below

float v =1-Mathf.Abs(noise.Evaluate(point * frequency +;
v *= v;
v *= weight;
weight = Mathf.Clamp01(v * settings.weightMultiplier);

noiseValue += v * amplitude;
frequency *= settings.roughness;
amplitude *= settings.persistance;

The result will be like below video

(Visited 93 times, 1 visits today)

Be First to Comment

Leave a Reply

%d bloggers like this: