Transparency the 3D-layer depending on angle of camera
Applies to the Opacity parameter, although it can be applied to almost any parameter. It is necessary to change the value in the lines endVal and startVal. For example, to change the size of the layer, you need to write the values [X, Y].
Example: endVal = [100,100]; startVal = [150,150];
endVal = 100; // Value if the layer is facing the camera startVal = 0; // Value if the layer is at an angle fadeAngle = 90; // The angle at which the maximum influence on the value v = toCompVec([0,0,1]); d = length(toWorld(anchorPoint),thisComp.activeCamera.toWorld([0,0,0])); c = v[2]/d; ease(c,Math.cos(degreesToRadians(fadeAngle)),1.0,startVal,endVal)
Recommended Posts