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
normallayer: 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
normallayer 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.
| Anchor | Head-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) |
mouth | where the lips are seen, at the depth of (0, 1.08, −0.12); it follows the jaw |
chin | where the chin is seen, at the depth of (0, 1.85, −0.05); it follows the jaw |
faceCentre | where 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.
| Key | Default | Range | Meaning |
|---|---|---|---|
depth face | 0 | −4 to 4 | IOD 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 face | 0, 0 | pitch and yaw, each −80 to 80 | Degrees 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 face | face | face, camera | camera 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 face | none | none, head, person | What 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 face | set by the app | 0 to 1 | How much the room's light colours and shades the card. 0 for things that give off light. |
shadow face | set by the app | 0 to 1 | The soft shadow the card casts on the face. |
frames | none | 2 to 48 PNG names | An animation, drawn in turn from when the layer appears. asset is its still. A frame may repeat. |
fps | 12 | 1 to 60 | Frames a second, with frames. |
loop | true | Loop, or stop on the last frame, with frames. | |
when face | none | expression, above, reveal | Shown 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
| Rule | Format 1 | Format 2 |
|---|---|---|
| files | at most 16 | at most 64 |
| whole package | at most 6 MiB | at most 12 MiB |
| layers | at most 16 | at most 24 |
| frames per layer | none | 2 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
scaleandoffsetcome straight from where you draw it. Decide each piece'sdepthfrom where it sits on a real head: on the skin 0, in front positive, round the back negative withocclusion: "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,
depthandtilt, so they swing and hide as the real thing would. - Let the room light it. Leave
lightingunset for objects. Set it to 0 for neon, glows and light;screenandaddlayers get 0 anyway. - Time animations from the moment they appear. A
whenlayer starts when its expression fires, so a pop-in can be a shortloop: falsesequence. - 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