Cubic interpolation and perlin noise

lost

Newcomer
I am currently working on a perlin noise function and want to use cubic interpolation to get smoother transitions between gradients. Currently, I am almost following Perlin's original method exactly with some modifications to make the result more of a marble texture.

Right now, I am using linear interpolation of the 8 corners of a unit cube starting at (x,y,z). Linear interpolation works fine for this example, but for cubic interpolation will I have to use a 4x4x4 grid of samples (64) to satisfy the same requirments (as cubic interpolation requires 4 inputs)? Or am I way off on what is required for cubic interpolation?

Thanks!
 
Nope, you're right. Cubic interpolation needs four inputs and returns the value for between the second and third input.
 
lost said:
I am currently working on a perlin noise function and want to use cubic interpolation to get smoother transitions between gradients. Currently, I am almost following Perlin's original method exactly with some modifications to make the result more of a marble texture.

Right now, I am using linear interpolation of the 8 corners of a unit cube starting at (x,y,z). Linear interpolation works fine for this example, but for cubic interpolation will I have to use a 4x4x4 grid of samples (64) to satisfy the same requirments (as cubic interpolation requires 4 inputs)? Or am I way off on what is required for cubic interpolation?

Thanks!
It's been a very long time since I worked with Perlin noise, but I think Ken Perlin himself pre-computed gradient functions and stored those locally at the grid points - I guess therefore he would then have been using Hermite (cubic) splines. Mind you, I'm not sure that it saves you anything in terms of calculation cost!

FWIW Perlin recently (?) published some "standards" for Perlin noise implementations but I can't remember where I saw this - it may have even been a patent.
 
Simon F said:
It's been a very long time since I worked with Perlin noise, but I think Ken Perlin himself pre-computed gradient functions and stored those locally at the grid points - I guess therefore he would then have been using Hermite (cubic) splines. Mind you, I'm not sure that it saves you anything in terms of calculation cost!

FWIW Perlin recently (?) published some "standards" for Perlin noise implementations but I can't remember where I saw this - it may have even been a patent.

Yeah, basically, that is what his algorithm does, but the gradient functions are basically taking random values and averaging them. I believe the only reason he stores the data at all is so between renders the frames do not look differently.
 
lost said:
Yeah, basically, that is what his algorithm does, but the gradient functions are basically taking random values and averaging them. I believe the only reason he stores the data at all is so between renders the frames do not look differently.
Of course. You either precompute and save a grid using a standard random number generator, or use a hash function that depends only on the x,y,z grid coordinates. I used the latter in my version.
 
Back
Top