|
|
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?
Post a reply to this message
|
|
|
|
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)
}
--
#macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
],13),8)-3,10>#end blob{N(array[6]{11117333955,
7382340,3358,3900569407,970,4254934330},0)}// - Warp -
Post a reply to this message
|
|
|
|
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
|
|
|
|
"Tor Olav Kristensen" <tor### [at] hotmailcom> wrote :
>
>
> If you wan't to do it all yourself,
> then you can do it like this:
Thanks, but I just finished redeveloping the whole thing to use vectors
in the camera. I will learn your method anyway though...
Post a reply to this message
|
|