Skip to main content
Version: Next

Effects

Effects were introduced in Replay format v3.3.0. Every visual layer (image, text, shape, group, video, visual) carries an ordered effect stack at props.effects. Audio layers do not support effects.

The array order is the apply order: the first effect in the array is applied first, and each subsequent effect is applied on top of the previous result.

info

A replay created before v3.3.0 has no effects property. The migration from v3.2.0 to v3.3.0 adds an empty effect stack ([]) to every visual layer (including fallback layers and layers added by actions), so no effect is applied until one is added. Downgrading from v3.3.0 to v3.2.0 only lowers the format version — the effects property is left in place for forward compatibility.

Design: a typed, format-owned catalog

An effect shares the same envelope as an animation — uuid, id, renderer — but, unlike the open animation payload, the effect catalog is closed and fully typed by the format. IReplayEffect is a discriminated union of one named interface per effect (IReplayLutEffect, IReplayGaussianBlurEffect, …); the id field is the discriminant, and each variant declares its own typed params and its own mask capability.

What the format guarantees:

  • Envelope — every effect has a uuid (instance identity), an id (the effect kind — the discriminant a renderer dispatches on), and a renderer reference. Effect stacks are ordered arrays on visual layers.
  • Typed params — each effect kind declares exactly which parameters it accepts, their value types, ranges, enum options and defaults. Params are flat and independent — no parameter's presence depends on another's value. Narrowing an IReplayEffect by its id yields the exact params shape for that kind. Some effects have no params at all.
  • A first-class mask vocabulary — masking is defined by the format, not by a renderer. Each effect declares its mask capability: an optional compositing mask, no mask, or a segment mask that is the operation.
  • Unknown effects — a reader that does not recognize an id (e.g. a newer effect kind) skips that effect rather than failing the replay.

The renderer defaults to the built-in system effects package (system.effects, version 1.0.0), but any effect can name a different implementation.

IReplayLayerEffects

Implementation.

import type { IReplayLayerEffects } from '@picsart/web-replay-sdk';

This interface describes the effects property mixed into every visual layer's props.

PropertyTypeRequiredDescription
effectsIReplayLayerProperty<IReplayEffect[]>yesThe layer's ordered effect stack, carried as a wrapped layer property (so it can be locked and hold meta, and be step-changed across keyframes). Array order is apply order. Defaults to []

IReplayEffect

Implementation.

import type { IReplayEffect } from '@picsart/web-replay-sdk';

IReplayEffect is the discriminated union of every effect kind. Every variant extends the shared envelope below and adds its own id, params and mask. Narrow by id to get a variant's exact shape.

Envelope

PropertyTypeRequiredDescription
uuidUUIDStringyesThe instance identity — unique per effect in a stack. Two effects of the same kind have different uuids
idstringyesThe effect kind and the union discriminant (e.g. gaussian_blur). One of the catalog ids. Not unique within a stack
rendererIRendereryesThe renderer package that owns this effect and the version that reads its params. Defaults to { packageId: "system.effects", version: "1.0.0" }
paramsobjectper kindThe typed parameters for this effect kind. Absent for effects that take none (e.g. remove_segment). See each kind below
maskIReplayEffectMask | IReplaySegmentMaskper kindRestricts where the effect applies. Optional, absent, or required depending on the effect's mask capability
uuid vs id

uuid answers which one (instance identity — used to reference, reorder or update a specific effect). id answers what kind. renderer.packageId picks the engine, id picks the effect within it.

Effect catalog

The format defines the following effect kinds. Mask shows the effect's mask capability: optional = an IReplayEffectMask may be attached, none = the effect takes no mask, required = a IReplaySegmentMask must be attached (the mask defines the operation). Defaults are the values createReplayEffect fills in, and the full scheme (defaults, ranges, options, usable masks) is served at runtime by getEffectCatalog.

idparamsMask
adjustfade, brightness, contrast, saturation, hueoptional
black_whitefadeoptional
face_hidefade, padding, smoothing, texturenone
film_grainfade, intensity, size, seedMode, seedoptional
gaussian_blurfade, bluroptional
glitchfade, intensity, seedMode, seedoptional
lutfade, preset, resourceoptional
negativefadeoptional
page_curlfade, progressnone
pixelatefade, pixelSizeoptional
remove_segment(none)required
vhsfade, chromaShift, scanlines, noise, rolling, seedMode, seedoptional
vintage_filmfade, grain, vignette, seedMode, seedoptional

Numeric ranges below are the engine's validation bounds. fade (present on every effect that has params) is the dry/wet mix in the range 0100: 0 = effect fully applied, 100 = original untouched. Other numeric params have their own ranges (shown per effect); many strength params are 01.

