|
|
I'm using a quadratic spline to move my camera, but the camera looks straight
ahead on the path (like someone just looking ahead as they walk). I want it to
focus on a specific point the entire way (<-5,-20,-400>). How would I do that?
I've tried a rotate after the Spline_Trans. Right now the angle from around
where clock~=0.25 is the angle I want for the rest of the spline move, but I'm
not sure how to keep that view (I know the angle is changing; I'm having trouble
coming up with the formula I need to change the angle after the spline
transformation to keep the view angle I want).
This is what I have right now
//+W640 +H360 +A0.3
//initial_frame = 1
//final_frame = 125
//default clock
#include "colors.inc"
#include "transforms.inc"
#declare cameraSpline =
spline{
quadratic_spline
00, <-3,-25,-650> //start
11, <800,200,1250> //end
}
camera{
location <0,30,-1000>
look_at <-5,-20,-400>
Spline_Trans (cameraSpline, mod( (clock+0/6) ,1)*11, y, 0, 0)
#if(clock <= 0.25)
rotate <0,(-(clock*300)),0>
#else
rotate <0,-(0.25*300),0>
#end
}
light_source{
<-30,20,25>*90
color White*3.5
}
sphere{
<-5,-20,-400>,5
texture{
pigment { color Red }
finish { ambient 1 }
}
}
Thanks for any help!
Post a reply to this message
|
|
|
|
On 11/20/2010 6:28 PM, Hugo Arnaut wrote:
> This is from the top of my head, but I think you can set the look_at
> point after the camera transformations. So you only need to switch the
> statements order, no calculations required.
Hugo is entirely correct. Put the look_at <-5,-20,-400> statement at
the end of the camera statement, and that point will be in the center of
the camera view.
Regards,
John
Post a reply to this message
|
|