|
|
> Workaroud:
> Using the vtransform() macro, apply your transform/matrix to the parts
> of the camera that you want to affect, like location and look_at.
Nevermind.. i think i see what you mean. Is this what you are talking about?
camera {
perspective
direction <0,0,-1>
angle 60
transform{ matrix
<0.960168,-0.22715,0.162726,0.0879589,0.798467,0.595579,-0.265217,-0.557543,0.786642,0,0,-15.75>
inverse }
#local vecFocalPoint = vtransform(<0,3.56,1>, transform{matrix
<0.960168,-0.22715,0.162726,0.0879589,0.798467,0.595579,-0.265217,-0.557543,0.786642,0,0,-15.75>
} );
focal_point vecFocalPoint
aperture 1.5
blur_samples 100
confidence .9
variance 1/10000
}
I had to pull the "inverse" keyword out of the vtransform()... that seems to
make it work.
I will play with it more and test your theories.
I really appreciate your help... Thanks so much for taking time out of your day.
Post a reply to this message
|
|
|
|
>
>> Workaroud:
>> Using the vtransform() macro, apply your transform/matrix to the parts
>> of the camera that you want to affect, like location and look_at.
>
>
> Could you please show me an example on how to do this? I am not following what
> you are saying...
>
>
#include "transforms.inc"
.
.
.
camera {
// Apply the transformation directly to the location
location vtransform(<0,0,0>, matrix<1,0,0,0,1,0.1,0,-0.1,1,0,-1.75,-12>
inverse )
perspective // defult
// Need to apply to the direction vector to keep it consistent
direction vtransform(<0,0,-1>,
matrix<1,0,0,0,1,0.1,0,-0.1,1,0,-1.75,-12> inverse )
angle 60
// and to the look_at location
look_at vtransform(<0,0,-1>, matrix<1,0,0,0,1,0.1,0,-0.1,1,0,-1.75,-12>
inverse )
// the transform is removed from here
focal_point <0.0,3.5,1>
aperture 0.5
blur_samples 100
confidence .9
variance 1/10000
}
***OR***
#include "transforms.inc"
.
.
.
camera {
location vinv_transform(<0,0,0>,
matrix<1,0,0,0,1,0.1,0,-0.1,1,0,-1.75,-12> )
perspective
direction vinv_transform(<0,0,-1>,
matrix<1,0,0,0,1,0.1,0,-0.1,1,0,-1.75,-12> )
angle 60
look_at vinv_transform(<0,0,-1>,
matrix<1,0,0,0,1,0.1,0,-0.1,1,0,-1.75,-12> )
focal_point <0.0,3.5,1>
aperture 0.5
blur_samples 100
confidence .9
variance 1/10000
}
The second example use a macro that is designed to inverse the
transformation provided, so, it don't need to be explicitely inverted.
Both macros take 2 parameters:
1 - The vector to be transformed.
2 - The transformation to be applyed.
Alain
Post a reply to this message
|
|