Advertisement

Trying to Simulate water.....HELP!!!

Started by April 27, 2005 10:27 PM
4 comments, last by kwante 19 years, 7 months ago
hi everyone!! Im trying to draw a grid of length X Width (LxW). I want to be able to randomly generate height points on each line in this (LxW) grid. So i guess this will be a three dimensional project <x,y,z> or <l,w,h>. My goal is to generate some type of random motion that once blended will appear to be a moving surface, i.e. "water" If anyone can make sense of my madness and give me a detailed insight on what to do, i would greatly appreticate it. [Edited by - kwante on April 28, 2005 10:27:43 AM]
I'm not sure if I got your question well, but try this. First create a flat plane in 2D space of size W times L. Insert as many vertices as you want -- the more vertices the more detail. Of each vertex set the height to zero. That is step one; this is a regular mesh grid and you should be ok setting it up.

If you have this you can begin the second part: animating it. You could start by computing the sine over time and the positions of each vertex, giving a simple wave effect. Note that the animation works only the height.

If you have any problems or more specific questions feel free to post.

Greetz,

Illco
Advertisement
Ok i drew a diagram so that you can visulize my ideas of this water simulation.

http://members.gamedev.net/kwante/waterdiagram.jpg

If anyone has any suggestions, i am more than open to you ideas. Thanks!!!
I think that Illco's idea should work quite well, though I havent tried making water in any way myself yet :). One thing that might add something to the effect is moving the texture (changing the texture coordinates).

Perhaps using a partially random wave-height together with the sine function could help create a more realistic feel too.
Yes, a long slowmoving sinewave would do well as simple waves.
Then add some textured moving bumps to the surface that modify the normal a little.
Finaly use PPL lighting and a really nice water shader.

OR you could do like they did in WOW, film the surface of a lake to catch the nice reflections.

the only problem with that method is that from some angles it looks hyper realistic, and from some it looks like a bad texture on a flat plane.
Not to mention the tiling you get from high above.



[Edited by - lc_overlord on April 29, 2005 2:23:34 PM]
Your ideas are really helping me, thanks alot!!

This topic is closed to new replies.

Advertisement