Trying to Simulate water.....HELP!!!
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
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
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!!!
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.
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]
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]
www.flashbang.se | www.thegeekstate.com | nehe.gamedev.net | glAux fix for lesson 6 | [twitter]thegeekstate[/twitter]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement