JOS JOS Compositor

2D

Tracking: what's different

Point tracking, the planar tracker and the camera tracker work as compositors expect. This page covers what JOS adds.

Four trackers, each doing one thing

Where Nuke has one Tracker and an Export menu that makes the node that moves the picture, JOS has four tracker nodes, kept simple: no T, R, S choices per track.

A Tracker on a brick wall, in the viewer: three tracks with the paths they followed; the selected track shows its pattern and search boxes, and a magnified view of its pattern at the top right

A Match Move on the same wall, at frame 20. A picture connected to its image input was placed on the wall at the reference frame; the two tracks carry it with the wall since then:

A Match Move in the viewer: the pivot track (lower middle) and the transform track (upper right) with the short paths they followed, and a sunset picture sitting on the brick wall inside its green box, with corner and edge handles and the turning handle above it

Their mask input (a matte's alpha) keeps whatever it covers out of the tracking. A Nuke Tracker that stabilizes or match-moves (any number of tracks, with Nuke's T, R, S) comes in as a Tracker driving a Transform, so it moves the picture exactly as in Nuke; older JOS projects with such trackers open the same way.

CornerPinTracker

One node does what a Tracker and a CornerPin used to do together. It has two image inputs, plate (the shot you track) and source (the image you pin), and exactly four tracks: bottom-left, bottom-right, top-right and top-left.

  1. Connect the shot to plate and the image to pin to source.
  2. Place the four tracks on the corners and track them, as in a Tracker.

The CornerPinTracker's settings: the plate, source and mask inputs, the tracking buttons, its four tracks (bottom-left, bottom-right, top-right, top-left) with their error, and over plate turned on

The Tracker, Stabilize and Match Move nodes keep any number of tracks; their tracks are not sockets. Projects whose tracks were wired into a CornerPin load with those corners following the tracks by expression.

Merge Tracks: when a feature leaves the frame

A feature you track walks out of the frame, and another one, tracked from a later frame, carries on. Merge Tracks joins their motion into one, frame by frame: where both are tracked their moves are averaged, so they agree; where one ends, the others carry on from where it was, without a jump. A frame no track covers holds still.

  1. Connect the trackers (Tracker, Stabilize or Match Move) to the yellow tracker inputs. A new one appears each time you connect one. Other nodes don't connect there.
  2. Connect the shot to plate and the image to move to image.
  3. Set the reference frame: the frame where the image sits as you placed it. The motion is counted from there.

Here the first Match Move's tracks end at frame 16 and the second one's start at frame 12. Both go into the Merge Tracks, with the wall on plate and a picture on image:

The node graph: a brick wall moved by a Transform feeds two Match Move nodes and the Merge Tracks' plate input; the two Match Moves go into its yellow tracker and tracker2 inputs (a third, tracker3, waits empty), a Read of a picture into its image input, and the Merge Tracks into the Viewer

At frame 24, after the first tracker's tracks have ended, the picture still follows the wall, inside its green box:

The Merge Tracks result in the viewer at frame 24: the picture over the turned and pushed-in brick wall, framed by the green box with its handles

On a Tracker, merge tracks does the same with its own tracks: the motion shown under its table is all of them joined.

Merge Tracks is JOS only: exported to Nuke, it becomes a NoOp, with a warning.

Camera tracker: what it does, what you add

Camera tracker: guides, axes and a cube

Things that are square in the set (a truck's box, a kerb, a building's corners, a door frame) help the camera tracker, as in fSpy: draw them, and the solve keeps them.

Guides. In the CameraTracker's settings row in the viewer, turn on guides, choose X, Y or Z (verticals are the up axis: Z when the 3D up axis preference is Z, as in Blender; the row says which, "Y up" or "Z up", and marks that axis' button "(up)"), and drag along an edge that runs that way: from where the axis starts to where it points (the arrow shows which way). Two lines per axis on one frame are enough; more lines, or lines on other frames, only average out how they were drawn.

A truck in the viewer with guides drawn along its edges: red lines across its back (x), green up its corners (y), blue along its side (z), among the tracked points - The lines only have to be square in the set: on screen they are at whatever angle the perspective gives them. - snap (on by default) puts a line drawn or moved onto the straight edge of the plate it lies along. - Drag a line's end to move it; Delete removes the last one touched. Each is one undo step. - set: lines of one set must be parallel or square to each other. A truck parked at an angle to a house is another set: its lines keep axes of their own, so the two don't fight. Set 1 is the scene's axes.

Solve then keeps every camera seeing the axes along the lines, which also holds the lens, and the scene comes out in their axes: X, Y and Z are the set's. Once solved, a dashed line from each guide's middle shows where the solved axis runs; a guide far from its dashed line was drawn off (or belongs to another set). The panel says how far off the guides are, in pixels. guide weight sets how much a guide counts against the tracked points (0: they only set the axes). Draw guides on the plate as you see it: with lens distortion on, their ends are taken through the lens being solved, so an edge near the frame's corner counts as the straight line it is.

Set axis. Pick two solved points in the viewer (the first, then the second) and choose X, Y or Z: the direction from the first to the second becomes that axis. Along the floor it turns the scene about up (the ground stays level); along up it makes them vertical.

Something comes back into the frame misaligned (the camera turns away and back, and the table or the floor isn't where it was): tie the two views together with a control point (or a manual point), as described in When the camera comes back below.

Lens distortion. Turn on lens distortion before Solve and the lens' distortion is solved with the camera (LensDistortion's radial model); the panel shows it. The camera is then the undistorted plate's: Create Lens Distortion makes the LensDistortion node that undistorts the plate (comp your CG over that), and a copy of it set to Redistort puts the result back on the original plate. On iPhone test shots it found about -0.05 and 0.04, and with it a table corner stayed within 2 to 8 pixels (4K) through a turn away and back.

Create cube. Pick points on an object's faces (Shift+click for more) and click Create cube: a Cube round them, square to the scene's axes, joined to SolvedWorld. With guides along the object's edges, the cube is square to the object; drag its sides out to its real edges.

Camera tracker: when the camera comes back

