Created
January 3, 2017 11:31
-
-
Save howiemnet/b63f759c99475dcb347c6ee727995778 to your computer and use it in GitHub Desktop.
After Effects: expressions for Particular - particles from thrust
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// apply this to the PoI of a spot light to point it in the direction of its acceleration vector | |
nextVec = transform.position.valueAtTime(time+0.08)-transform.position.valueAtTime(time); | |
prevVec = transform.position.valueAtTime(time)-transform.position.valueAtTime(time-0.08); | |
theVec = prevVec-nextVec; | |
theVec = theVec * 10; | |
theVec = theVec + transform.position; | |
theVec | |
// apply this to the Particles/sec parameter | |
prevVel = length(thisComp.layer("TEAL").transform.position.valueAtTime(time+0.04) - thisComp.layer("TEAL").transform.position.valueAtTime(time)); | |
nextVel = length(thisComp.layer("TEAL").transform.position.valueAtTime(time+0.08) - thisComp.layer("TEAL").transform.position.valueAtTime(time+0.04)); | |
Math.abs(nextVel-prevVel)*750 | |
// and this to the particle velocity param | |
prevVel = length(thisComp.layer("TEAL").transform.position.valueAtTime(time+0.08) - thisComp.layer("TEAL").transform.position.valueAtTime(time)); | |
nextVel = length(thisComp.layer("TEAL").transform.position.valueAtTime(time+0.08) - thisComp.layer("TEAL").transform.position.valueAtTime(time+0.08)); | |
Math.abs(nextVel-prevVel)*50 // change to a negative value to emit against thrust |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment