Broken up water waves
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.
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.
Nature Wizard Ocean waves tut
Quite an interesting site. It needs more contributions though. Check out the other water tutorials on there.
hth
F451
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
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement