Camera rotation for Skybox ???

Started by russe166, May 14, 2014, 09:45:35 AM

Previous topic - Next topic

russe166

Hi!

I want to use the camera (-y) as a Skybox camera that takes 4 pictures every 90 degrees, and 1 up and 1 (-y direction) down.
The camera shall rotate around its vertical axis (which is unknown to me). For the -y picture the sun has to be
in the lower right corner. The camera position and rotation for the -y picture can not be changed.

Does anyone know how to calculate the rotations around the three axes?

Michael

bigben

Camera rotations (XYZ)
0 0 0
0 90 0
0 180 0
0 270 0
90 0 0
-90 0 0

russe166

Thanks for your reply!

The problem that I am facing is the circumstance that the camera is not pointing in 000.

It is 38,-84,-15. So I have to calculate the Normal Vector for the rotation calculation.

http://www.usbe.cas.cz/people/lazar/celler/online_tools.php

I can not find out the vector for the rotation (Rotation axis:).

bigben

Ahhh.... that stuff does my head in so I usually avoid it.
Workarounds: Use panoramic software to do the transformation of a full panorama rendered at the "standard" angles (or the spherical camera with angles 0 0 0)

bigben

Second thought....  Not sure if Hugin does numerical transformations on panoramas but PTGui does.  I created a dummy panorama with the "skybox" angles and transformed the panorama with your numbers. That gave me input values for the images (y=bearing,p=pitch/tilt, r=roll)

y-78.12882335011153 r-75.3948095702215 p66.39605179565923
y85.99707251651722 r83.71220680118259 p22.79737748974784
y101.8711766498885 r75.39480957022147 p-66.39605179565919
y-94.00292748348275 r-83.7122068011826 p-22.79737748974783
y178.4417684704293 r-157.078871140756 p5.794842501165542
y-1.558231529570712 r-22.92112885924405 p-5.794842501165536

And that is why I render at the standard positions and then stitch/transform outside of PTGui

russe166

Thank you for your second thought, but I must confess that I am not really sure what these figures mean.

bigben

Pano software : TG
Yaw = Y rotation
Roll = Z rotation
Pitch = X rotation
I just pasted a portion of the text file exported from PTGui, the letters before the numbers just identify which axis the number refers to.

russe166

Thanks for the explanation. I thought there would be an option in Terragen where you can switch the camera rotation from 'world space coordinates'
to 'camera space coordinates', so that you could just rotate the camera to the left and right without calculating the camera rotation around
the three axes in world space coordinates.