Rendering Water
I am building a relativly simple app that just displays OpenGL Water. Now, I''d like to make it as nice as the water in Pikmin for GameCube (if you''ve seen this say wow!)
Any tips before I begin? What''s the best way to go about this?
http://www.cfxweb.net has some water tutorials/demo''s
<hr />
Sander Marechal<small>[Lone Wolves][Hearts for GNOME][E-mail][Forum FAQ]</small>
Gamasutra has an article by Jensen and Golias which should help a lot. It concentrates on modeling and rendering oceans, but it''s local wave model applies also to just regular pools of water, and its rendering techniques apply to any water. It also has pointers to many other papers that should get you started. Naturewizad is a sight with several tutorials and other pointers. Game Programming Gems, I believe, has some information on how to make realistic-looking ripples.
I''ve been looking into calculating and rendering ocean water a la Jensen & Golias, if you are interested in that sort of thing.
I''ve been looking into calculating and rendering ocean water a la Jensen & Golias, if you are interested in that sort of thing.
I recently wrote an article on Rendering and Animation of Liquids. There is a breif history and a lot of good references. Check it out:
http://qlink.queensu.ca/~6dcb/water/water.html
Absolution
http://qlink.queensu.ca/~6dcb/water/water.html
Absolution
A nice easy way to make water is to have a flat array of triangles/quads, and modify each vertex using some sort of sine function. The tris/quads could be textured with transparent blue, or some kind of fractal animation like Unreal.
to hemihua:
How did they do the smooth animations on the water textures of unreal? I tried to look into this but I really have no clue. I could really use a similar method on my Raid3D engine (see http://www.jejik.com/~s.marechal for that). For now i''ve been using a simple flat water texture.
- An eye for an eye will make the world go blind -
How did they do the smooth animations on the water textures of unreal? I tried to look into this but I really have no clue. I could really use a similar method on my Raid3D engine (see http://www.jejik.com/~s.marechal for that). For now i''ve been using a simple flat water texture.
- An eye for an eye will make the world go blind -
<hr />
Sander Marechal<small>[Lone Wolves][Hearts for GNOME][E-mail][Forum FAQ]</small>
Jensen & Golias solve the Navier-Stokes fluid equations along the water surface in order to get out particle velocities, which can then be fed into a texture or a bump map. This gives nice, fluid-looking texture animation (maybe even realistic). For example, in the lower right-hand corner is the vector field of tangent particle velocities:

Here is their solver:

Also, even with just static textures, you can make quite nice effects. For example, you can move and warp texture coordinates (possibly using the texture coordinate matrix). Multitexturing several static textures, warped in different ways, can look pretty good.
[edited by - greeneggs on April 23, 2002 4:10:38 PM]

Here is their solver:

Also, even with just static textures, you can make quite nice effects. For example, you can move and warp texture coordinates (possibly using the texture coordinate matrix). Multitexturing several static textures, warped in different ways, can look pretty good.
[edited by - greeneggs on April 23, 2002 4:10:38 PM]
Is it possible to do anything like the water that is in morrowind? I know alot of new games that are coming out use the dx8.1 pixel shader extensions to get a nice water effect, but unfortunately for me, I own a GF2mx. I need a solution that will produce a nice solution without having to resort to that. I saw a demo on flipcodes IOTD a few months ago that had really really nice water without it, but the project was closed source because it was for research or something like that.
EDIT: I guess I meant to ask for a more "beginner" tutorial, as my current water looks a bit like quake 1s. So not so great. Perhaps something with sourcecode?
Any help would be great!
-Flecko
[edited by - Flecko on April 24, 2002 1:00:49 AM]
EDIT: I guess I meant to ask for a more "beginner" tutorial, as my current water looks a bit like quake 1s. So not so great. Perhaps something with sourcecode?
Any help would be great!
-Flecko
[edited by - Flecko on April 24, 2002 1:00:49 AM]
Never use your hand as a hammer or you''ll just end up hurting it like you did when you told it you had a girlfriend.
To Greeneggs:
Have you got a link on that Jensen & Golias program? It looks real good to me. I already tried to warp the texture coordinates but it looked ugly because the mesh isn''t very dense, and if I increase the density the framerate droppes too much.
Is there any way to warp/deform a texture within a quad?
- An eye for an eye will make the world go blind -
Have you got a link on that Jensen & Golias program? It looks real good to me. I already tried to warp the texture coordinates but it looked ugly because the mesh isn''t very dense, and if I increase the density the framerate droppes too much.
Is there any way to warp/deform a texture within a quad?
- An eye for an eye will make the world go blind -
<hr />
Sander Marechal<small>[Lone Wolves][Hearts for GNOME][E-mail][Forum FAQ]</small>
Jos Stam''s paper "A simple fluid solver based on the FFT" has the source code for a Navier-Stokes solver. It''s on the web and should be easy to find. The source code for my program, including Jos Stam''s solver, is at http://www.fas.harvard.edu/~reichard/water.tar.gz . Basically, use the tangential component of gravity at each point as the force, and set the viscosity to something like 0.01 (standard SI units).
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement