Page 1 of 1

Help please

Posted: April 4th, 2005, 12:37 pm
by hollow man
Hi,

I want to link the position property of a camera with the opacity of 3d layer.

I want that the opacity of my 3d layer decreases when my camera moves away from the layer!

What's the expression for this effect?

Thanks a lot

Posted: April 4th, 2005, 3:21 pm
by Paul Tuersley
Try this expression on the 3D layer's opacity property:
distance = length(position, thisComp.activeCamera.position);
linear(distance, 1000, 5000, 100, 0);


length() calculates the distance between the 3D layer and the camera, then linear() converts the result. In this example the layer will be 100% opacity when the distance is 1000, fading out completely when the distance reaches 5000.

Paul T

Posted: April 5th, 2005, 4:37 am
by hollow man
Thanks a lot!

It works perfectly