Simple Swing: layers that hang and swing
Simple Swing is a free After Effects panel. It makes the selected layers swing like hanging objects: when what holds them moves, after your keyframes, on a kick, in the wind or forever. Several layers can hook under each other to form a chain. The panel speaks English, French and Spanish.
A title hanging from a string, a sign that sways when the camera bumps it: by hand, every overshoot is tuned curve by curve, and all of it has to be redone when the timing changes. The bounce expression everyone shares helps a little, but it jumps back into motion after the last key and cannot hook one layer under another.
Simple Swing treats each layer as a real pendulum: its speed depends on its size, it follows what carries it with a slight lag, overshoots and settles smoothly. It only adds settings effects and an expression, so the project opens on any machine with After Effects.
A 250 KB zip: the .jsx script, the sample project from the video, a PDF user guide in English, French and Spanish, and a readme. Free for personal and commercial projects.
Install the panel
- To try it: File → Scripts → Run Script File…, then pick Simple_Swing.jsx.
- To dock it in the interface: copy the .jsx into After Effects' Scripts/ScriptUI Panels folder, restart, then open it from the Window menu.
The panel has two tabs, Create and Settings. A menu at the top switches the interface between English, French and Spanish.
A first swing in one minute
- Select the layer to swing: text, shape, footage or precomp.
- In the Create tab, pick a preset and an axis.
- Click the orange Apply swing button. The pivot moves to the top of the layer, which now hangs from the top.
- Give it a reason to move: animate its parent, set a rotation keyframe or add a marker.
Five presets set the character of the motion. The heavy sign sways at medium speed and settles in a few seconds. The light tag is fast and lively. The chandelier is slow, wide and never quite still. The clock pendulum swings back and forth forever, and the sign in the wind leans and shivers in the gusts.
The Z axis swings the layer facing the camera, X tilts it toward the camera, Y turns it on itself.
What makes it swing
- Parent motion: animate the layer that holds it, and the hanging layer lags behind, overshoots and sways, with no keyframe on it.
- Your keyframes: with two rotation keys or more, they become the hand carrying the object. It follows with a slight lag, overshoots on arrival and sways. No jolt: the smoother your keys, the softer the overshoot.
- A single key: a release. The object is held at that angle, then swings until it hangs straight.
- A layer marker: a kick. A number in the marker comment sets its strength in degrees, and a negative number sends it the other way.
- Wind and perpetual swing: for a sign that never stays still, or a clock.
Everything adds up: a sign can react to a camera move, take a kick on a beat of the music and shiver in the wind.
Hook layers into a chain
Select several layers from top to bottom, tick Chain and apply. Each layer becomes the child of the previous one, its top is placed at the middle of the previous layer's bottom, and it follows the first one with an adjustable delay. The Gap between links setting spreads them apart or makes them overlap, and the links move at once. The wave travels down the chain from link to link, as in the video below.
Only the first layer, the leader, is driven: animate it and the others follow.
Adjust, update, bake
The Settings tab shows every setting of the selected layer, with a slider and a field to type a value: frequency, damping, reaction to the parent and to keyframes, kick, wind, perpetual swing, chain and variation. Every change recomputes the swing and can be undone with Cmd+Z.
- Frequency from size: like a real pendulum, a big layer swings slower than a small one.
- Update: the swing is computed once and read back by the layer, for smooth playback. After changing your keyframes, markers or position, click Update.
- Bake to keyframes: replaces the swing with one keyframe per frame over the work area, to retouch by hand or send the project without the script.
Good habits
- Place the pivot first: the layer swings around it. The panel's nine-button grid moves it without moving the layer on screen.
- X axis seen from the front: a tilt toward the camera barely shows. To judge it, look at the scene from an angle with a camera.
- Do not rename the first layer of a chain: the links find it by name.
- The PDF user guide in the pack covers every button and setting.
Free for personal and commercial projects. Please do not redistribute the pack: share the link to this article instead. A question, a bug? Leave a comment. And tell me what you make with it: what helps, what is missing, what you would like in a next version.
Comments