adjust

Tone adjustments. params:

ParamTypeMinMaxDefaultDescription
fadenumber01000Dry/wet mix — 0 = full effect, 100 = original
brightnessnumber-110Bipolar; 0 = no change
contrastnumber-110Bipolar; 0 = no change
saturationnumber-110Bipolar; 0 = no change
huenumber-110Hue rotation; maps to -180°180°

black_white

Desaturates to grayscale. params:

ParamTypeMinMaxDefaultDescription
fadenumber01000Dry/wet mix. Inverted for this effect: 0 = full grayscale, 100 = original color

face_hide

Covers detected faces with a texture. Mask capability: none. params:

ParamTypeMinMaxDefaultDescription
fadenumber01000Dry/wet mix — 0 = full effect, 100 = original
paddingnumber-901000Padding around each detected face (may be negative to inset)
smoothingnumber010.3Edge feathering of the cover
textureIReplayEffectResource— (required)The image drawn over each face (.png/.webp/.jpg)

film_grain

Adds film grain. Seeded. params:

ParamTypeMinMaxDefaultDescription
fadenumber01000Dry/wet mix — 0 = full effect, 100 = original
intensitynumber010.5Grain strength
sizenumber1101Grain size
seedMode'rolling' | 'fixed'rollingGrain randomness control — see Seeded effects
seednumber01000Frozen randomness value; used when seedMode is fixed

gaussian_blur

Gaussian blur. params:

ParamTypeMinMaxDefaultDescription
fadenumber01000Dry/wet mix — 0 = full effect, 100 = original
blurnumber010020Blur radius in pixels

glitch

Digital glitch. Seeded. params:

ParamTypeMinMaxDefaultDescription
fadenumber01000Dry/wet mix — 0 = full effect, 100 = original
intensitynumber010.5Glitch strength
seedMode'rolling' | 'fixed'rollingGlitch randomness control — see Seeded effects
seednumber01000Frozen randomness value; used when seedMode is fixed

lut

Applies a color LUT — a built-in preset, or an external .cube resource that overrides the preset when present. params:

ParamTypeMinMaxDefaultDescription
fadenumber01000Dry/wet mix — 0 = full effect, 100 = original
presetIReplayLutPresetgolden_hourA built-in LUT preset
resourceIReplayEffectResource— (optional)An external .cube LUT; when present it overrides preset. Not yet implemented by the system.effects engine — see note below
note

Custom LUTs via resource are part of the format type but the system.effects engine does not render them yet — only the built-in preset LUTs are currently supported. Until custom LUTs ship, use preset.

LUT presets

golden_hour, airy_pastel, arctic_blue, autumn_glow, bleach_bypass, clean_bright, cold_neon, cool_blue, creamy_portrait, cross_process, crushed_contrast, dark_academia, emerald_forest, faded_film, instant_fade, kodachrome_vibe, moody_noir, neon_cyberpunk, silver_bw, symmetric_pastel, teal_orange, tropical_saturated, tungsten_night, vhs_retro, warm_sunset, lut_1972.

negative

Inverts colors. params:

ParamTypeMinMaxDefaultDescription
fadenumber01000Dry/wet mix — 0 = full effect, 100 = original

page_curl

Page-curl transition. Mask capability: none. params:

ParamTypeMinMaxDefaultDescription
fadenumber01000Dry/wet mix — 0 = full effect, 100 = original
progressnumber010Curl progress

pixelate

Pixelation. params:

ParamTypeMinMaxDefaultDescription
fadenumber01000Dry/wet mix — 0 = full effect, 100 = original
pixelSizenumber110020Pixel block size

remove_segment

Removes the masked region. The segment mask is the operation, so mask is required and there are no params.

{
"uuid": "e5f6a7b8-0000-4000-8000-000000000003",
"id": "remove_segment",
"renderer": { "packageId": "system.effects", "version": "1.0.0" },
"mask": { "provider": "scene", "segments": ["person"], "invert": false }
}

vhs

VHS look. Seeded. params:

ParamTypeMinMaxDefaultDescription
fadenumber01000Dry/wet mix — 0 = full effect, 100 = original
chromaShiftnumber010.5Chroma / color-channel shift
scanlinesnumber010.5Scanline strength
noisenumber010.3Noise amount
rollingnumber010.3Rolling-distortion amount
seedMode'rolling' | 'fixed'rollingNoise randomness control — see Seeded effects
seednumber01000Frozen randomness value; used when seedMode is fixed

vintage_film

