Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Particular – Get Emitter Position / Lamp Loop

  • Particular – Get Emitter Position / Lamp Loop

    Posted by Joe Jozwowski on February 28, 2013 at 5:00 pm

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

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

    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

    Joe Jozwowski replied 13 years, 2 months ago 1 Member · 0 Replies
  • 0 Replies

Sorry, there were no replies found.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy