Layer Masks in Rive: Alpha, Luminance, Gradients and More
A layer mask hides or shows a layer using the pixels of another layer. Because it reads pixels instead of a path, the mask can be soft, a gradient, text, an image, or even a live artboard.
In this video I run through how to add a mask, the four mask types, and a bunch of quick examples: gradient wipes, a flashlight, an ink splatter photo, a worn stamp, a fog of war, a self-painting poster, a holographic foil card, and a data-bound before/after slider.
Chapters
0:00 What a layer mask is
0:16 Adding a mask + the 4 mask types (Alpha, Inverted Alpha, Luminance, Inverted Luminance)
1:02 Draw Source
1:08 Gradient masks for soft transitions
1:24 Flashlight effect
1:36 Using an image as the mask
1:50 Grunge texture on vector art
2:03 Keying masking on the timeline
2:10 Animating a group as the source (fog of war)
2:30 A nested artboard as the source
2:43 Blend modes on masked layers
2:58 Data binding mask properties
3:12 Swapping the source with a solo
3:26 Masks vs clipping
3:47 Performance
3:59 Wrap up
Heads up for runtimes: layer masks need the Rive Renderer with GPU Canvas enabled. Check the feature support page for minimum versions.
Feature support: https://rive.app/docs/feature-support
Clipping: https://rive.app/docs/editor/manipulating-shapes/clipping
Solos: https://rive.app/docs/editor/manipulating-shapes/solos
Data binding: https://rive.app/docs/editor/data-binding/overview
Layer masks release notes: https://community.rive.app/c/announcements/rive-editor-0-9-460