modelling water

I want to create a 3D model of water, looking as realistic as possible.
Does anyone know of any good tutorials?

No, but I saw a few really nice screenshots of water effects at http://www.sciencemeetsart.com/wade/Projects/WaterFX2/index.html . Unfortunately, no tutorial, no application, no code. Just pretty pictures…

Really, it has nothing to do with OpenGL, and everything to do with physics of waves (and not just water waves, but wave theory, energy, interference and the like). Check out some physics and math sites.

[This message has been edited by shinpaughp (edited 04-03-2003).]

That web page is mine…I can’t put up a tutorial since I did it for work, but I can tell you that I basically followed this paper: http://home1.gte.net/tssndrf/index.html . Ask if you have any specific questions.

– Zeno

Thanks for the link. Glad I mentioned your site… Nice!

Nvidia has some demos from Carsten Wenzel, one of which is a ocean simulation that is not bad.
(Yes I know, D3D but you can convert)
http://developer.nvidia.com/view.asp?IO=cw_demos

i coded this method for work too. it looks really good, and quite simple, once you understand it.
i used this paper too.

i quite don´t remember the exact url , but at ATI’s site you can find a nice bump-mapped ocean demo …it´s in the developer section …make a search in there and you´ll find

[This message has been edited by raverbach (edited 04-04-2003).]

Zeno, that is very nice.
I’ve implemented the fft water myself, using that gamasutra article from last year - it looks very nice.
Few questions for zeno:

  1. How do you deal with the LOD up to the horizon…specifically, how do you decide the mesh tesselation based on height above sea level etc.?
  2. How the hell did you get such nice looking coast lines? Is it fog or something?
  3. Have you done any wake rendering? (decalling textured polys over the mesh?)

Thanks for the compliment

  1. How do you deal with the LOD up to the horizon…specifically, how do you decide the mesh tesselation based on height above sea level etc.?

Because the shading is per-pixel, you really only need enough geometry to get correct self-occlusion of the water surface close to the viewer. A quadtree LOD algorithm with a fairly quick distance-based falloff works pretty well.

How the hell did you get such nice looking coast lines? Is it fog or something?

Modulate the color and transparency of the water based on depth.

Have you done any wake rendering? (decalling textured polys over the mesh?)

I have, but it isn’t integrated into this newer implementation yet. See here:
http://www.sciencemeetsart.com/wade/Projects/NightVision/index.html .

Cheers for the reply.
Quadtree…mmm, but the grid lod should essentially be static, shouldn’t it?

Modulate the color and transparency of the water based on depth

But that’s per vertex, so if your tesselation is so low, don’t the coast lines look a bit interpolated close up?

Originally posted by knackered:
Cheers for the reply.
Quadtree…mmm, but the grid lod should essentially be static, shouldn’t it?

Not sure what you mean by ‘grid lod’. Can you elaborate?

But that’s per vertex, so if your tesselation is so low, don’t the coast lines look a bit interpolated close up?

a) It doesn’t have to be per-vertex…the terrain itself may be a heightmap
b) If it is per vertex, and you’re up close, the tesselation should be high. That’s what LOD is for. If you’re far away, you won’t notice the granularity.