Hello,

I want to create nice water in my program (which uses VR Juggler and OpenSG as
stated in another thread). I have seen a few techniques, and will probably be
using a shader (both vertex and fragment programs) to do the final effect, but
I need to be able to render a pass of my scene into a texture to use as
reflection map. I was wondering if there was an easy way of doing that.

Basically, what I want to know is if I can get low level control of the scene in
the draw() method of my class (which derives from OpenSGApp included in VR
Juggler)... I'd render the reflection by just doing a glScalef(1.0, -1.0, 1.0);
and then calling the base class's draw()... Is that possible? Or is there a
better way? My program is using a MatrixCamera, so maybe I could just modify
the camera matrices to view the scene from the opposite direction, render to a
texture, and then restore the camera and render the real scene with the water?

(if the coding to try it out were non-trivial, I'd try it before asking, but
obviously it's not, so I thought I'd ask)

Has anoyone done water effects like this in OpenSG? If anyone could share their
wisdom in this matter, I'd really appreciate. If there is an easier way to do
it, I'm open to suggestions too! :-) In particular, I was thinking of using
cube maps instead of multiple passes, because my program will sometimes be
running on older cards (GeForce FX 5200 at school) so the multiple passes will
hurt a lot there. But I'm wondering if I can easily reuse the same cube maps
I'm using in my SkyBackground to make the water reflections, or if I have to go
around OpenSG to do it. If anyone has some insights about that, I'd really like
to read them.

Thanks in advance,

J-S

--
______________________________________________________
Jean-Sebastien Guay     [EMAIL PROTECTED]
                         http://whitestar02.webhop.org


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to