Effects and scripts

Bring a still picture to life with smoke, fire or glow, add GPU shader effects to your art, soften edges into glows and shadows, or draw with a script.

You bring
A picture, or a Rive file to add an effect to.
You get
A .riv; for shader effects and scripts, a Rive project built by Rive's own tool.
Needs
Animated stills need the npm install. Shader effects and AnimaScript are built with Rive's command-line tool.

Ask your assistant

  • Make smoke curl around the wizard in wizard.png, as a seamless loop.
  • Add a glow that pulses on the bright parts of crystal.png.
  • Make my logo dissolve away with a shader effect.
  • Give the card a soft drop shadow.
  • Write an AnimaScript that draws a field of twinkling stars.

Smoke, fire and glow on a still

animate_still_image removes the picture's background, finds the figure, and generates the effect frame by frame, with smoke and fire passing both in front of the figure and behind it. The loop is seamless. Smoke takes its colours from the picture's own edges; fire rises in warm colours; glow pulses the bright, saturated parts.

Soft edges: glows, blurs and shadows

set_feather softens a shape's fill or outline: a glow, a blur, or offset, a drop shadow. It is drawn by Rive's GPU renderer, the one apps use.

GPU shader effects

add_shader_effect writes a ready-to-build Rive project for one of nine effects, applied to your own picture or a demo shape: glow, outline, drop shadow, dissolve, ripple, grain, wipe, chromatic aberration and pixelate. Every setting can be keyed on a timeline or bound to a view model. With Rive's command-line tool installed, it is also checked, built and captured on your computer. inspect_shader_targets says which runtimes and graphics systems a built file's shaders can draw on.

A shader build made this way is unsigned. It plays in Rive's own tool, but apps run its effect only after it is signed with rive --publish, which needs a Rive account.

Scripts: AnimaScript

build_anima_drawable turns AnimaScript, Rive's TypeScript-like language, into a runnable .riv, built on your computer with no login and no signing. It is the one kind of script Rive's own players run unsigned: the web runtimes from 2.44.1 on, and native runtimes that run AnimaScript. Ask for a preview of its first frame.

Rive's Luau scripts are different: Polymation writes their source and checks it (validate_script), but Rive compiles and signs them, which needs the Rive editor and a paid plan.

Related