PDA

View Full Version : dynamic dual paraboloid env map



mikemor
11-30-2002, 08:42 AM
Can any body point me to source code that implements dynamic dual paraboloid environment map. Or to some place that explains step by step how to implement it?

thanks

mikemor
12-04-2002, 06:18 AM
Hard to believe that nobody ever implemented paraboloid maps. The way I am doing I render the scene through the cube faces (like for cube mapping) but then I have to warp them onto the paraboloids to create the two texture maps. I am having trouble doing this part. Can anybody help?
thanks

Dodger
12-04-2002, 07:16 AM
There was a paper on this, I forgot who wrote it - but if I remember correctly they set up their projection matrix as to render directly with a paraboloid projection. I know that's not a hell of a lot of information, but maybe it gives you a pointer as of what to look for http://www.opengl.org/discussion_boards/ubb/wink.gif

mikemor
12-04-2002, 07:22 AM
Thanks.Yes there is a paper by Heidrich and Seidel that explains how to use the map but they dont go into details on how to create the map once we render the scene. Thats the part I am having trouble.

ehart
12-04-2002, 10:25 AM
The way I did it was to take each of the faces of the cube and tesselate it. I then transformed it onto the surface of the paraboloid and rendered it orthographically. The math falls out pretty easily from the Heidrich paper, but it is all a bit fuzzy since I did all this 2+ years ago.

-Evan

mikemor
12-04-2002, 12:46 PM
Originally posted by ehart:
The way I did it was to take each of the faces of the cube and tesselate it. I then transformed it onto the surface of the paraboloid and rendered it orthographically. The math falls out pretty easily from the Heidrich paper, but it is all a bit fuzzy since I did all this 2+ years ago.
-Evan

Thanks.Yes that is exactly how I am doing it, but something must be wrong in my code since I get a twisted reflection. To form the front map I set an orthographic projection and set the camera looking down the z axis. To form the back map I set again the ortho projection but now the camera is looking up the z axis (positive z). I get a black texture for this back image and a twisted texture for the front image. I suspect I am not mapping the mesh on the cube correctly to the texture. If somebody has some code that implements this portion I would be highly grateful.

mikemor
12-06-2002, 10:43 AM
To warp a reflection vector (rx,ry,rz) on a cube face into
the front face paraboloid I use

x=rx/(1+rz)
y=ry/(1+rz)
z=rz/(1+rz)
and on the back face paraboloid I use
x=rx(1-rz)
y=ry/(1-rz)
z=-rz/(1-rz)

Still get wrong images. Anything is obviously wrong with these formulae?