Sign in to follow this  
hogosha

Water and OpenGL

Recommended Posts

hogosha    122
This topic may be misplaced, in which case, feel free to move it. Ok, I am in the process of creating a *nix based 3d Desktop Enviroment. The beginning emphasis being that the wallpaper area is gonna be 3d. It is also going to be able to reflect the weather as it is outside using airport information, but that is at a later date. Right now I am working on water. Since I want something realistic for my enviroment, I am trying to push the limits and still have something that looks good. As of right now I have a grid. It's a grid of x,y, and z coordinates. I may shorten this down to just a z coordinate as if I were doing a heightmap. But right now I am going to need to take in the idea of wind speed and wind direction. As well as wind pulses. Since wind is never a constant, the pulse would represent this. Now I need to know if anyone has attempted my idea. Because with wind direction, along with a sine wave will need a rotation. I'm mainly looking for an example since my enviroment has been coded by me completely other than using the SDL and OpenGL libraries. I would greatly appreciate the help. I hope to release it to the community soon, hopefully before the bloodsucker Micro$oft releases vista. In short, i need examples or something for these ideas: To have a water system that can take in a wind direction, wind point, wind speed and wind pulse and push a realistic wave.

Share this post


Link to post
Share on other sites
PAiNIC    128
Not sure if this is exactly what you're looking for, but I can suggest a couple of techniques for realistic fluid modelling.
The first is Stam's real-time Navier Stokes solver. Sounds complex, but it's really quite simple - about 100 lines of code that are included in the paper. The code is 2D, but easily expanded to 3D.
Here's a link to Jos Stam's website:
http://www.dgp.toronto.edu/people/stam/reality/Research/pub.html

The paper is called 'Real-time Fluid Dynamics for Games'.

My other suggestion is a technique called the Lattice-Boltzmann model. It's a little more complex, but doesn't take too long to wrap your head around and can deliver much faster results, especially implemented in GPU hardware. Just search Google for Lattice Boltzmann and you should come up with a plethora of links.

Hope this helps

Share this post


Link to post
Share on other sites
hogosha    122
wow, these are awesome. you rock duder. i'm going to have to redesign my engine components since wind is gonna be available on all entities. thankyou again, if anyone else has documents they'd like to chip in, please, all the ideas will help.

Share this post


Link to post
Share on other sites

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