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
Help please
-
- Posts: 704
- Joined: June 5th, 2004, 7:59 am
- Location: London, UK
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
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
-
- Posts: 4
- Joined: March 8th, 2005, 6:13 am
- Location: Switzerland
Thanks a lot!
It works perfectly
It works perfectly