Unity 3d Perlin Noise
My adventure with 3d perlin noise.
Unity 3d perlin noise. For 1d this is a simple multiplication. Published on oct 19 2019 in this video we spawn a block landscape of cubes by spawning a grid and then offsetting the cube height using perlin noise. Once again just as with perlin noise the gradient now has to include the falloff multiplied by the gradient vector. The noise does not contain a completely random value at each point but rather consists of waves whose values gradually increase and decrease across the pattern.
Perlin noise function for unity this is straight implementation of the perlin noise function for unity which is based on perlins siggraph 2002 paper improving noise. I didnt add an option for height for this simple script but if you feel you need it it should be pretty straightforward to add. Increasing the tiling increases the number of hills. As with perlin noise we compute the gradient value by taking the dot product of the gradient vector and the vector from the corner to our sample point.
3d perlin noise is hard to make in unity but not when you combine lower dimensions of noise. Revised and commented script. Access it by clicking on the terraingenerate from perlin noise menu item. Perlin noise is a pseudo random pattern of float values generated across a 2d plane although the technique does generalise to three or more dimensions this is not implemented in unity.
Because we are using different gradients for 3d than for 2d the two noise patterns appear slightly different when viewed along the z axis. This is a similar technique to the way unity. More on procedural generation. Ill go back to working on my game now.
The noise can be used as the basis for texture effects but also for animation generating terrain heightmaps and many other things. There is only one option tiling which affects the tiling of the perlin noise functions.