Lens format 2: layers on a 3D head

Format 2 is format 1 with the head in three dimensions. Layers stand on a fitted, followed head, go behind it, catch the room's light, animate, and answer a smile or an open mouth.

What changed for every lens

Everything in format 1 holds unless this page says otherwise. A format 2 package says "formatVersion": 2.

The app no longer hangs a layer from points on the picture. Every frame it fits a rigid head to the face it sees and follows that head's pose: where it is and which way it faces. Every face layer, of either format, is now a card standing on that head. A card:

  • turns and nods with the head in perspective, instead of only tilting;
  • keeps its size as the head turns;
  • holds still while the head does;
  • is lit by the room when it is a normal layer: tinted by the scene's colour cast, dimmed in a dim scene, brighter on the side the light comes from;
  • casts a soft shadow on the face when it is a normal layer at the eyes or nose, like glasses or a sticker;
  • fades in when a face is found and out when it is lost.

A format 1 lens means exactly what it meant: looking straight at the camera, its cards land where format 1 put its images. Screen layers are unchanged.

The head

Head space is measured in interocular distances (IOD, about 63 mm), with the origin between the pupils: x toward the eye on the image's right, y down the face, z into the head. A layer's offset is its x and y; depth is how far it stands out from the face.

AnchorHead-space point (x, y, z)
eyeCentre(0, 0, 0)
leftEye / rightEye(∓0.5, 0, 0)
noseTip(0, 0.68, −0.25)
forehead(0, −0.95, −0.05)
mouthwhere the lips are seen, at the depth of (0, 1.08, −0.12); it follows the jaw
chinwhere the chin is seen, at the depth of (0, 1.85, −0.05); it follows the jaw
faceCentrewhere the face's box centre is seen, at the depth of (0, 0.55, −0.1)

Useful proportions: outer eye corners ±0.71 (0.25 behind the pupils), the crown about −1.95 (−2.05 with hair), the head's half-width about 1.25, the middle of the skull about 1.45 behind the eyes, ears at x ±1.15 to 1.38.

New layer fields

All optional. Using one in a format 1 package is the error format_2_field. Fields marked face mean nothing on a screen layer and are an error there.

KeyDefaultRangeMeaning
depth face0−4 to 4IOD in front of the face (+) or behind it (−). Glasses about 0.15; a hat brim's front about 0.3; a halo behind the head about −1.4.
tilt face0, 0pitch and yaw, each −80 to 80Degrees on top of the head's turn. pitch leans the top edge away (a crown leaning back: 20); yaw turns the right edge away.
facing facefaceface, cameracamera keeps the card square to the camera: sparkles, lettering, anything that must never be seen edge-on. face cards fade out as they turn edge-on.
occlusion facenonenone, head, personWhat the card goes behind. head: the outline of the skull and hair. person: the people in the frame. For halos, wings, a prop behind the wearer.
lighting faceset by the app0 to 1How much the room's light colours and shades the card. 0 for things that give off light.
shadow faceset by the app0 to 1The soft shadow the card casts on the face.
framesnone2 to 48 PNG namesAn animation, drawn in turn from when the layer appears. asset is its still. A frame may repeat.
fps121 to 60Frames a second, with frames.
looptrueLoop, or stop on the last frame, with frames.
when facenoneexpression, above, revealShown only while the face makes the expression by more than above (0.05 to 0.95, default 0.5). reveal is fade (default) or pop, which grows into place with a little overshoot.

The expressions are mouthOpen, smile, blink, leftBlink, rightBlink and browRaise. They are measured in the face's own level frame, so a small or tilted face reads like a near, level one.

More room in the package

RuleFormat 1Format 2
filesat most 16at most 64
whole packageat most 6 MiBat most 12 MiB
layersat most 16at most 24
frames per layernone2 to 48

Everything else in format 1 stays: names, PNG only, 2048 px a side, 2 MiB a file, the 256 × 256 thumbnail, and every file referenced (frames count). The limits follow the manifest's own formatVersion.

Validation

As format 1, plus format_2_field (a format 2 field in a format 1 package) and unsupported_format_version when formatVersion is not 1 or 2. The usual codes apply to the new fields, with paths like lens.json.layers[3].frames[1] or lens.json.layers[2].when.expression.

Making for it

  • Draw in head space. A layer's scale and offset come straight from where you draw it. Decide each piece's depth from where it sits on a real head: on the skin 0, in front positive, round the back negative with occlusion: "head".
  • Split what wraps round the head. A card is flat. Glasses' arms, the back of a headband, hair behind the ears: give each its own layer, depth and tilt, so they swing and hide as the real thing would.
  • Let the room light it. Leave lighting unset for objects. Set it to 0 for neon, glows and light; screen and add layers get 0 anyway.
  • Time animations from the moment they appear. A when layer starts when its expression fires, so a pop-in can be a short loop: false sequence.
  • Preview on a turning head. A lens that looks right straight on can fall apart at 40°. Look at it turned both ways, nodding, and with the mouth open if it answers expressions.

Next: Lens format 3 adds real 3D models and paint on the face.

Checked against the specs on 4 November 2026.

NextLens format 3: models and paint