Subject:
|
Re: Tilting the camera
|
Newsgroups:
|
lugnet.cad.ray
|
Date:
|
Tue, 18 Jun 2002 23:27:35 GMT
|
Viewed:
|
1208 times
|
| |
 | |
Lars C. Hassing wrote...
> Anders Isaksson wrote:
> > Modifying both SKY and RIGHT seems to do the job for me:
> >
> > #declare TiltAngle = 30
> > #declare CameraRoll = -TiltAngle*pi/180 // '-' to get CCW for positive
> > angles
> >
> > sky -y*cos(CameraRoll) - 4/3*x*sin(CameraRoll)
> > right -4/3*x*cos(CameraRoll) - y*sin(CameraRoll)
>
> Nope, sorry - it doesn't work if you look at the model from +x,
> e.g. with -cg30,90
> The solution must be to rotate (roll) the camera about the location-look_at vector
> using translate/rotate/matrix at the end of the camera definition.
location L3Location
sky -y
right -4/3*x
look_at L3LookAt
translate -L3Location
#declare vx=vaxis_rotate(x,L3LookAt-L3Location,L3RollAngle);
#declare vy=vaxis_rotate(y,L3LookAt-L3Location,L3RollAngle);
#declare vz=vaxis_rotate(z,L3LookAt-L3Location,L3RollAngle);
matrix <vx.x,vx.y,vx.z, vy.x,vy.y,vy.z, vz.x,vz.y,vz.z, 0,0,0>
translate L3Location
seems to work.
/Lars
|
|
Message is in Reply To:
 | | Re: Tilting the camera
|
| (...) Thanks, I guess it's ROLL then. (...) Hm, first vote for CCW. Why? (...) I agree, see also (URL) Modifying both SKY and RIGHT seems to do the job for me: (...) Nope, sorry - it doesn't work if you look at the model from +x, e.g. with -cg30,90 (...) (23 years ago, 30-May-02, to lugnet.cad.ray)
|
9 Messages in This Thread:             
     
  
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|