positioning and orientating a camera in QC

volkerk's picture

I need some advice. Spending a whole day trying to get this to work.

To render a proper fisheye of a scene you have to render four points of view (pov) or a cube map.
For instance the camera eye is at (0,0,0) and its horizontal and vertical field of view is 90 degree. The four povs would be:
1) camera pan 0 deg, tilt 0 deg
2) camera pan 90 deg, tilt 0 deg
3) camera pan 0 deg, tilt -90 deg
4) camera pan 0 deg, tilt +90 deg

This is based on Paul Bourke (http://local.wasp.uwa.edu.au/~pbourke/miscellaneous/domefisheye/dometext...) only he does -45 deg/+45deg but this doesn't matter here.

If this is done correctly, the 0 and 90 deg image should line up precisely when they put next to each other (again like a cube map), without parallax issues because the cameras have the same position, only one is rotated 90 deg.

I tried to replicate this in QC without success. I used the regular QC camera, GL Look At and the GL Camera patch, with GL Field of View and also tried GL Ortho. But no luck. There are always parallax issues and the renders do not match. Almost like the camera is repositioned every time you change the camera target. I tried it with Kineme 3D, a simple cube and Mesh for the scene, also Render in Image and GL Viewport.

Attached is a simplified example, a scene imported through Kineme 3D and nested in Viewport - LookAt - FieldOfView. Check the patch parameters and pan the camera to see what I mean with parallax.

Volker

PreviewAttachmentSize
camera_test.zip916.06 KB

usefuldesign.au's picture
Re: positioning and orientating a camera in QC

I read somewhere here or on the other QC list that the (theoretical) camera position in QC is at (0,0,-n), where n was a number like 1 or 2 or somewhere in between. (That way and object at (0,0,0) is immediately visible.) Don't know if that helps your positioning camera calculations? There are some threads around discussing related issues.

volkerk's picture
Re: positioning and orientating a camera in QC

Yes I'm aware of that. The camera is actually at 1.73205, but this is not the issue I'm having. GL Look At should place the camera wherever you set eye coordinates.

dwskau's picture
Re: positioning and orientating a camera in QC

I haven't really figured out your composition completely, but do the original images get rendered as a 90º perspective projection? Also maybe each image should be square so that you know you are getting 90º vertical and 90º horizontal? I just edited this reply because my initial thinking was wrong, so this might very well be wrong also...

dwskau's picture
Re: positioning and orientating a camera in QC

I see the 90º now, why do you want to make the fisheye this way, and not just use a 180º field of view?

dwskau's picture
Re: positioning and orientating a camera in QC

Once again, I see now...

volkerk's picture
Re: positioning and orientating a camera in QC

i just noticed, the example seems to only work correctly in QC 32bit mode. On my machine (MacBook Pro with NVIDIA 9400M) the 3D scene is not longer displayed if you start panning or interacting in any way with it.