Sign in to follow this  
ryt

How to make a wavey sheet?

Recommended Posts

I have created a plane in xz, and created a wave in 3D: Points[index].y = (float)(rand()%32768)/32768.0f; So now I have a wavy sheet but its static in time. I would like to change it in time with some random effect so that its perhaps not periodic. How can I do that?

Share this post


Link to post
Share on other sites
Try looking into perlin noise. It is repetitive, but only after a while. 2D perlin noise will give you a static heightmap. Use 3D perlin noise to animate the heightmap (the first two dimensions are the position, and the other one is the time).

If you really want to, you could even use 4D or 5D perlin noise to remove some of the repetitiveness.

The nice thing with perlin noise is that it will generate a nice smooth mesh while animating because it is continuous. You will not have any points appearing out of nowhere, they will grow slowly.

Share this post


Link to post
Share on other sites
I have made some noise but I dont know if its perlin noise?

for(int i = 0; i < height; i++)
{
for(int j = 0; j < width; j++)
{
pNoise[i*width+j] = (float)(rand()%32768) / 32768.0f;
}
}

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this