POV-Ray : Newsgroups : povray.beta-test : sky vector should default to up? : sky vector should default to up? Server Time
29 Jul 2024 22:24:30 EDT (-0400)
  sky vector should default to up?  
From: Greg Smith
Date: 26 Feb 2002 20:54:08
Message: <3C7C3BFA.87E7B214@alumni.uwaterloo.ca>
I just started working with a scene-centric coordinate system (z = skywards;
xy is level plane; see the following camera) and found that small horizontal
motions of look_at cause the camera to roll over. A look through the docs
turns up the 'sky' vector; if I put  sky <0,0,1> ahead of the look_at, it works
fine.  My suggestion is that the default 'sky' should point in the same direction
as 'up', rather than in 'y' direction. The set of old scenes which would be
broken by this change is likely very small (those which point the 'up' vector
somewhere other than +y, and don't set a 'sky', but use look_at).

camera {
  location  <0.0, -4, -0.5>
  direction 1.5*y        // initially looking along y axis...
  up 1*z
  right     x*image_width/image_height
  look_at   <0.0, 0.0,  0.0> // turns scene upside down!!
}

This is also a right-handed coordinate system. I find the 'scene-centric' coordinates
to
be far more natural, especially when there is no specific view direction; this occurs,
for
instance, in animation with a moving camera, or when the same scene will be shot
from different places; or even when creating a sub-object and you don't know which
way it will be viewed when it is done.

P.S. love the new features, especially sphere_sweep (great for plumbing), photons,
and the parametric surfaces and u-v image map features.

- Greg


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.