# More Questions on Perlin Noise

This topic is 3329 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Just wondered if anyone knew the answer to these few questions. 1. When passing the decimal parts of the position to the gradient functions, as seen below, why does he subtract 1 from each in turn?
      return lerp(w, lerp(v, lerp(u, grad(p[AA  ], x  , y  , z   ),  // AND ADD
grad(p[BA  ], x-1, y  , z   )), // BLENDED
lerp(u, grad(p[AB  ], x  , y-1, z   ),  // RESULTS
grad(p[BB  ], x-1, y-1, z   ))),// FROM  8
lerp(v, lerp(u, grad(p[AA+1], x  , y  , z-1 ),  // CORNERS
grad(p[BA+1], x-1, y  , z-1 )), // OF CUBE
lerp(u, grad(p[AB+1], x  , y-1, z-1 ),


2. Ive noticed that this will actually produce values from -2 to 2, when returned from the gradient functions, yet the out come of perlin noise is always -1 to 1, this seems to be due to the lerp functions never returning values out of -1 to 1, when used with the fade decimal value, but why is this? is the fade function designed to do this?

1. 1
Rutin
25
2. 2
JoeJ
20
3. 3
4. 4
5. 5

• 9
• 9
• 46
• 41
• 23
• ### Forum Statistics

• Total Topics
631749
• Total Posts
3002051
×