- Home /
Question by
ninjaboynaru · Mar 21, 2014 at 03:19 PM ·
meshperlin noiserandomize
Why larger numbers in perlin noise results in smoother results
I am using Unity MathF.PerlinNoise() function to randomize the height on a mesh that will be used as the terrain.
How come when I increase scale, the terrain is smooth, like rolling hills, and when scale is small it is fractal
function VaryHeight(){
var z : int;
var x : int;
for(x = 0; x <= tilesX; x++){
for(z = 0; z<= tilesZ; z++){
//vertices[] is an array of vertices. The scale is set in the incpector
verticies[z * vertsX + x].y = Mathf.PerlinNoise(x/scale,0);
}
}
}
Comment
Best Answer
Answer by Jasper-Flick · Mar 21, 2014 at 03:54 PM
Because you are dividing x by "scale", a larger scale results in a smaller change of x, producing a smoother transition. You'd typically use a scale variable as a multiplier instead.
Your answer
Follow this Question
Related Questions
Connecting several planes 0 Answers
Procedurally generated terrain has lines. 0 Answers
Game Object's Vector3 changing threw script without reason 1 Answer
Mesh creation during runtime 0 Answers
Mesh Mountains 1 Answer