Well, first of all, POV-RAY must have some settings for field-of-view and other gluPerspective variables. It needs them just as OpenGL does. So you should investigate where those are.
Secondly, the ones you mention are pretty simple. POV’s ‘location’ is the OpenGL ‘Eye’ point (I’m sure you’re shocked by this). OpenGL’s gluLookAt prefers an ‘Up’ vector to a ‘right’ vector. To handle this (assuming both are in a right-handed coordinate system), just take the cross-product between the OpenGL ‘up’ vector and the forward direction. Negate this answer (since it return ‘left’ instead of ‘right’).
As for POV’s ‘direction’ and ‘look_at’, one of those is the same as the gluLookAt ‘Center’. gluLookAt expects a world-space point to center on screen for ‘center’. POV’s ‘look_at’ sounds like this, but the POV-RAY documentation should be able to clarify. If you do still need ‘direction’, presumably that is the direction you want the camera to look. That means it is the direction from the ‘Eye’ point to the ‘Center’ point.
Thanks Korval. Things are beginning to make more sense now. OpenGL center is the same as the POV look_at.
So I can now get the camera positioned at the OpenGL eye coordinates and get it to look at the OpenGL center point.
Using the OpenGL Rotation angles gives a slightly different angled display in POV.
The FOV settings in OpenGL are equivalent to the Camera angle in POV. Once again a slightly different angle result in POV, but more than acceptable for the time being.
Thanks again for the quick reply.
TallGuy.
[This message has been edited by TallGuy (edited 04-10-2001).]
[This message has been edited by TallGuy (edited 04-10-2001).]