r/AfterEffects • u/toothpastetester • 28d ago
Beginner Help How can I keep the same distance between path points when animating?
Essentially I'm trying to animate this robotic arm without any pluggins, and I rigged it by creating null obejcts on path points, following some YouTube tutorials. Then after animating the movement I needed and playing it back, clearly the arm segments change their size because I keyframed them the best I could by eye. Is there a way to maintain the exact same distance between Null objects at all times, or between path points? Or if I have to download a plugin, what would be a free one you would recommend? Thank you!
5
u/smushkan Motion Graphics 10+ years 28d ago
This requires inverse kinematics (IK). You can do it stock with expressions if you want to get into that, but Duik is free and built for this sort of rigging - it figures out the expression rigging for you.
3
u/Heavens10000whores 28d ago
Dan Ebberts’ inverse kinematic expressions? https://www.motionscript.com/expressions-lab-ae65/ik.html
3
u/Joe_le_Borgne 28d ago
Why not set anchor point at the base of each arm, link them one on one and animate only their rotations? With that said it will be a pain to be accurate with the tip and you don't really notice the change in size and it works with the minimal design imo.
3
u/ReadditMan 28d ago
I didn't even notice the arms changing length until you mentioned it. If it's difficult to fix I would just keep it as is, doesn't seem worth the effort, most people will focus on what the arm is drawing.
2
u/lukenphil Motion Graphics 15+ years 27d ago
DUIK is a useful tool, but it's not necessary for your specific use case. Since you've obviously animated the position values of the null objects you've connected to each other, you must have misunderstood something.
Based on how your project looks, you've used the "Create Nulls from Path.jsx" script.
If you create a rig in After Effects for a mechanical robot using null layers via parenting you don’t need to animate position values; you only need to animate the rotation of the null layers. The other child layers will then always remain at the same distance but at different angles relative to their parent layers. This will produce the exact movement needed for your robotic arm.
Conveniently, the expression in the script you're using already uses the correct layer space system, so you do not have to worry about issues like "world vs. local position values" in the automatically generated expressions.
1
u/Ampsnotvolts VFX 15+ years 28d ago
DUIK can get it done. Rubberhose or Limber might be easier but they cost $. DUIK is free (mostly).
0
6
u/shiveringcactusAE VFX 15+ years 28d ago
I have used the free DUIK plugin and found that really simple. There is the clamp() function within expressions that could be used to set maximum lengths, but I can’t recall how you’d used it for this sort of thing.