POV-Ray : Newsgroups : povray.beta-test : Problem with camera vectors Server Time
6 Jul 2024 04:33:07 EDT (-0400)
  Problem with camera vectors (Message 1 to 3 of 3)  
From: Chambers
Subject: Problem with camera vectors
Date: 19 Jun 2009 00:54:54
Message: <4a3b1a1e$1@news.povray.org>
Try the following scene.

Basically, if the "right" vector is x, then shouldn't the sphere be on 
the right side of the screen?
----
camera {
	orthographic
	up z*3
	right x*4
	location y*10
	look_at 0
}

plane {
	y, 0
	pigment {checker}
}

sphere {x,1 pigment {color rgb 1}}

----
-- 
Chambers


Post a reply to this message

From: MDenham
Subject: Re: Problem with camera vectors
Date: 19 Jun 2009 04:40:00
Message: <web.4a3b4df3e6874bfc1007ff4c0@news.povray.org>
No, this is rendering properly - as the documentation states (section 2.3.1.1.5)
look_at may change up and/or right.  (In this case, it rotates right by 180
degrees to keep the effective system left-handed.)  If you were to move the
right _after_ look_at, you'd get the result you're expecting (and incidentally
you'd be turning the coordinate system to be right-handed as a side effect).


Post a reply to this message

From: clipka
Subject: Re: Problem with camera vectors
Date: 19 Jun 2009 14:15:00
Message: <web.4a3bd570e6874bfc7080f32a0@news.povray.org>
Chambers <Ben### [at] gmailcom_no_underscores> wrote:
> Try the following scene.
>
> Basically, if the "right" vector is x, then shouldn't the sphere be on
> the right side of the screen?

> camera {
>  orthographic
>  up z*3
>  right x*4
>  location y*10
>  look_at 0
> }

You're operating at "gimbal lock" here (see "Apollo 13" for the dangers
associated with this condition :P) by looking straight down on your scene,
confusing POV-Ray's standard way of determining what coordinate system you want
and such.

Explicitly specifying both "direction" and "sky" should fix the ambiguities
POV-Ray is facing. You'll probably want "sky z" and "direction -z".


Post a reply to this message

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