ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Create a motion path from multiple objects's position properties

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Raza AhmadCreate a motion path from multiple objects's position properties
by on Aug 20, 2014 at 2:08:21 am

Here's an interesting situation I'm in.

I've got hundreds of Null objects with varying positions, and I'm trying to find a quick way to turn each Position property on each null into a keyframe for the motion of another layer.

So, if this worked, this would have been my solve:

copy out all position data from the X selected nulls.
copy out animation keyframe data for X keyframes on the object i want to move.
replace old coordinates from animation keyframe data with coordinates from Nulls positions.
profit

but that's not working, in that I can't copy out all the nulls in batch, and the scale here makes that unworkable.

Googling this hasn't returned much. Any thoughts on an expression or quick workflow I could put in place to attack this rapidly?

thanks!


Return to posts index

Raza AhmadRe: Create a motion path from multiple objects's position properties
by on Aug 20, 2014 at 2:17:01 am

Tried and failed:
Extract position data using an XML export of the project. Position data is obfuscated, or at least not matching the format from a keyframe copy paste.


Return to posts index

Raza AhmadRe: Create a motion path from multiple objects's position properties
by on Aug 20, 2014 at 2:35:38 am

Alright, well this is pretty hacky but it works.

Step 1:

Put another Null -- the 'tracker' null - in the same comp as all the other Nulls (fortunately my nulls are named numerically).

Step 2: Attach this code to the 'tracker' null's position property.



//t=frame number
t=timeToFrames(t = time + thisComp.displayStartTime, fps = 1.0 / thisComp.frameDuration, isDuration = false);
//set min/max for the nulls to pull from numerically
if (t<1) {t=1};
if (t>100){t=100};
// assemble a string to seek
y=t.toString();
z='Null-'+y;
//get position from that null
thisComp.layer(z).transform.position


Step 3:
Bake expression to keyframes, stretch and do all other bits.

a work in progress, i'd still love to hear a better solution if you have one.


Return to posts index


Walter SoykaRe: Create a motion path from multiple objects's position properties
by on Aug 20, 2014 at 9:58:47 pm

I think the expression approach is totally reasonable, but this would also make a pretty straightforward script.

Walter Soyka
Designer & Mad Scientist at Keen Live [link]
Motion Graphics, Widescreen Events, Presentation Design, and Consulting
@keenlive [twitter]   |   RenderBreak [blog]   |   Profile [LinkedIn]


Return to posts index

Daniel WaldronRe: Create a motion path from multiple objects's position properties
by on Aug 20, 2014 at 4:02:20 pm

Would Andrew Kramer's SureTarget plugin help? Apply it to your moving layer and add each null object as a target. You would still have to add a keyframe for when you want the layer to move, but at least the position would be set.


Return to posts index

Raza AhmadRe: Create a motion path from multiple objects's position properties
by on Aug 20, 2014 at 5:42:52 pm

It's a good suggestion.

I haven't used Sure Target in a long time, I kind of put it in the same bucket as Ease and Wizz... super useful in a pinch, but once you go down that road, you spend hours fighting it to try and tweak your animation curves and flow.

Could be it's time to revisit them both and see if they've aged well.

Thanks for the idea.


Return to posts index

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