ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Re: Link Light intensity to Camera Position

COW Forums : Adobe After Effects Expressions

FAQ   •   VIEW ALL   •   ADD A NEW POST   •   PRINT
Respond to this post   •   Return to posts index   •   Read entire thread


Dan Ebberts
Re: Link Light intensity to Camera Position
on Sep 7, 2018 at 10:04:56 pm

Ooops... I messed up the first line. Should be like this:

CameraPos = thisComp.activeCamera.toWorld([0,0,0]);
LayerPos = toWorld([0,0,0]);
earthNull = thisComp.layer("Earth Null");
EarthPos = earthNull.toWorld(earthNull.anchorPoint);
v1 = CameraPos - EarthPos;
v2 = LayerPos - EarthPos;
angle = radiansToDegrees(Math.acos(dot(normalize(v1),normalize(v2))));
linear(angle,85,95,100,0)


Dan



Posts IndexRead Thread 


Current Message Thread:





© 2019 CreativeCOW.net All Rights Reserved
[TOP]