Hello Emilio, > I'm trying to render the ocean's surface in a real-time visual application, > and I'm looking for advice about how to render the following effect: in real > life, if you look at water surface in a ocean in calm, you can see certain > motion due to the little reflections of sun in the water surface. I would > like to get this effect, but have no idea about in which direction I should > investigate.
If you're talking about caustics, the effect can be done with a simple texture animation. You can use a tool like the one at http://www.lysator.liu.se/~kand/caustics/ to generate a sequence of textures which are tileable and loopable. You then map those textures to the surface and/or the bottom of the water, using the alpha to blend with the normal texture, and make them animate. I've never done texture animation with the OSG, but I would guess you could use osg::Texture2DArray to store the textures, and then use an update callback to select a different index into that array each frame. We used this effect in a university project I did with a team of schoolmates a few years ago. See http://whitestar02.dyndns.org:5413/wiki/Battle_for_Atlantis for some screenshots (the submarine is really ugly, but the water surface looks nice, especially in movement :-) ). J-S -- ______________________________________________________ Jean-Sebastien Guay [EMAIL PROTECTED] http://whitestar02.webhop.org/ _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

