Ymotion
Help
Dashboard
All pages

Guides

Effects, blur and layer styles

Blurs, distortions, glow and strobe, layer styles, blend modes and motion blur: what each does, what it costs and how to animate it.

After Effects keeps everything under one Effect menu. Ymotion splits the same ground into a few places on a layer, and knowing which is which makes the rest easy:

  • Filters are the ordered stack that also holds colour. Every blur, distortion and stylise filter lives here, 42 filters in all. Colour and grading covers the colour half.
  • Effects draw something extra alongside the layer or change how it's drawn: a glow and a strobe, 2 in all.
  • Layer styles are a stroke and a drop shadow taken from the outline of whatever the layer draws.
  • Blend modes and motion blur decide how a layer meets what's under it and how it smears as it moves.

ymotion_find {"catalogue":"filters"} and ymotion_find {"catalogue":"effects"} list what's available, and asking for one by id, as in ymotion_find {"catalogue":"effects","id":"glow"}, gives every knob with its range, default and step.

Adding, adjusting and animating

Filters and effects work the same way. addFilter and addEffect append to the end of their stack, with an amount and any knobs you want to set:

ymotion_edit {"label":"glow","ops":[{"verb":"addEffect","args":{"layerId":"<layer id>","id":"glow","amount":1,"params":{"radius":0.03,"strength":1}}}]}

A visual effect defaults to amount 0.5. A filter uses its own new-row amount and knobs; the catalogue's add call supplies them explicitly. At an amount of 0 a row stays in place and changes nothing.

Every knob is declared, so every knob has a path you can set or key: effects.0.amount, effects.0.params.radius, filters.1.params.angle. An effect also has effects.0.speed, which multiplies its tempo. Set one knob with setParam, naming the stack with what:

ymotion_edit {"ops":[{"verb":"setParam","args":{"layerId":"<layer id>","what":"effects","index":0,"param":"strength","value":0.8}}]}

Animate them like any property. Here the glow's reach breathes out over two seconds:

ymotion_edit {"ops":[{"verb":"keyRamp","args":{"layerId":"<layer id>","path":"effects.0.params.radius","from":0.01,"to":0.05,"opts":{"start":0,"end":2,"ease":"sineInOut"}}}]}

ymotion_read {"what":"properties","layerId":"<layer id>"} lists the filled-in paths for every row on a layer. The row verbs mirror After Effects' Effect Controls, and each takes "what":"filters" or "what":"effects" where it applies to both:

  • moveFilter and moveEffect reorder, and removeFilterAt and removeEffectAt remove one row; keys travel with their row. removeEffect removes every row of an id with its keys and carries later keys. clearEffects removes the whole effect stack and all its keys, so an effect added afterwards starts with its own settings.
  • setEffectEnabled is the fx switch. Off keeps the settings and keys, so you can compare with and without.
  • duplicateEffect copies a row with its keys, and resetEffect restores the static amount, knobs and tempo to the new-row defaults, preserving the row and fx switch.

Blurs

There are three blurs, and they differ most in what they cost. The catalogue files the Gaussian blur under Light and the other two under Blur.

  • blur is a Gaussian blur. Its size (the Gaussian's sigma) is amount × reach of the frame's short edge, with reach 0.05 by default, so an amount of 0.5 is a sigma of 2.5% of the short edge, a strong defocus. It's built from box passes, so a wide blur costs little more than a narrow one. Use it for defocus, separating a background from type, or softening a plate.
  • directionalBlur smears along an angle in degrees, by a length of up to 1% of the short edge. Its cost grows with the length, which is why the range stops there: enough for a speed streak, not a long smear.
  • lensBlur imitates a camera iris, with a radius of up to 0.5% of the short edge, a number of iris blades, and a boost that brightens highlights into bokeh. Its cost grows with the square of the radius, so the range is small. The bokehRack preset keys it into a focus pull.
ymotion_edit {"ops":[{"verb":"addFilter","args":{"layerId":"<layer id>","id":"blur","amount":0.5,"params":{"reach":0.05}}}]}

The Gaussian blur works on the area its layer covers, grown by how far the blur spreads, rather than on the whole frame, so blurring a caption is far cheaper than blurring full-frame footage. The directional and lens blurs don't grow it yet: on a layer that doesn't fill the frame they stop at the edge of what it drew, so they soften footage but leave a title's outline sharp. sharpen, an unsharp mask with gain and radius (a fraction of the short edge, as blur's reach is), sits beside blur in the Light group. For blur that runs through type a character at a time, use a text animator's blur; see Text animators and presets.

Distortions and stylise

Six filters move pixels rather than recolour them. Centres such as cx and cy are fractions of the frame from its top-left corner, and lengths are fractions of the short edge (a motionTile's tile size is a fraction of the frame's width and height), so each one draws the same picture at any frame size.

They work across the whole frame rather than the layer's own box. A bulge or a twirl affects whatever part of the layer sits under its centre and radius, and a warp bends across the full width or height of the frame, so on a small layer such as a title it shifts the layer as well as curving it. Render a frame to judge the result.

  • bulge swells or, with a negative height, pinches a round area.
  • twirl turns pixels about a centre by angle degrees, fading to nothing at its radius.
  • waveWarp ripples the layer. shape picks sine, square, triangle or noise (0 to 3), and speed is waves a second, so it moves by itself.
  • turbulentDisplace pushes pixels around with fractal noise. Keying evolution slides the noise sideways, one size for every 360 degrees, as keying offsetX does, rather than churning it in place; a rising offsetY lifts it. Its cost grows with complexity, so raise that only as far as you can see a difference. The heatHaze preset is built on it.
  • motionTile repeats the layer in tiles, optionally mirrored, with a brick offset from phase.
  • warp bends the layer into an arc, bulge, flag or wave (style 0 to 3) along either axis.

