|
|
Warp wrote:
>
> Bill DeWitt <bde### [at] cflrrcom> wrote:
> : I have always used direct calculations to position my camera_location
> : and look_at but to adapt something I already have, I want to use a
> : transform. But transform doesn't work in a camera_location statement, nor in
> : a look_at. I can move the camera with the transform, but I want the camera
> : look_at to move with a slightly different transform. How would I do that?
>
> camera
> { location vtransform(initial_camera_location, location_transform)
> look_at vtransform(initial_camera_look_at, look_at_transform)
> }
Just remember to add this first:
#include "functions.inc"
vtransform() is a macro defined
within that include file.
If you wan't to do it all yourself,
then you can do it like this:
// vL is the initial camera location vector
// vLA is the initial camera look_at vector
#declare OneTransform = transform { rotate 45*y }
#declare L_fn = function { transform { OneTransform } }
#declare LA_fn = function { transform { OneTransform translate 3*y } }
camera {
location L_fn(vL.x, vL.y, vL.z)
look_at LA_fn(vLA.x, vLA.y, vLA.z)
}
Tor Olav
Post a reply to this message
|
|