將Expression套用在AE 3D圖層的"opacity"下
Expression內容如下:
startFade = 500; // Start fade 500 pixels from camera.
endFade = 1500; // End fade 1500 pixels from camera.
try{ // Check whether there's a camera.
C = thisComp.activeCamera.toWorld([0,0,0]);
}catch(err){ // No camera, so assume 50mm.
w = thisComp.width * thisComp.pixelAspect;
z = (w/2)/Math.tan(degreesToRadians(19.799));
C = [0,0,-z];
}
P = toWorld(anchorPoint);
d = length(C,P);
linear(d,startFade,endFade,100,0)
其中3D圖層在距離Camera 500 pixels時開始fade out, 在1500 pixels時完全消失!
參考參考!!
沒有留言:
張貼留言