POV-Ray : Newsgroups : povray.newusers : Camera pitfalls? Server Time
5 Nov 2024 09:22:34 EST (-0500)
  Camera pitfalls? (Message 1 to 3 of 3)  
From: Erhard Ducke
Subject: Camera pitfalls?
Date: 26 Nov 2003 16:05:43
Message: <0l4asvsp8tiaeb24buda4arl0r2bmg0hie@4ax.com>
Hi!
I have difficulties in getting the right camera aspect.

// from my scene
camera {
  location  <0,0,-DISTANCE_TO_ORIGIN>
  direction 1.5*z
  right     x*image_width/image_height
  rotate <ROTCAM_X,ROTCAM_Y,0> //rotation around the origin,
// NOT around the camera axis, right?
  angle 10
  look_at LOOK_AT // never hits LOOK_AT point :-(
  }
//end

Are there any problems concerning  rotation and look_at of cameras?
I tested different orders of rotating and look_at but the camera never
looks at look_at...:-(
Thanks in advance!
Erhard

-- 
Erhard Ducke


Post a reply to this message

From: Warp
Subject: Re: Camera pitfalls?
Date: 26 Nov 2003 16:25:03
Message: <3fc51a2f@news.povray.org>
In the camera definition transformations are applied after all the
camera parameters regardless of which order you write them.

  If you want to calculate the location of the camera with transformations
and then make it to look at a certain point, you should transform the
camera location vector itself instead of the camera. (That is, use
vrotate(), multiplication as scale and addition as translate, or if
more complex transformations are needed, vtransform().)

-- 
plane{-x+y,-1pigment{bozo color_map{[0rgb x][1rgb x+y]}turbulence 1}}
sphere{0,2pigment{rgbt 1}interior{media{emission 1density{spherical
density_map{[0rgb 0][.5rgb<1,.5>][1rgb 1]}turbulence.9}}}scale
<1,1,3>hollow}text{ttf"timrom""Warp".1,0translate<-1,-.1,2>}//  - Warp -


Post a reply to this message

From: Erhard Ducke
Subject: Re: Camera pitfalls?
Date: 28 Nov 2003 06:26:44
Message: <fvbesv07damen6e37basf0cgu6i0gtobkm@4ax.com>
On 26 Nov 2003 16:25:03 -0500, Warp <war### [at] tagpovrayorg> wrote:
>  In the camera definition transformations are applied after all the
>camera parameters regardless of which order you write them.

But the manual implicates that when look_at parameter is given as the last
one it works...
They should correct/supplement this in the manual...

>  If you want to calculate the location of the camera with transformations
>and then make it to look at a certain point, you should transform the
>camera location vector itself instead of the camera. (That is, use
>vrotate(), multiplication as scale and addition as translate, or if
>more complex transformations are needed, vtransform().)

I solved the problem with vrotate.
Thanks! :-)
-- 
Erhard Ducke


Post a reply to this message

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