Activity › Forums › Adobe After Effects › animating a hinge
-
animating a hinge
Posted by Bernd Rottenbuch on March 23, 2015 at 6:58 pmHi,
I´d like to animate a hinge; I did a small sketch to show what I mean exactly. Would be great to have a solution, where I can pull on either end and the rest is moving accordingly. Thanks 4 now
Bernd Rottenbuch replied 11 years, 2 months ago 3 Members · 4 Replies -
4 Replies
-
Joseph W. bourke
March 23, 2015 at 7:10 pmI don’t see any sketch, but when I think hinge, I think of two sides, with a rotational pin in the middle (like a door hinge). You could create your hinge with two layers in Photoshop, then move the axes to the center, between the two hinges (thinking of the hinge as a 3d layer). In After Effects, if you parent one part to the other, when you move the parent, the child will move with it. And with the axes in the same location for either side, you can rotate your “3D” hinge like a real one.
Joe Bourke
Owner/Creative Director
Bourke Media
http://www.bourkemedia.com -
Bernd Rottenbuch
March 23, 2015 at 9:55 pm -
Kevin Camp
March 23, 2015 at 10:54 pman ik rig might work for what you are asking. dan ebberts’s has a good tutorial/writeup about how to set that up using expressions in after effects:
https://www.motionscript.com/design-guide/ik.html
if you are using creative cloud 2014, you can use the new sourceRectAtTime() function with shape layers to create something similar, but you would need to control it with the rotation property of one of the shape layers, rather than the position of an end point. setting that up is pretty straight forward…
select the shape tool and set it to rectangular and create the first hinge panel by drawing a skinny vertical rectangle. to make things a little more simple, twirl down the layer properties to contents>rectangle 1>transform:rectangle 1>position and set it to 0,0 to center it on the screen (**important, you want to use the contents>rectangle>transform position not the layer>transform properties).
now duplicate the shape layer and move the duplicate bellow the first shape layer and add the following expressions to that she layer:
expression for layer>contents>rectangle 1>transform:rectangle 1>position:
target = thisComp.layer(index-1);
rTarget = target.sourceRectAtTime(t = time, includeExtents = false);
r = sourceRectAtTime(t = time, includeExtents = false);
value + [r.width/2 + rTarget.width/2 + target.content("Rectangle 1").transform.position[0], 0]expression for layer>contents>rectangle 1>transform:rectangle 1>rotation
target = thisComp.layer(index-1);
-target.content("Rectangle 1").transform.rotationif you adjust the first shape layer’s contents>rectangle 1>transform:rectangle 1>rotation property (**again not the layer>transform>rotation property), the second layer should hinge outward like it is connected to the first.
at this point i’d parent the second shape layer to the first (it will make it easier to move them around). and then you can simply duplicate the second shape layer for as many hinged panels as you need and they should expand and contract like an accordion as you change that tranform:rectangle 1>rotation property of the first layer.
Kevin Camp
Art Director
KCPQ, KZJO & KRCW
Reply to this Discussion! Login or Sign Up
