DEV Community

Cover image for I Built a Smart Morphing Studio Into My Browser Motion Editor
Shayan
Shayan

Posted on Edited on Originally published at atomcut.net

I Built a Smart Morphing Studio Into My Browser Motion Editor

Select two layers. Press Morph. That's the whole feature.

One object morphing without a cut: MOTION, EMOTION, a dot, a triangle, a heart, a star, a flower, a sun
One track, nine morphs, zero keyframes.

I build AtomCut with Claude. It's a free motion design and video editor that runs in a browser tab, and it now has a morphing engine and a studio to steer it. Everything moving on this page came out of it.

The part I care about: you can argue with it

Most morph tools give you a result. If it's wrong, you start adding points by hand, or you give up and use a fade.

Here, double-clicking the morph opens this:

The Morph studio: the letters of HEART on the left, EARTH on the right, lines joining each match, the live result between them, frames and timing bars below
Every part on the left, what it becomes on the right, the live result between them. Drag the frames to move through time.

A morph answers three questions. What is here? What becomes what? How does it travel? The first is math. The other two are taste, and a person is often better at them than any matcher. So those are what the studio puts on screen.

Don't like a match? Drag a new line.

Dragging a line from the circle to the pill and from the triangle to the diamond in the Morph studio, and the result changing
Circle to pill, triangle to diamond.

Only what you drag is stored. Change the text later and everything else is matched again. No idea what you want? Shuffle.

Shuffle is pressed three times and the shapes pair up differently each time, then Smart restores the best match
Three rolls, then Smart.

Every link can move its own way

My first version of this studio stopped at matching. Everything travelled alike. So I rebuilt it around the link.

Click a line and the panel is that link alone. A dot marks what it says for itself. Everything else follows the whole morph.

Two panels: all parts with the Smooth feel, and the letter H alone with a loop path and dots beside Spin and Overshoot

Pull a handle and that letter leaves the crowd:

In Paths view two handles of the letter H's path are pulled up and the H lifts over the other letters
The result follows while you pull.

Drag a bar and it leaves earlier, or takes longer:

The H's timing bar is dragged earlier and then made longer, and the result plays

Put those together and one transition can have a lead and a chorus. The H makes the trip. Four letters make room.

The H of HEART flies over the other letters while they step left one by one, and lands to spell EARTH
One transition, five links. The anagram post builds this one step by step.

Or press a feel and be done.

HEART to EARTH loops while the feel changes from Swoop to Spring, Flip, Swarm and Pop
Swoop, Spring, Flip, Swarm, Pop. There are ten.

A path is stored as offsets from the straight way between the two parts, never as points on the stage. So moving either layer keeps the curve. A link stores only what differs from its transition, so changing the whole morph still reaches everything you left alone.

Words

The letters of LISTEN travel on arcs to spell SILENT
Same six letters, so nothing changes shape. They just swap seats.

A letter that exists in both words is paired with itself before any other matching happens. That single rule is most of why this looks designed and not computed.

MOTION moves aside and turns orange while an E grows in front of it
Six letters move over. One arrives.

Icons

Stroke icons stay strokes. Lines bend, split and join, and the line weight never changes.

Menu icon to cross to plus to arrow to check to heart, all in one line weight
Six icons in one loop.

A magnifier's ring opens into a bell and its handle becomes the clapper
The handle becomes the clapper. I didn't tell it to.

If you only came for the hamburger menu, here it is. The icon guide has the steps.

A three-bar menu icon closing into a cross

One shape into three, holes, whole drawings

A pentagon splits into a circle, a square and a star and merges again

The hole in a letter O closes to a point as it becomes a square

A flower's petals become the rays of a sun
A group is matched part by part: eight petals, eight rays.

In the app

Two clips on a track. Select both, press Transition, and Morph is first.

The AtomCut editor with two text clips selected and the Transition menu open with Morph first

It lands as a badge over the cut, like any transition. Click it and the settings are in the inspector, with a live preview.

The AtomCut editor half way through a morph, the Morph badge selected on the timeline and its settings on the right

The AtomCut editor playing HEART into EARTH with the playhead crossing the Morph badge
The editor playing it.

Arc, spin, overshoot, stretch, blur, stagger. Left is zero, right is turned up:

Path arc at 0 and 24 percent
Path arc

Stagger at 0 and 90 percent
Stagger

Stretch at 0 and 90 percent
Stretch

How it works, in five lines

  1. Walk both outlines by length and put every vertex of each onto the other, so both ends stay exact.
  2. Try 96 starting points. Least squares gives the best turn and size for each one.
  3. Take the turn and the size out, interpolate those as themselves, and mix only what's left.
  4. If the mix crosses itself, walk again with dynamic programming. If it still does, blend distance fields.
  5. Strokes skip all of that and travel as centre lines with a width.

Step 3 is the one people miss. This is the same L rotating, two ways:

Top: an L rotating by straight-line point interpolation collapses in the middle. Bottom: the same L keeps its size
Straight lines go through the middle. Rotations don't.

Every frame is a pure function of a plan and a number between 0 and 1. Nothing is simulated, so scrubbing backwards and exporting out of order give the same picture.

The bug that fooled me

Rendering MOTION to EMOTION for this post, six letters should have slid over. Four did. M and N went soft and grew black specks.

Top: MOTION mid-morph with rounded M corners and specks in the M and N. Bottom: clean letters
Before and after.

The distance fields looked guilty. It was the font. Inter is variable, and variable fonts build letters from overlapping strokes. Its M and N are a single ring that crosses itself before any morph starts.

The check asked "does the mix cross itself?" It got a truthful yes, about a letter that wasn't changing at all.

There were two fixes. An outline that only moves, turns or grows is never called tangled. And fields are filled by winding, as fonts are, not even-odd. Both are in the app now. The check was right. The question was wrong.

The full engineering write-up has the holes, the Hungarian matching and the code.

Agents can do it too

Claude Code drives the same engine over MCP. This call makes the LISTEN morph:

morph_between {
  "a": "clip_vqzcj3p46jn9",
  "b": "clip_wbnyrnwzl0um",
  "durationMs": 900,
  "params": { "arc": 62, "stagger": 10 }
}
Enter fullscreen mode Exit fullscreen mode

Then morph_inspect says what it matched:

{
  "method": "shape",
  "why": "Both sides have outlines",
  "pairs": [["S","S",1], ["E","E",1], ["N","N",1], ["L","L",1], ["I","I",1], ["T","T",1]]
}
Enter fullscreen mode Exit fullscreen mode

morph_pair lets the agent disagree, as you would, and morph_style gives a link its own path, easing and timing.

What it doesn't do

Photos and video cross dissolve: there's no outline to follow. Two outlines with nothing in common, like a detailed cup and a rocket, come out clean but scrambled half way. Go through a dot and it's fine: word, dot, icon.

Try it

app.atomcut.net, free, no account, works offline. Type LISTEN, type SILENT, press Morph.

The full guide on atomcut.net shows every setting side by side, and the docs have the reference.

What two words would you morph?

Top comments (1)

Collapse
 
jan_sytze profile image
Jan Sytze Heegstra •

Select two layers and press Morph is a feature I understood in one line, which is rare. I would morph DRAFT into SHIPPED. If you want people who never saw AtomCut to try it cold and write what confused them, I run TestMyBuild, where builders do that for each other. testmybuild.app