|
|
Bill DeWitt wrote:
> Actually just setting up the mirrors has been fairly simple. Making them
>move with the camera as it pans and sweeps while keeping the mirrors pointed
>at the look_at point is the hard part...
When I want an object to move with the camera, I don't use
the look_at command. Instead, I locate the camera at the origin <0, 0, 0>
Set the direction vector to <0, 0, 1> and then use rotations and
translation to point the camera. I then use the same rotations and
translations on the object(s) that move with the camera. Warning:
attempting to use a transform on a camera generates odd error
messages, so instead write a transform macro and call it from both
the camera and the object that is to move with the camera.
#macro camera_trans()
rotate x*7 // or whatever
rotate y*18
translate <0, 1, -10>
#end
camera {
location 0
direction <0, 1, 1>
right <(640 / 480), 0, 0>
up <0, 1, 0>
camera_trans()
}
object {
whatever
no_shadow // kind of handy
translate <0, 0, 1> // so it is a little in front of the camera
camera_trans()
}
Pete
Post a reply to this message
|
|