## Blend modes and effects

A layer's `bm` sets its blend mode:

| `bm` | Mode | `bm` | Mode | `bm` | Mode |
| --- | --- | --- | --- | --- | --- |
| 0 | normal | 9 | soft light | 18 | linear burn |
| 1 | multiply | 10 | difference | 19 | darker color: renders as normal |
| 2 | screen | 11 | exclusion | 20 | linear dodge |
| 3 | overlay | 12 | hue | 21 | lighter color: renders as normal |
| 4 | darken | 13 | saturation | 22 | vivid light |
| 5 | lighten | 14 | color | 23 | linear light |
| 6 | color dodge | 15 | luminosity | 24 | pin light |
| 7 | color burn | 16 | add | 25 | subtract |
| 8 | hard light | 17 | hard mix | 26 | divide: renders as normal |

- Write `bm` as a whole number from 0 to 26, without a decimal point.
- Don't choose 19, 21 or 26: they render as normal, and Blitframe warns.
- A blend mode changes how the layer mixes with the content below. It does not replace a transparent asset or a matte.
- Layer styles number their blend modes differently ([style blend modes](#style-blend-modes)).

### Effects

Effects are entries in a layer's `ef` list:

```json
{"ty":21,"mn":"ADBE Fill","nm":"Fill","ef":[{"ty":2,"nm":"Color","v":{"a":0,"k":[0.1,0.3,0.8,1]}},{"ty":0,"nm":"Opacity","v":{"a":0,"k":1}}]}
```

- The exact match name `mn` selects the effect. The display name `nm` may be an exported custom name.
- The nested `ef` lists parameters, matched by exact English `nm`, not position, translated name or `ix`. Transform and Color Balance (HLS) match each by its own `mn`, such as `ADBE Geometry2-0007`. Never rename parameter nodes.
- Each value is `v:{"a":0,"k":...}` or a supported animated property object. Preserve exported metadata and effect order. Arbitrary added color controls don't recolor pixels.
- Colors are RGB with finite components 0–1; a fourth is ignored. Opacity units vary: Fill 0–1, Drop Shadow 0–255, layer opacity 0–100.
- `en` is not read: an effect with `en: 0` still renders, with a warning. Remove an effect to turn it off.
- Masks cut the layer before its effects run, so a blur spreads past the mask edge. Layer styles come after all effects.

The engine reads every parameter in this table, and ignores any other:

| Effect `mn` | Display `nm` | Parameters and animation |
| --- | --- | --- |
| `ADBE Fill` | `Fill` | Animated `Color` RGB and `Opacity` 0–1 |
| `ADBE Gaussian Blur`, `ADBE Gaussian Blur 2` | `Gaussian Blur` | Animated `Blurriness` (it stops growing at about 344); static `Blur Dimensions`, `Repeat Edge Pixels` |
| `ADBE Box Blur2` | `Fast Box Blur` | Static `Blur Radius` (at most 500 pixels), whole-number `Iterations` 1 to 50, `Blur Dimensions`, `Repeat Edge Pixels` |
| `ADBE Drop Shadow` | `Drop Shadow` | Static `Shadow Color` RGB and whole-number `Shadow Only`: 0 draws the layer over its shadow, 1 the shadow alone. Animated `Opacity` 0–255 (255 opaque, 128 about half), `Direction` in degrees, `Distance` in pixels, `Softness`. |
| `ADBE Ramp` | `Gradient Ramp` | Static `Start of Ramp` and `End of Ramp` XY, `Start Color` and `End Color` RGB, `Ramp Shape`, `Ramp Scatter` (a noise amount, clamped to 0–1), `Blend With Original` |
| `ADBE Linear Wipe` | `Linear Wipe` | Animated `Transition Completion` 0–100, `Wipe Angle` in degrees, `Feather` in pixels |
| `ADBE Corner Pin` | `Corner Pin` | Animated XY `Upper Left`, `Upper Right`, `Lower Left`, `Lower Right` ([corner pins](#corner-pins)). Include all four. |
| `ADBE HUE SATURATION` | `Hue/Saturation` | Animated `Master Hue` and `Colorize Hue` in degrees, `Master Saturation` and `Master Lightness` −100–100, `Colorize Saturation` 0–100, `Colorize Lightness` −100–100; static whole-number `Colorize` 0 or 1. Master channel only: `Channel Control` is ignored. |
| `ADBE Venetian Blinds` | `Venetian Blinds` | Animated `Transition Completion` 0–100, `Direction`, `Width`, `Feather` |
| `ADBE Glo2` | `Glow` | Animated `Glow Threshold` 0–255 (153 is After Effects' 60%), `Glow Radius`, `Glow Intensity`, `Color Loops`, `Color Phase`, `A & B Midpoint` 0–1, `Color A` and `Color B` RGB; static `Glow Based On`, `Composite Original`, `Glow Operation`, `Glow Colors`, `Color Looping`, `Glow Dimensions` |
| `CC Power Pin` | `CC Power Pin` | Animated XY `Top Left`, `Top Right`, `Bottom Left`, `Bottom Right`, number `Perspective`, and edge expansion `Top`, `Left`, `Right`, `Bottom` in percent; static `Unstretch`. Include all four corners. |
| `CC Cylinder` | `CC Cylinder` | Animated `Radius (%)`, `Position X/Y/Z`, `Rotation X/Y/Z`, `Light Intensity`, `Light Color` RGB, `Light Height`, `Light Direction`, `Ambient`, `Diffuse`, `Specular`, `Roughness`, `Metal`; static `Rotation Order`, `Render` |
| `ADBE Mirror` | `Mirror` | Animated XY `Reflection Center`, `Reflection Angle` |
| `ADBE 4ColorGradient` | `4-Color Gradient` | Animated `Point 1` to `Point 4` XY, `Color 1` to `Color 4` RGB, `Blend` as After Effects' number, `Jitter` in percent, `Opacity` 0–100; static `Blending Mode` |
| `ADBE Tint` | `Tint` | Animated `Map Black To` and `Map White To` RGB, `Amount to Tint` 0–100 |
| `ADBE Simple Choker` | `Simple Choker` | Animated `Choke Matte` in signed pixels: positive contracts the matte, negative expands it. `View` does not change the output. |
| `CC Light Sweep` | `CC Light Sweep` | Animated `Center` XY, `Direction` in degrees, `Width` in pixels, `Sweep Intensity` and `Edge Intensity` in percent, `Edge Thickness` for edge-detection scale, `Light Color` RGB. Static whole-number `Shape`, `Light Reception`. The band reaches twice `Width` on each side of its line. |
| `CC Radial Blur` | `CC Radial Blur` | Animated `Amount`, `Quality`, `Center` XY; static whole-number `Type`. The match name is `CC Radial Blur`, not `ADBE Radial Blur`. |
| `CC Light Rays` | `CC Light Rays` | Animated `Intensity`, `Center` XY, `Radius`, `Warp Softness`, `Direction` in degrees, `Color from Source` and `Allow Brightening` 0 or 1, `Color` RGB; static whole-number `Shape`, `Transfer Mode` |
| `ADBE Geometry2` | `Transform` | Matched by `mn`, all animated: `ADBE Geometry2-0001` Anchor Point XY, `-0002` Position XY, `-0011` Uniform Scale, and `-0003` Scale Height and `-0004` Scale Width in percent. Also `-0005` Skew in degrees (limited to ±85), `-0006` Skew Axis and `-0007` Rotation in degrees, and `-0008` Opacity 0–100. Uniform Scale is on at 0.5 or more, and when omitted: `-0003` Scale Height then scales both axes. Shutter angle and sampling settings are ignored. |
| `ADBE Color Balance (HLS)` | `Color Balance (HLS)` | Matched by `mn`, all animated: `ADBE Color Balance (HLS)-0001` Hue in degrees, `-0002` Lightness −100–100, `-0003` Saturation −100–100 |

Author new effects from this table. Outer glow is also a [layer style](#layer-styles). Unsupported effects in existing files, and effects without `mn`, are skipped at render time, each with a warning, and the rest renders. A skipped effect can change the look: render a frame to check. For an essential look no supported effect gives, use supported shapes, a prepared raster or video, not an invented effect node.

### Effect values

A parameter marked animated is fixed with `"a": 0`. It animates with keyframes under `"a": 1`, `true`, another nonzero whole number, `null` or no `a`. A static parameter is read once, as a fixed value: write a point or color as a fixed list of numbers.

A parameter you leave out takes the engine's default, which can differ from After Effects:

| Effect | Defaults |
| --- | --- |
| Gaussian Blur, Fast Box Blur | `Repeat Edge Pixels` on (After Effects: off). Fast Box Blur: `Iterations` 3, `Blur Radius` 0. |
| Drop Shadow | `Opacity` 255, opaque (After Effects: 50%), `Direction` 135, `Distance` 5, `Softness` 0, `Shadow Only` 0 |
| Glow | `Glow Threshold` 153, `Glow Radius` 10, `Glow Intensity` 1, `A & B Midpoint` 0.5, `Glow Based On` 2 (color channels), `Composite Original` 2 (behind), `Glow Operation` add, `Glow Colors` 1 (original), `Color Looping` 3 (triangle A>B>A) |
| Fill | `Color` white, `Opacity` 1 |
| Transform | Anchor Point and Position `[0,0]`, scale 100, Uniform Scale on, Opacity 100 |
| CC Power Pin | `Perspective` 1 |
| Corner Pin, CC Power Pin | A missing corner stays within a pixel of the top left (`warnings`) |

A keyframed parameter, or a mask whose path, opacity or feather has `"a": 1`, makes the layer's whole effect stack render again every frame. The stacks of precomposition and video layers always do. Other stacks render once, which decides how they are [cropped](#effect-canvas-size).

### Effect canvas size

On image, solid, video and precomposition layers, effects run on a working canvas of at most 8192 pixels a side. That is the layer plus the room its effects add around it. Glow and Drop Shadow add room, and so do Gaussian Blur and Fast Box Blur with `Repeat Edge Pixels` off. Corner Pin, CC Power Pin and Transform grow the canvas to the box around the layer and the corners they move it to. They stop at 8192 and crop what lies past it, so they alone never go over: a blur, glow or shadow after them can. CC Light Rays adds no room on these layers. When the canvas would be larger:

- A layer not drawn axis-aligned on screen draws without any effects. That means a rotation that is not a multiple of 180 degrees. It can come from the layer, a parent, a collapsed precomposition that shows it, or a rotated or two-node camera.
- An axis-aligned layer has its effects cropped to the part that can reach the screen. Precomposition and video layers, and layers whose effect parameters or masks animate, are cropped again every frame.
- Other layers are cropped once, at the first frame they draw, so a layer that moves later can show edges without effects.
- When even the cropped part is over the limit, the layer draws without effects.

A masked layer whose source is over 4096 pixels a side always renders without effects. Blitframe warns in each case.

### Effect coordinates

Effect points are pixel coordinates, with the origin at the top left and Y down. They are the Gradient Ramp endpoints, 4-Color Gradient points, Corner Pin and CC Power Pin corners, the Transform anchor and position, Mirror's `Reflection Center`, and Light Sweep, Radial Blur and Light Rays centers.

| Layer receiving the effect | Point coordinates |
| --- | --- |
| Image, solid, video or precomposition layer | Local source pixels, before the layer's transform: a solid's `sw` × `sh` canvas, a precomposition layer's `w` × `h` |
| Text, shape or adjustment layer | Pixels of the composition containing the layer, after layer and parent transforms: inside a precomposition, its canvas, not the root's |

- On text and shape layers, Corner Pin, CC Power Pin, Mirror, CC Cylinder and Transform act on the whole containing composition, not only the content.
- Venetian Blinds bands are anchored at the layer's center on image, solid, video and precomposition layers. On text and shape layers, they are anchored at the composition's center.
- Shape-paint `gf` and `gs` endpoints stay local to their shape group: they are not effect parameters.

### Corner pins

Corner Pin maps the whole source canvas onto its four corners. For a `W` × `H` source, the unchanged Upper Left, Upper Right, Lower Left and Lower Right are `[0,0]`, `[W,0]`, `[0,H]` and `[W,H]`.

- On text and shape layers, `W` × `H` is the containing composition, even when the content fills a small part of it. Corners set to the content's bounds would shrink the whole canvas into them. Move the full-canvas corners to make the warp, and don't add a precomposition just to get identity corners.
- On an adjustment layer, the source is its rectangle on screen, so the unchanged corners are that rectangle's corners, in composition pixels.

### Effect dropdown values

Dropdown values are not layer blend modes. Preserve other existing dropdown codes unless you have a matching supported example.

| Effect | Parameter | Values |
| --- | --- | --- |
| Gaussian Blur, Fast Box Blur | `Blur Dimensions` | 1 horizontal and vertical, 2 horizontal, 3 vertical. Use one of these. |
| Gaussian Blur, Fast Box Blur | `Repeat Edge Pixels` | Whole number 0 or 1 |
| Gradient Ramp | `Ramp Shape` | 1 linear. Any other value, such as 2, is radial. |
| Gradient Ramp | `Blend With Original` | 0–1: `0` uses the gradient, `1` keeps the original image |
| 4-Color Gradient | `Blending Mode` | 1 none (the gradient replaces the layer's colors), 2 and 3 normal, 4 add, 5 multiply, 6 screen, 7 overlay, 8 soft light, 9 hard light, 10 color dodge, 11 color burn, 12 darken, 13 lighten, 14 difference, 15 exclusion, 16 hue, 17 saturation, 18 color, 19 luminosity. Others blend as normal. |
| Glow | `Glow Based On` | 1 alpha channel, 2 color channels |
| Glow | `Composite Original` | 1 on top, 2 behind, 3 or any other value none (the glow alone) |
| Glow | `Glow Colors` | 1 original colors, 2 A & B colors. 3 (arbitrary map) renders as A & B, with a warning. |
| Glow | `Color Looping` | 1 sawtooth A>B, 2 sawtooth B>A, 3 triangle A>B>A, 4 triangle B>A>B |
| Glow | `Glow Dimensions` | The `Blur Dimensions` values 1 to 3 |
| Glow | `Glow Operation` | Only when `Composite Original` is 2 (behind): 1 and 2 normal, 3 add, 4 multiply, 5 screen, 6 overlay, 7 soft light, 8 hard light, 9 linear dodge, 10 and 11 color dodge, 12 linear burn, 13 and 14 color burn, 15 darken, 16 lighten, 17 and 18 difference, 19 exclusion, 20 hue, 21 saturation, 22 color, 23 luminosity. Others add. |
| CC Light Sweep | `Shape` | 1 linear, 2 smooth, 3 sharp; others linear |
| CC Light Sweep | `Light Reception` | 1 add, 2 composite, 3 cutout; others add |
| CC Light Sweep | `Direction` | Turns the band's normal (across its width), not the visible stripe: `0` gives a vertical stripe, `90` a horizontal one. Choose the angle, and animate `Center` in the layer's [effect coordinates](#effect-coordinates), for the highlight you want. |
| CC Light Rays | `Shape` | 1 round, 2 square |
| CC Light Rays | `Transfer Mode` | 1 none, 2 add, 3 lighten, 4 screen |
| CC Radial Blur | `Type` | 1 straight zoom, 2 fading zoom, 3 centered zoom, 5 rotate, 6 scratch, 7 rotate fading. 4 renders as 1, and values outside 1–7 are clamped. |
| CC Radial Blur | `Amount`, `Quality` | `Amount` sets pixel displacement. `Quality` sets sampling density together with the amount, not an exact sample count. |

### Edge cases

- A `bm` that is not a whole number from 0 to 26 is misread, usually as normal (`warnings`).
- Keyframes on a parameter marked animated are dropped under `0`, `false`, a decimal such as `1.0` or a non-number. So is an `"a": 1` whose `k` holds no keyframes. Each has a warning.
- A static parameter that is keyframed, or a whole-number setting written with a decimal point such as `1.0`, is misread. Each has a warning. A keyframed `Glow Based On` keeps its first key.
- A point or color that is keyframed, has too few numbers or is not a list is misread, not always with a warning.
- A parameter that appears twice is applied each time, so the last fixed value wins.
- `Blur Dimensions` or `Glow Dimensions` outside 1 to 3 runs no blur, and leaves undefined pixels.
- `Color Looping` outside 1 to 4 draws as 4, triangle B>A>B.
- Fast Box Blur `Iterations` over 50 renders as 50 (`warnings`).
- A negative Gaussian `Blurriness` reads as 0.
- Transform `Uniform Scale` from 0.01 to 0.49 reads as off.
- Hue/Saturation `Channel Control` other than 1 is in `warnings`.
- CC Light Sweep `Shape` or `Light Reception` above 3 is in `warnings`.

Effects the engine cannot read at all are reported in `problems`, which name the layer, effect and field. Only the precompositions a layer uses are checked:

- an `ef` that is not a list of effect objects, such as `"ef":5`, `"ef":[5]` or a single effect object
- an `mn` or parameter `nm` that is not text
- a parameter list `ef` that is not a list of objects
- a parameter `v` that is not a `{"a":…,"k":…}` object of the right kind, such as `"v":5`, or a static point or color whose `k` is a number or empty list
- keyframes on Glow's `Glow Based On` whose `s` values are bare numbers
