Import Animations

Mirage animation editor with a recording loaded, the preview and save controls across the top, and movement curves beside the editing controls

We’ve recorded the built-in animations ourselves, so they have a nice realistic, organic feel to them. You can bring in your own movement too: record yourself moving an iPhone, then use that movement to animate the glass.

The animation editor lets you cut off the start and end, smooth out shaky bits, and make the movement loop. Save it when you’re happy, then choose it in Mirage like one of the built-in animations.

Open the animation editor

In Mirage, open Imports, then Animations, and click Import Animation. The editor opens in its own window. It comes with Mirage, so there’s nothing else to install.

Bring in a recording

Record a movement on your iPhone with an app like SensorRecorder, then copy its arkit_pose CSV file to your computer. Drop that file onto Drop a recording here, or click the box to choose it.

Want to try it first? Download TestMotion-Figure8.csv and drop it into the editor. It’s a figure-eight movement you can trim, smooth, and loop.

You don’t need to get the movement perfect when you record it; we’ll trim and smooth it here. The curves show how the phone moved and turned over time. Replace recording lets you choose another file.

You can also use tracking data saved as CSV, TXT, or TSV with these columns, in order:

  • Px — X position
  • Py — Y position
  • Pz — Z position
  • Pan — pan rotation
  • Tilt — tilt rotation
  • Roll — roll rotation

Preview Editor Output

Tick Preview Editor Output, then play your shot in your editing app. One great thing about this interface is that it’s linked to Mirage, so you can actually preview as you edit.

Open the editor from the instance of Mirage that is on the shot you want to work on. While preview is on, adjust the movement in this window. Mirage’s usual animation speed, time offset, and strength controls only apply once you’ve saved the animation and selected it back in Mirage.

If preview isn’t working in Resolve, go back to the shot and click Import Animation again.

Final Cut Pro doesn’t support live editor preview. You can still edit and save a recording, then select the saved animation in Mirage to see it on your shot. See the Final Cut Pro notes.

Strength

Master gain

Controls the overall movement strength. 1 keeps its original strength; 0 removes the movement. If it’s all over the place, bring this down first.

Rotation gain

Changes how much the glass turns, separately from how much it moves. You might reduce Master gain, then bring the rotation back up a bit to make up for it.

Time

Start by trimming the bits you don’t want, then try a little smoothing. Drag a slider or type a value beside it. The small reset arrow puts that control back to its default; Reset all resets the whole edit.

Animation editor Time controls, showing a recording trimmed from frame 120 to 1120, Global smoothing at 5, and Loop selected

Frame rate (fps)

For an ARKit recording, choose the frame rate you want to save. For existing tracking data, set this to the recording’s frame rate so it plays at the right speed. It doesn’t need to match your timeline.

First frame

Trim off the start if you need to. Frames start at 0.

Last frame

Trim off the end if you need to. This frame is included. For a loop, find a start and end that feel close to each other.

Global smoothing

Smooths out little rapid shakes. Bring it up until the movement feels good, but leave a bit of the small stuff if you want it to feel handheld and real. 0 switches it off.

Global drift removal

Helps if the recording slowly wanders away from where it started. Try it when you want to keep the little movements without the long drift across the frame. 0 does nothing.

Smoothing and drift removal for each axis

Each curve has its own Smoothing and Drift removal controls underneath it. Use these when just one direction needs fixing. The Px, Py, and Pz curves show position; Pan, Tilt, and Roll show turning. Tick Show original to compare the grey original curve with the coloured edited curve.

End mode

Choose Loop to repeat the movement, or Hold for a single move that stays still at the end.

Blend for looping

With Loop selected, turn on Blend for looping to soften the jump from the end back to the beginning. Increase Blend reach to spread that change over more frames. Falloff changes the shape of the transition; try it while watching how the loop joins up.

Ease to hold

With Hold selected, this slows the movement down before it stops at the end. Increase it for a longer, gentler stop, or use 0% to turn it off.

The blue area on the right of each graph shows what happens after the recording ends: the loop starting again, or the glass staying still. It helps you check the join; it doesn’t add extra frames to the saved recording.

Transform

Open Transform if the movement is pointing the wrong way, or you want it to swing around a different point. You can leave these controls alone if it already feels right.

Expanded Transform controls in the animation editor, with Up axis, Flip horizontal, Position offset, and Rotation offset

Up axis

Start with Y for an iPhone ARKit recording. This tells Mirage which direction the recording treats as up. Try X or Z if a recording from another app moves sideways when you expected it to move up and down, for example.

Flip horizontal

Mirrors the movement. Handy when the motion is right but it’s travelling the wrong way across your shot.

Position offset

Changes the point the motion pivots around. Try it if you want a small turn in the recording to make a wider sweep. To place the glass on your shot, use Mirage’s normal Movement controls.

Rotation offset

Turns the direction of the recorded movement. Try it if the recording is good but you’d like it to travel across the shot at a different angle.

Name and save

Once you’re happy, enter a Name at the top of the editor and click Save. Choose a new name for each version you want to keep.

The editor toolbar with Preview Editor Output unchecked, Gentle drift entered in Name, and the Save button

  1. Before leaving the editor, turn off Preview Editor Output if you’ve been using it.
  2. Back in Mirage, open Movement and set Animation to User Animations.
  3. Choose your saved recording in User Animation. In Nuke, click Choose Animation and select the saved Mirage .txt file instead.
  4. Play the shot. You can now adjust the usual speed, time offset, and strength controls.

Make sure you’ve selected the saved animation before rendering. Preview is just for trying the movement while you edit; it doesn’t save it to the shot for you.