ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

motion trail but with hold frames at the last frame before

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Roei Tzoref
motion trail but with hold frames at the last frame before
on Jun 22, 2017 at 2:40:09 pm
Last Edited By Roei Tzoref on Jun 22, 2017 at 3:17:15 pm

I want to create a duplication of a movement of a layer, but for it to remain still in the previous frame.

here's an example:
https://drive.google.com/open?id=0B5wyUt17-tu2NUF2OFFwQmNFUXc

echo or motion trail expression by Dan E won't cut it because I need the layer to hold as it duplicates. since it's an automated scenario, any expression/script can surely help here, no?

the manual workaround so far is to duplicate the precomp that has the animation many times, trim to one frame, then sequence layers. here: https://drive.google.com/open?id=0B5wyUt17-tu2eTFRYm9FQWVTbXc
here's the png if you want to see it in full glory and not color bars: https://drive.google.com/open?id=0B5wyUt17-tu2OElKbVZ0dUVtbTA


Roei Tzoref
After Effects Artist & Instructor
♫ Ae Blues Tutorials


Return to posts index

Dan Ebberts
Re: motion trail but with hold frames at the last frame before
on Jun 22, 2017 at 4:10:50 pm

Maybe try this-- animate one copy (I'm assuming it will be layer 1 in the stack). Add this Position expression:

valueAtTime(time - (index-1)*thisComp.frameDuration)

Then duplicate layer 1 enough times to get the look you want.



Dan



Return to posts index

Dan Ebberts
Re: motion trail but with hold frames at the last frame before
on Jun 22, 2017 at 4:31:42 pm

If you the layers to hold their positions when the top layer reaches the last keyframe, it would be like this:

d = (index-1)*thisComp.frameDuration;
valueAtTime(clamp(time-d,0,key(numKeys).time-d))


Dan



Return to posts index


Roei Tzoref
Re: motion trail but with hold frames at the last frame before
on Jun 22, 2017 at 7:43:29 pm

Thank you Dan. the second works perfectly.

I am trying to find a way to change the animation after the fact without deleting all the layers and start over. that's is apply it to one property and not all the properties separately. I see the second expression works the same as the first when placed in the Time remapping property and does not hold the position when the layer reaches the last keyframe. the reason I tried TR is because I want to place my animation inside the precomp so I could change it once, and for it to affect in the master comp on all it's duplicates.

any ideas there?

Roei Tzoref
After Effects Artist & Instructor
♫ Ae Blues Tutorials


Return to posts index

Dan Ebberts
Re: motion trail but with hold frames at the last frame before
on Jun 22, 2017 at 8:18:56 pm

If you changed it to something like this:

d = (index-1)*thisComp.frameDuration;
thisComp.layer(1).position.valueAtTime(clamp(time-d,0,key(numKeys).time-d))

Then all the layers would reference the animation of Layer 1, so you'd only have to edit that one to change them all. Layers 2 through n wouldn't even need their own keyframes.


Dan



Return to posts index

Roei Tzoref
Re: motion trail but with hold frames at the last frame before
on Jun 23, 2017 at 10:30:26 am

[Dan Ebberts] "so you'd only have to edit that one to change them all. Layers 2 through n wouldn't even need their own keyframes.
"


thanks Dan. I am trying to achieve this but failing. changing just one layer, and have the others trail and hold. I am getting an expression error if I delete the keyframes of other layers.



Roei Tzoref
After Effects Artist & Instructor
♫ Ae Blues Tutorials


Return to posts index


Dan Ebberts
Re: motion trail but with hold frames at the last frame before
on Jun 23, 2017 at 1:06:27 pm

Sorry-I messed that up. Try it this way:

d = (index-1)*thisComp.frameDuration;
p = thisComp.layer(1).position;
p.valueAtTime(clamp(time-d,0,p.key(p.numKeys).time-d))



Dan



Return to posts index

Roei Tzoref
Re: motion trail but with hold frames at the last frame before
on Jun 24, 2017 at 5:09:49 pm

thank you Dan. it works. I can now animate only once, and have the change affect all the layers. exactly like the references.

I found that precomping the animation and using time remapping for the property gives me greater flexibility in recreating the effect. I don't have to reference different parameters because TR will contain all of them.

here's the project file for those who are interested: https://drive.google.com/open?id=0B5wyUt17-tu2VmRIWGRwVHFQTjA

Roei Tzoref
After Effects Artist & Instructor
♫ Ae Blues Tutorials


Return to posts index

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