|
|
Alain <kua### [at] videotronca> wrote:
> > Is it possible to create a perspective camera that doesn't use "location" and
> > "look_at", but instead uses "transform {matrix <...>}" and have focal_point work
> > properly?
> >
> > When I try to use a transform with a camera, focal_point no longer works as
> > described.
> >
> > Any help would be greatly appreciated!
> > -andy.
> >
> >
>
> It's realy easy to set a camera that don't use location and point_at:
> Just don't set them and you get a camera siting at the origin and look
> toward <0,0,1>.
>
> If you transform your camera after seting focal_point, then the
> transform will apply to focal_point the same way it apply to the rest.
> You may want to transform your camera BEFORE you set the facal point.
>
> If you declared your camera with a focal_point and then use
> camera{Camera_Id transform{My_Tranfsorm}}, you may want to change it to:
> camera{Camera_Id transform{My_Tranfsorm} focal_point FocalPoint}
> This will reset focal_point to the corect location.
>
> Alain
I tried that -- no dice...
Here is a normal camera using look_at and location:
camera {
perspective
angle 60
location<0,7,7>
look_at<0,0,-1>
focal_point <0.0,3.5,1>
aperture 0.5
blur_samples 100
confidence .9
variance 1/10000
}
Then I do this, and it doesn't work:
camera {
perspective
direction <0,0,-1>
angle 60
transform { matrix<1,0,0,0,1,0.1,0,-0.1,1,0,-1.75,-12> inverse }
focal_point <0.0,3.5,1>
aperture 0.5
blur_samples 100
confidence .9
variance 1/10000
}
The reason why I am using direction with z negative is because I am using OpenGL
to generate the matrix, where Z goes towards the camera, not away.
Post a reply to this message
|
|