Vintage film look. Seeded. params:

ParamTypeMinMaxDefaultDescription
fadenumber01000Dry/wet mix — 0 = full effect, 100 = original
grainnumber010.5Grain amount
vignettenumber010.5Vignette strength
seedMode'rolling' | 'fixed'rollingGrain/noise randomness control — see Seeded effects
seednumber01000Frozen randomness value; used when seedMode is fixed

Seeded effects

Noise-based effects (film_grain, glitch, vhs, vintage_film) carry a seed control in their params — two plain, independent parameters:

ParamDefaultBehavior
seedMode: 'rolling'✓ (default)Randomness is re-rolled every frame; seed is ignored
seedMode: 'fixed'Randomness is frozen at seed (0100), so the effect is deterministic across frames and renders
{ "seedMode": "rolling", "seed": 0 }
{ "seedMode": "fixed", "seed": 42 }

Masks

A mask restricts where an effect applies, selecting one or more segments produced by a segmentation provider. segments must be non-empty, and invert flips the selection (apply to everything except the segments).

providerSegments
portraitbackground, hair, body_skin, face_skin, clothes, accessories
scenebackground, airplane, bicycle, bird, boat, bottle, bus, car, cat, chair, cow, table, dog, horse, motorcycle, person, plant, sheep, sofa, train, tv

There are two mask shapes, distinguished by whether the mask composites around an effect or defines the operation itself.

IReplayEffectMask

A compositing mask, used by effects whose mask is optional (adjust, black_white, film_grain, gaussian_blur, glitch, lut, negative, pixelate, vhs, vintage_film). Because the effect runs and then composites against the mask, ordering matters — hence mode.

PropertyTypeRequiredDescription
provider'portrait' | 'scene'yesThe segmentation source
segmentsstring[]yesNon-empty list of segments (from the provider's set above)
invertbooleanyesApply to everything except the selected segments
modeIReplayMaskModeyesWhether the mask is applied before or after the effect

IReplayMaskMode

ValueDescription
BeforeEffectThe mask is applied to the input, then the effect runs on the masked region
AfterEffectThe effect runs on the full frame, then the mask composites the result back
{
"uuid": "b1e2c3d4-0000-4000-8000-000000000001",
"id": "gaussian_blur",
"renderer": { "packageId": "system.effects", "version": "1.0.0" },
"params": { "fade": 0, "blur": 20 },
"mask": { "provider": "portrait", "segments": ["background"], "invert": false, "mode": "AfterEffect" }
}

IReplaySegmentMask

An operation mask, used only by remove_segment, where the mask is the operation. It has no mode (there is no effect-vs-mask ordering to choose).

PropertyTypeRequiredDescription
provider'portrait' | 'scene'yesThe segmentation source
segmentsstring[]yesNon-empty list of segments
invertbooleanyesOperate on everything except the selected segments

Creating effects

The web SDK provides a typed builder — createReplayEffect — that stamps the uuid, defaults the renderer to system.effects, and fills each effect kind's default params so you pass only what you set. params is typed by id: an unknown param, a wrong value type, or a missing no-default param (like face_hide's texture) is a compile error.

import { createReplayEffect } from '@picsart/web-replay-sdk/context';

// params fully defaulted → pass nothing
const negative = createReplayEffect({ id: 'negative' });

// override only what you need
const blur = createReplayEffect({ id: 'gaussian_blur', params: { blur: 40 } });

// freeze a seeded effect's randomness
const grain = createReplayEffect({
id: 'film_grain',
params: { intensity: 0.7, seedMode: 'fixed', seed: 42 },
});

const teal = createReplayEffect({ id: 'lut', params: { preset: 'teal_orange' } });

// remove_segment: no params, mask required
const cutout = createReplayEffect({
id: 'remove_segment',
mask: { provider: 'scene', segments: ['person'], invert: false },
});

Effects are passed to layer creators via props.effects (apply order = array order):

const layer = createReplayImageLayer({
name: 'photo',
mediaType: 'IMAGE',
props: { image, effects: [blur, negative] },
});

To drive an effects UI (sliders from ranges, dropdowns from options, mask pickers from providers), the SDK serves the whole catalog as plain data via getEffectCatalog.

Evolution and compatibility

  • The effect catalog, params and mask vocabulary are part of the format. Adding a new effect kind, a new parameter, or a new mask segment is a format change and travels with meta.replayVersion and the migration pipeline.
  • Readers narrow an effect by its id. An unrecognized id (from a newer format) is skipped, not fatal.
  • renderer.version identifies the implementation that draws an effect; it does not redefine the params — those are format-owned.