Sign in to follow this  

Broken up water waves

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, I've gone over a couple of water/wave tutorials. I understand how to form displace the geometry of the mesh with sin waves. What I don't really understand is what breaks the long "strips" of waves up into smaller waves (sorry if thats a little unclear). ex. If my water is flowing towards the x direction, my peaks will extend across the entire mesh along z. I would like this to be broken up some, and a little more varied. Thanks and let me know if this is unclear.

Share this post


Link to post
Share on other sites
I can not answer your question directly, but I can point you to a tutorial and implementation that does exactly what you want and explains how to prevent the effect most straight sin based calcs generate. Perhaps you can gleam something from the writings therein. I've done an implementation of that tutorial and it looks really good. Since the other code in my program is badly written (brute force terrain), I can't really tell how expensive (CPU) the algorithm is and I haven't profiled it (no point when everything is so slow anyway :-). Doesn't seem to be too bad on a smallish mesh - 128x128 in my case.

Quote:

.... If we look at the image above, it doesn't look like a water surface at all but like a concrete surface. There are two things missing:

There should be some sort of alternation along the propagation direction of the wave.
The waves shouldn't be infinitely wide.
If wind blows over a water surface, there are a lot of different waves with different wavelength and all of them are superimposed and generate the final image of the water surface. If the wind becomes stronger (i.e. the wind speed increases), the waves will also change their size (=wavelength)....


Nature Wizard Ocean waves tut

Quite an interesting site. It needs more contributions though. Check out the other water tutorials on there.

hth
F451

Share this post


Link to post
Share on other sites

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

If you intended to correct an error in the post then please contact us.

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