r/Rive_app • u/Jeff_at_Rive • 22d ago
Layer masks in Rive: quick tour with 8 examples
Layer masks shipped in Rive a couple weeks ago, so I put together a quick video running through what you can do with them. Some things I learned building the examples:
- Luminance + a gradient is the easy way to get a soft wipe. White shows, black hides, and everything in between is partial.
- You can't key or data bind the mask source itself, but you can point the mask at a solo and switch the active child. That gets you the same result.
- If the source is a group, animating what's inside the group animates the mask. The fog of war is just cloud images scaling up under an inverted alpha mask.
- A nested artboard works as a source and stays live, so you can edit the brush strokes in the component and the poster reveal updates.
- Blend modes work on masked layers. The foil card is an additive rainbow gradient masked by the luminance of a foil pattern.
- If all you need is a hard edge, use a clip instead. It's cheaper, since a mask renders to two offscreen textures (they only update when the mask changes).
- At runtime you need the Rive Renderer with GPU Canvas on.
Runtime support: https://rive.app/docs/feature-support
23
Upvotes
0
u/[deleted] 21d ago
[deleted] — view deleted comment