FORUMS: list search recent posts

Particular - Get Emitter Position / Lamp Loop

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Joe Jozwowski
Particular - Get Emitter Position / Lamp Loop
on Feb 28, 2013 at 5:00:33 pm

Ok CreativeCow Gurus,
I'll try to explain this as best I can. I am modifying the following tutorial:

http://ae.tutsplus.com/tutorials/vfx/how-to-create-a-dr-who-time-and-space-...

to imitate an infinite subway tunnel. The logic behind this Particular generated tunnel is an emitter perpetually moving in Z space, a camera linked to a certain Z space behind it, and the camera's point of interest modified to look at the camera's X,Y,Z coordinates .25 seconds before the camera arrives at that point.

If blood is not shooting out of your nose, please continue to read.

What I'm trying to do is place ONE point light in the tunnel at a point where the emitter is, stay there until the camera passes, then do it all over again 5-10 seconds down the line. Now I could keyframe the lamp's position in 3D space, but the tunnel is perpetually random, and I would need to do a LOT of key framing every 5-10 seconds.

Here are the expressions currently used:

The Emitter only key framed on the first and last frames, but has this expression attached to its position:
seedRandom(0);
x = wiggle(.1, 250);
y = value[1];
z = value[2];
[x[0] ,y,z]


The Camera's position has this code:
t = time - 4;
x = thisComp.layer("Emitter").transform.position.valueAtTime(t)[0];
y = thisComp.layer("Emitter").transform.position.valueAtTime(t)[1];
z = thisComp.layer("Emitter").transform.position.valueAtTime(t)[2];
[x,y,z]


And the Camera's Point of Interest has this code:
t = time - 3.75;
x = thisComp.layer("Emitter").transform.position.valueAtTime(t)[0];
y = thisComp.layer("Emitter").transform.position.valueAtTime(t)[1];
z = thisComp.layer("Emitter").transform.position.valueAtTime(t)[2];
[x,y,z]


Now I have all of these X,Y,Z coordinates at any point in time, I just need to figure out how to grab Emitter at Frame X, stay there for 4 seconds (the time it takes the camera to reach X,Y,Z coordinate), wait 5-10 seconds, do it all over again.....

- If you were me, you'd be home by now!
Joe Jozwowski
The Video Alchemist


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]