On a shot that turns round a room, small errors add up: when the camera comes back to the table, the solve can be hundreds of pixels off (on a 4K living-room test shot, about 1,000 px at the table's corner). The tracker followed the table's corner twice, once on each visit, but as two separate tracks: nothing tells the solve they are the same corner. A control point tells it.

Control points: tie two tracks together

  1. Make a control point. On the first visit, click an automatic point (a track) on something you will see again: the table's corner. Click Control point in the CameraTracker's settings row in the viewer (or press C with the mouse over the viewer, or Make control point under the node's list). It becomes Point A; the next ones are B, C, and so on. Its tracks are drawn as pink diamonds with the point's letter.
  2. The list. The CameraTracker's settings (in Properties and in the node) list the control points: each with its tracks (their numbers and frame ranges) and, once solved, its error in pixels. Select a point and its tracks are picked and highlighted in the viewer; pick one of its tracks in the viewer and its row is selected. Unlink takes the selected track out of its point, Delete removes the point (its tracks stay, as ordinary tracks), and a double-click on a name renames it ("Table corner").
  3. Link the track where it really is when the camera comes back. Select Point A in the list, go to a frame of the second visit, Shift+click the track sitting on the corner, and click Link to Point A (in the list, or in the viewer's settings row, or press L). On a solved frame the selected point's place as the solve has it shows as a dashed pink ring: the real corner is often far from it, which is the drift. Several tracks can be linked to one point (the corner tracked three times over).
  4. Solve again. The solve takes all of a control point's tracks as one 3D point, with every track's observations (when two of them see it on the same frame, both count). They are weighted like a manual point's keys and never thrown out, so the cameras bend back to meet them and the loop closes. The list and the viewer show each point's error after the solve.

Link two or three points spread over the set (two corners of the table, a door frame): one point pins where something lands, two or more hold which way the scene faces too (see below). In a test with a camera turning 150 degrees and back while every track slips a little, four control points brought the first visit's points from about 8 px off to under 1 px on the return frames.

Control points are kept in the CameraTracker's control_points setting (JSON: each point's name and track numbers), so scripts and AI assistants can read and set them like any other setting. A track that goes away (removed by the second pass, deleted) drops out of its point; Track again starts the points over, since every track is new.

Manual points: when no track holds the corner

When no automatic track sits on the corner on one of the visits, place a manual point instead and key it on both:

  1. Before it leaves the frame: with 3D point on, click something you will see again (a table's corner). Go to another frame and click it again: the second click snaps onto the line the first click's ray makes, and places the point. It shows as a blue circle.

A living room with the table's corner keyed as it leaves the frame: the manual point 900001, picked, a blue circle on the corner 2. When it is back in view: pick that point, then key it where it really is: - its blue circle is close (within about 30 px): click near it; - it is far away, or off screen (an arrow at the viewer's edge shows where the solve thinks it is, and how far): Ctrl+click where the corner really is.

Here, after the camera has turned round the room, the solve puts the point in the middle of the table, far from its real corner:

The camera back at the table: the point's blue circle is in the middle of the table, a dashed line to the table's real corner at the top left 3. The click snaps onto the plate's nearest corner (hold Shift to place it exactly where you click). A message lists the frames the point is keyed on. 4. Key it on two or three return frames, then Solve again. A manual point's keys are trusted (never thrown out, pulling hard), so the solve bends back to meet them.

The same frame, the corner keyed on three return frames and solved again: the point sits on the corner.

The same frame after solving again: the point 900001 on the table's corner

On that test shot, keyed on three return frames, the corner landed 3 to 5 px from where it really is on the frames that weren't keyed. Key a few more frames if the frames in between still drift. A Tracker's track plugged into the CameraTracker's tracks input does the same as a manual point.

One point holds a place, not a direction. It pins where that corner lands, but the solve can still turn the scene around it: tilted, or rotated about the point. To hold the orientation too, add either:

The points hold where things are, the lines which way they point. Two points, or a point and a guide, is the safe recipe; one point was enough on the test shot above, but not on every shot.

Occlusion: what passes in front

A finger crossing a phone screen, or a passer-by, must not pull the track. The PlanarTracker, CornerPinTracker, Tracker, Stabilize, Match Move and CameraTracker leave out of the tracking whatever their occlusion covers.

CornerPin2D follows its input

A new CornerPin2D's corners start on its input's image, as it is after any Transform above, not on the frame. With follow input on (as it is on the CornerPin2D nodes you create), its corners are offsets from the input image's corners: change a Transform above, and the pin and its handles in the viewer move with the image. A copy pasted on another branch lands on that branch's image.

Fill gaps

When a track loses its pattern for a few frames (motion blur, something passing in front), fill gaps in the Tracker's panel keys the missing frames. The keys follow a curve fitted through the five keys on each side of the gap, so a track moving in an arc stays on its arc.

Hidden corner

hidden corner... in the Tracker's panel works out one corner of a rectangle from the other three. Use it when a thumb covers a phone screen's corner, or when the corner is never in frame.

  1. Track the three visible corners. Add a fourth track for the hidden corner; it can stay untracked.
  2. Click hidden corner... and fill in the dialog: - corner 1 (bottom left) to corner 4 (top left): pick the track for each corner. - hidden: which corner to solve. - aspect: the rectangle's shape, e.g. 16:9 or 1.778. Leave it blank to measure it from frames where all four corners are tracked. If the corner is never seen, it is required. - focal (pixels): leave it blank to measure it, or to guess it if it can't be measured.
  3. The corner is keyed on every frame. The report says whether the aspect and focal were measured or given.

Placing a corner by hand: the viewer outlines the first four enabled tracks as a dashed shape, which helps place a hidden corner along a screen's visible edges.

Focusing on one track: clicking a track's path brings it forward and dims the others. Click empty space to show them all again.