Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Andrew Kramer you saved my life but, now that I’m this far…

  • Andrew Kramer you saved my life but, now that I’m this far…

    Posted by Kevin Mcquade on March 29, 2007 at 7:29 pm

    OK, I have posted elsewhere that I needed help, but then I remembered Andrews Tut on the nano add. OK – so I use the light as my emitter and I pasted a motion path into the position property so I have this nice vine “growing” on. But, I want to have leaves growing out of it. Is there an expression that will link the position of my leaf to the position of the emitter, but leave the leaf in one spot while it scales up?

    Kevin – If you are shaking your head, I am too… I’ll try to put up a link.

    Darby Edelen replied 19 years, 1 month ago 2 Members · 3 Replies
  • 3 Replies
  • Darby Edelen

    March 29, 2007 at 7:50 pm

    Without knowing too much about what you’re talking about, I would say that you’d want to evaluate the emitter’s position at a given time like this:

    thisComp.layer(“MyLight”).transform.position.valueAtTime(2);

    Would give you the value of the position array for MyLight (this will be in the form [x, y, z] for a light) at 2 seconds in composition time. You could add the value of the the layer’s inPoint to 2 to use the value 2 seconds into the layer.

    I hope that helps you in some way, let me know if I’m way off on what you’re trying to accomplish =)

  • Kevin Mcquade

    March 30, 2007 at 1:35 pm

    Yup, I think that would work, is there a way to apply an expression to one layer that would drive a whole bunch of layers?

  • Darby Edelen

    March 30, 2007 at 3:55 pm

    You’ll have to have an expression on the layer you want to affect in order to use information from another layer. However, you might be able to make the expression more self contained like:

    thisComp.layer(“MyLight”).transform.position.valueAtTime(index);

    Where ‘index’ stands for the layer’s position in the timeline (1 is the top and it counts up going down). So your first layer would use the emitter’s position at 1 second, your second layer would use it at 2 seconds, etc.

    However, as I think about this I’m realizing that each of your layers will probably have some keyframes driving the actual growth of the leaf, in this case you could determine the emitter’s position at the time that the first keyframe for the leaf’s growth appears (lets say they are scale keyframes):

    start = transform.scale.key(1).time; //Get the time at which the first keyframe appears in the scale property

    thisComp.layer(“MyLight).transform.position.valueAtTime(start); //Use the time of the first scale keyframe to get our position value

    This is ideal as it would automatically use the emitter’s position at the time you wanted the leaf to start growing (if you want the leaf to grow a little farther down the vine then subtract a little time from the ‘start’ value).

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