Skip to content

Instantly share code, notes, and snippets.

@howiemnet
Created January 3, 2017 11:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save howiemnet/b63f759c99475dcb347c6ee727995778 to your computer and use it in GitHub Desktop.
Save howiemnet/b63f759c99475dcb347c6ee727995778 to your computer and use it in GitHub Desktop.
After Effects: expressions for Particular - particles from thrust
// 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