Jump to content
  • Advertisement
Sign in to follow this  
Unfadable

Broken up water waves

This topic is 4640 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
Advertisement
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
Ah I see. So having differing wind directions and speeds does the trick. I tried it out and works great. Now for the bump-mapping!

Thanks!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!