findEdges, posterize and threshold make up the Stylise group.

Glow and strobe

glow draws a blurred Screen copy under the sharp copy. Screen combines those copies locally; the finished layer then meets the backdrop using its own blend. A filter, layer style, soft mask, matte or motion blur assembles the same local result first, preserving that order. The blur is amount × radius of the short edge, the copy's opacity is amount × strength, and spread scales the copy about the content center rather than the layer's chosen anchor. Off-center type therefore keeps its glow; footage uses its cropped source-box center. The scale is still 1 + amount × spread. Bright colours on a dark ground glow best; a starting point for neon type is an amount of 1, a radius of 0.03 and a strength of 1.

strobe flashes a layer. freq is flashes a second, ramp adds more flashes as the amount rises, and duty is the fraction of each cycle it stays on. While it's off the layer drops to 1 − amount opacity.

Effects that move a layer, such as a camera shake, are keyframes in Ymotion rather than effects: a wiggle on position, or the shake and handheld presets, which write one for you. See Keyframes and easing.

Layer styles

Layer styles are After Effects' Stroke and Drop Shadow. They're taken from the outline of everything a layer draws, so a still, a video and a solid can wear them, and touching letters share one outline. Their sizes are fractions of the short edge.

  • A stroke has a size, an alignment (outside, inside or centre), a paint, an opacity and its own blend mode.
  • A drop shadow has a distance, a size (its softness), a spread that thickens it before it's softened, a paint and a blend mode. It falls away from the composition's light, which comes from 120 degrees (the upper left) unless you change it with setCanvas and {"patch":{"light":{"angle":135}}}. A layer inside a nested composition takes that composition's own light, and a template's card shadow carries its own, from 90 degrees.

No verb writes a style directly. The text looks add them — applyPreset with a preset from Text › Looks, such as textOutline or textShadow — and so do templates and the editor's panel. Once a layer has one, its numbers appear in ymotion_read {"what":"properties","layerId":"<layer id>"} and key like any other: styles.stroke.size, styles.stroke.opacity, styles.dropShadow.distance, styles.dropShadow.size and styles.dropShadow.spread with keyOn or keyRamp, and the two colours, styles.stroke.paint and styles.dropShadow.paint, with keyPaint or paintRamp.

styles.fillOpacity, After Effects' Fill Opacity, is listed on every layer and can be set and keyed. It fades the layer's own pixels and leaves its styles at full strength, so at 0 with a stroke style the letters go hollow — the textHollow look is exactly that.

For the same looks without a style, type has its own outline and shadow through setTextStyle (see Type and titles), a shape has its own stroke (see Shapes, icons, masks and mattes), and glow lights anything.

Blend modes

A blend mode decides how a layer's pixels combine with what's beneath them:

normal, multiply, screen, overlay, darken, lighten, color-dodge, color-burn, hard-light, soft-light, difference, exclusion, hue, saturation, color, luminosity, add

The ones you'll reach for most:

  • screen and add brighten, and black disappears. Use them for light leaks, flares and glows shot on black.
  • multiply darkens, and white disappears. Use it for shadows and for paper or grunge textures.
  • overlay and soft-light add a texture's contrast without flattening the colour beneath.
  • color, hue, saturation and luminosity take one quality of a layer and keep the rest from below.

A layer's own blend mode is set in the editor. Through ymotion_edit you set it on a track with setTrackBlend, and every layer on that track whose own mode is normal uses the track's. So give the layer a track of its own: addTrack with above puts a new track directly above the one you name, and moveLayer with toTrackId moves a layer onto it. moveLayer also takes the layer's start, so pass the start it already has to keep it where it is in time.

ymotion_edit {"ops":[{"verb":"moveLayer","args":{"layerId":"<layer id>","start":0,"toTrackId":"<track id>"}},{"verb":"setTrackBlend","args":{"id":"<track id>","blend":"screen"}}]}

setTrackOpacity dims a whole track the same way.

Motion blur

Motion blur averages several moments across a virtual shutter, so fast moves smear the way they do on camera. It's switched on per layer in the editor, and there's no verb for the switch. Once it's on, motionBlur.shutter (degrees, 180 being the film default), motionBlur.phase and motionBlur.samples are ordinary properties, and setCanvas with {"patch":{"motionBlur":{"shutter":180}}} sets the film's defaults. A placed composition's enabled inner layers use its own shutter and frame rate on its own timeline; a placing layer can also blur the finished comp. Each sample is another drawing of the layer, so its cost grows with samples and nesting. Keyframes and easing has more.

Good to know

  • Order matters within a stack: grain placed after a blur stays sharp, and grain placed before it is softened.
  • A switched-off row and a row at amount 0 both draw nothing, but the switch keeps the amount you had.
  • resetEffect doesn't remove keys: a keyed amount or knob goes on following its keys. The verb has no current-time argument, so it resets only static controls; it does not invent a default-valued key at a playhead.
  • A keyed Gaussian blur (and a glow's blur) changes in small steps rather than perfectly smoothly, because past about 1.4 pixels its size is built from whole-pixel box passes. A slow ramp on a small blur can show the steps; a quicker ramp or a larger blur hides them.
  • A preview at 1080 pixels is the same picture as the export: every length a filter works in is a fraction of the frame, sharpen's radius (a fraction of the short edge) among them, and grain and findEdges work at a 1080th of the short edge, so a 4K export is the same grain and the same edges with more pixels.

See also