|
![](/i/fill.gif) |
I have 3 points, p1,p2,p3
p1 = Camera location
p2 = Camera look_at
p3 = 1 unit above camera location, relative to desired orientation of camera
To restate, if the camera was straight and level at the origin, looking
along +z, the values would be.
p1 = <0,0,0>
p2 = <0,0,1>
p3 = <0,1,0>
However, these 3 points are going through some rather complex rotations, and
I need to figure out how to 'lock' the camera into it.
Post a reply to this message
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
Tyler Eaves <tyl### [at] coastergames net> wrote:
> I have 3 points, p1,p2,p3
>
> p1 = Camera location
> p2 = Camera look_at
> p3 = 1 unit above camera location, relative to desired orientation of
camera
>
> To restate, if the camera was straight and level at the origin, looking
> along +z, the values would be.
>
> p1 = <0,0,0>
> p2 = <0,0,1>
> p3 = <0,1,0>
>
> However, these 3 points are going through some rather complex rotations,
and
> I need to figure out how to 'lock' the camera into it.
You can transform POV-Ray's camera just like any object, e.g.:
camera {location <0 ,0, 0> look_at <0, 0, 1>
rotate z*30 // Roll around viewing axis
rotate <35, 135, 0> // Tilt and pan
translate -x*20 rotate y*clock*360 // spin around y-axis
}
When you use rotate and translate commands like this, POV-Ray keeps the
three camera vectors (direction, right and up) orthogonal, so the camera
view is not distorted.
Post a reply to this message
|
![](/i/fill.gif) |