prev index next 
Cameras and Lighting 
 POV-Ray Tips, 
 Tricks, and Techniques
Making Z = Up? 
 
Leigh Orf asks: Is there a way for me to exchange the y and z coordinate in the .pov files? In my field, z is up, pure & simple.  I understand the reasoning behind having y be up for POV-Ray's purposes, but it makes my life a little more difficult when I have to remember that the second argument is up, not the third :)
 
Nathan Kopp replies:
This is very easy to do.  This is done in the camera declaration by changing the "up", "sky", and "right" vectors.  Check out this output from Moray (a great DOS modeller for POV):

camera {  //  Camera StdCam
  location  <0.000, -1.000, 39.000>
  direction <0.0,     0.0,  1.9067>
  sky       <0.0,     0.0,  1.0>  // Use right handed-system!
  up        <0.0,     0.0,  1.0>  // Where Z is up
  right     <1.33333, 0.0,  0.0>
  look_at   <0.000, 0.000, 0.000>
}

The up vector sets Z as the up direction.  The sky vector defines the sky for the camera (putting the top of the image in the +Z direction).  The right vector sets X as the right direction and maintains the 4:3 aspect ratio of most picture size settings (like 320x240).  These camera settings can be fun to play around with.  ;)

 

  1