|
|
Hi All,
I have a opengl (with GLUT) scene with spheres and boxes which I'd
like to make a nice snapshot of with povray.
I can easily "translate" my objects into povray commands but I have trooble
with the definition of the camera.
In opengl, all rotation and translation are stored into a 4x4 matrix called
the modelview matrix. I couldn't, however, find useful information about
how to use it properly.
From this matrix, I would need to determine the different vectors necessary
for the camera parameters such as location, right, up, look_at..etc...
But I have no idea how to do this
Has anyone had the same issue ? any ideas are welcome.
Cheers
Dav
Post a reply to this message
|
|
|
|
> I have a opengl (with GLUT) scene with spheres and boxes which I'd
> like to make a nice snapshot of with povray.
If you can, define your OpenGL camera in terms of FOV, world position,
cam up vector, look_at point (or a direction from which the look_at
point can easily be computed), and use GLUT routines like gluLookAt and
gluPerspective to build the projection and modelview matrices. You'll
then have the basic camera attributes from which to define a POV-Ray
camera statement. If you don't already have the cam's right vector you
can build it from cross product of the up and fwd vectors.
Ray
Post a reply to this message
|
|