DocsGRADEGrading

Masks

34 min read

On this page

A mask decides where a node applies, its colour and its effects: only the sky, only the character, the tops of the rocks, the shadows, an area you painted. Each node has a mask stack: a base mask plus any number of extra components combined like the layer masks of a photo editor, with density, feather, expand and clipping, and scene masks that understand the 3D level.

A node's mask limits everything the node does: its colour adjustments and, by default, its effects too (an Aurora on a node masked to the sky stays in that part of the sky). See Masks limit effects too.

Your first mask

  1. Select a node in the Nodes panel and open the Mask tab (key 7). Faster: click the small mask thumbnail on the node's card, or Ctrl + click the card.
  2. Press + Add Mask and pick a type, for example Radial (a soft ellipse) or Objects / Actors (the actors selected in the level).
  3. Shape it: drag the handles on the canvas, or set the values in the panel. The node's colour and its effects now apply only inside the mask: the canvas shows the selection in red.
  4. Press 2 (or \) to see the mask in black and white: white = the node applies, black = the node leaves the image alone. 1 goes back to the red overlay.
  5. Add more components with + Add Mask and choose how each one combines (Add, Subtract, Intersect, Difference). Soften the result with Feather, grow or shrink it with Expand, fade it with Density.

Nothing needs to be applied or saved: every change is in the node at once and is one undo step (Ctrl+Z).

Masks limit effects too

A node's mask limits the node's effects as well as its colour. Put the Aurora effect on a node with a Linear mask over part of the sky and the aurora shows only there; a Painted World node with an Objects / Actors mask paints only the character; a blur or a glow on a node with a Radial mask stays inside the spot.

  • How it works. Each effect the node supplies runs as usual, then GRADE mixes its result with the image that entered it through the node's final mask: Out = lerp(In, Effect, Effect opacity x Mask). White = the full effect, black = the image as it was before the effect, grey = in between. The final mask is the whole stack: every component, Density, Feather, Expand and clipping, the same mask the Overlay / B&W view shows in the viewport. The node's Opacity keeps fading the effect's strength as before (it is not applied a second time).
  • Also limit effects (Mask tab > Whole Mask, on by default) switches it per node. Off: the node's effects cover the whole frame and the mask limits only its colour. While it is off and the node has effects turned on, the Mask tab shows the amber hint This node's effects ignore the mask, and the tooltip of the node's mask thumbnail in the Nodes panel says that the mask limits its colour only. From Blueprint: the layer parameter MaskEffects (Set Layer Parameter) or the field FGradeLayer::bMaskEffects.
  • Nothing to limit: with Mask enabled off, Density 0 % or an empty mask, the node's effects cover the whole frame.
  • Which mask. Effects do not stack like colour: for each effect the top-most enabled node supplies it (see How effects blend), and the mask of that node limits it. To limit two effects with two different masks, put them on two nodes. When volumes blend, each effect keeps the mask of the node that supplies it.
  • Where it works: live views, Play In Editor, games, Movie Render Queue, captures, gameplay pulses and Image mode (where scene components count as full, as they do for the colour).
  • Chromatic Aberration, Sharpen and Soften keep their own effect mask too: both apply. Echo Trail and Pixel Stretch choose their subject inside the effect; a node mask then only cuts where their trails and streaks show.

Effects that always cover the whole frame

These effects act on the frame as a whole, so their node's mask is ignored whatever Also limit effects says:

EffectWhy
Camera ShakeIt moves the whole picture: a masked shake would tear it apart.
Camera TransitionIt replaces the frame.
Aspect RatioBars along the edges of the frame.
Camera FrameA viewfinder layout over the frame.
Frames, Logo & StickersPlaced on the screen.
BodycamA camera HUD and shake.
HUD Targets & CensorIts boxes and censors already follow their actors.
Diegetic UIAn interface drawn over the screen.

Good to know

  • Scene effects read the mask from the scene light. Effects of the Scene stage (Aurora, Fog Gradient, Ambient Occlusion, Weather, Relight...) run on scene-linear HDR light before the tonemapper, so their mask is evaluated from the scene colour at that point. Luminance Range and Color Range components see linear values clamped to 0..1 there and can select a little differently than for the node's colour; shapes, paint, textures and scene masks select exactly the same. Pre Colour and Post Colour effects read the same image as the colour masks (the image entering the node stack).
  • Overlapping soft masks compound. Each masked effect is mixed on its own, so where the soft edges of two nodes' masks overlap, the second effect works on an image that already holds part of the first. Hard edges are not affected.
  • A masked Lens Bloom runs after the tonemapper. Without a mask Lens Bloom runs on scene-linear light before the engine bloom; with a node mask it runs on the display image instead (as in Image mode), where the mask can apply, so its glow can look slightly different. Replace Engine Bloom still turns the engine bloom off on the whole frame: turn it off to keep the engine bloom outside the mask.
  • A masked Screen Space Bevel is always relit: the GBuffer normals bent before lighting cannot take a mask, so the Relit path runs and is mixed through the mask.
  • Cost. Nothing while no masked node has effects. Otherwise each node mask that limits an effect is evaluated once per chain (about the cost of an advanced mask, see Limits) and every masked effect gets one full-resolution mix pass, like an effect opacity below 100 %. Effects that share a pass are split around effects masked by another node. Masks of scene effects are evaluated at render resolution, the others at output resolution. GPU stat: GRADE Effect Masks.
  • Look blends switch Also limit effects at the halfway point.

How a mask stack works

A node's mask is a list of components, read from top to bottom:

  • The base (the first row, marked BASE) is the starting selection. The first mask you add to a node becomes its base.
  • Every component below it changes the selection so far with its operation and its opacity.
  • Each component has its own eye (switch it off without deleting it), its own Invert (applied before the operation) and its own settings. Drag rows to reorder them; the base stays first. Deleting the base promotes the next component.
  • The result then goes through the node-wide settings Feather, Expand and Density, and finally clipping.
A mask stack on one node: a Radial base, the subject subtracted and world noise intersected
A mask stack on one node: a Radial base, the subject subtracted and world noise intersected

In the picture the base is a Radial spot; an Objects / Actors component subtracts the character, so the grade lights the scene around the character but not the character itself; a Noise component intersects the result to break its edge up naturally.

Combining components

OperationResultTypical use
AddUnion: max(above, this)The sky and the distant mountains; several painted areas.
SubtractRemoves this component: above x (1 - this)A spot minus the character; the ground minus the road.
IntersectOnly where both select: min(above, this)The shadows inside a radial; the tops of the rocks below 3 m.
DifferenceWhere exactly one selects: abs(above - this)Rings and outlines from two shapes (rarely needed).

Opacity (0..100 %) is the strength of a component: 0 % leaves the selection above it unchanged, 50 % applies half of its operation. A component's Invert flips it before it combines: an inverted Actors component with Intersect keeps everything except the actors.

Whole-mask settings: Enabled, Density, Feather, Expand

Under the component settings the Mask tab has the settings of the node's whole mask:

SettingRangeWhat it does
Mask enabledon / offOff: the whole mask is ignored and the node applies everywhere; every component is kept. Also Shift + click on the node's mask thumbnail. A disabled mask shows a red cross on the thumbnail.
Also limit effectson / off (default on)The mask also limits the node's effects. Off: the node's effects cover the whole frame and the mask limits only its colour. See Masks limit effects too.
Density0..100 %How strongly the mask limits the node, like a photo editor's mask density: 100 % = the mask as it is, 50 % = the unselected area gets half of the grade, 0 % = the mask has no effect.
Feather0..64 pxBlurs the edge of the final mask (pixels at 1080 lines, so it looks the same at any resolution).
Expand-100..100 %Grows (positive) or shrinks (negative) the edge of the final mask, up to about 24 px at 1080 lines. Shrink a little to stop a grade from bleeding past a silhouette.
Clip to node belowon / offMakes the node a clipping mask (see below).

Clipping masks

A clipped node only applies inside the mask of the node under it, like a clipping mask in a photo editor: its final mask is multiplied by the final mask of the nearest unclipped node below it in the Nodes panel (that node's own mask, with its density and expand; its opacity, blend mode and visibility do not matter).

  • Turn it on with Clip to node below in the Mask tab, or right-click the node > Mask > Create Clipping Mask (Release Clipping Mask turns it off). From Blueprint: Set Clip To Below.
  • Several clipped nodes in a row all clip to the same base node: mask the subject once on the base, then stack a warmth node, a contrast node and a saturation node clipped to it, each with its own opacity.
  • A clipped node keeps its own mask too: both must select. Leave its own mask empty to reuse the base mask unchanged.
  • The Nodes panel draws clipped nodes indented with a down-left arrow, and their mask thumbnail shows a chain badge. The bottom node has nothing below it, so clipping does nothing there.

The Mask tab

Open the Mask tab (key 7) with a node selected. On the left, a large canvas shows the live preview (Live Scene: the level viewport, graded or original; Image mode: the edited image) with the mask on top. On the right: the mask list of the node, the selected component's settings, the whole-mask settings and the view options.

The Mask panel: shape, luminance, colour, depth, sky, height, object and painted masks with the mask preview
The Mask panel: shape, luminance, colour, depth, sky, height, object and painted masks with the mask preview

The mask list

  • + Add Mask opens the menu of every mask type in three groups: 2D (on the frame): Linear, Radial, Luminance Range, Color Range, Paint (Screen); Scene 3D (Live Scene): Objects / Actors, Surface Direction, Edges / Facing, Light & Shadow, Motion, Depth, Height, Sky, World Shape, Paint (World), Noise; Asset: Texture, Custom Depth Object. New components start with useful defaults: Objects / Actors start with the actors selected in the level, Surface Direction selects the tops of everything, Light & Shadow the shadows, Paint starts the brush right away.
  • Each row has its eye, type icon, name (rename it in the settings), operation (Add / Subtract / Intersect / Difference), invert, opacity and delete. Click a row to select it: the canvas tools and the settings below always edit the selected component. Drag a row to reorder.
  • Press an eye and drag over the other rows' eyes to switch them all the same way (one undo step).
  • The power button in the list header switches the whole mask off and on (the same as Mask enabled).
  • Copy mask / Paste mask copy the selected component's settings to another component or another node.
  • Type changes the selected component's type (its settings for other types are kept); the reset arrow puts its settings back to the defaults (type, texture, actors and paint are kept).
  • Amber hints explain what is missing: the mask is off, density is 0 %, Custom Depth-Stencil is off (with a one-click Enable), a scene mask in Image mode, the node's effects ignore the mask (Also limit effects is off).

Viewing the mask

The View buttons choose how the mask is drawn:

ViewKeyShows
Overlay1A red quick-mask overlay where the node applies.
B&W2, or \ to toggleThe selected component in black and white: white = selected.
Outline3Marching ants along the mask's edge.
Off4Just the preview and the handles.

Overlay and B&W also show the node's final mask (every component, feather, expand, density and clipping) in the level viewport (Live Scene) or the Viewer (Image mode), drawn by the renderer: scene masks such as Surface Direction, Light & Shadow or Motion are best judged there. Show in viewport switches that preview on and off; Off switches it off. Alt + click a node's mask thumbnail toggles the black and white view of that node from the Nodes panel.

Canvas navigation: wheel zooms at the cursor, middle mouse or Space + drag pans, F fits, P freezes the live preview (work on a still frame), G switches between the graded and the original preview.

Handles and pickers on the canvas

TypeOn the canvas
LinearDrag the start (100 %) and end (0 %) lines, the centre and the rotation handle. Shift moves along the axis / snaps the angle to 15 degrees.
RadialDrag the centre, width, height, corner (uniform) and feather handles; drag inside to move it. Shift keeps it uniform.
Luminance, Color RangeEyedropper on the preview: click or drag over an area to sample it; Shift adds to the range, Alt subtracts. A range bar shows the selection.
Depth, HeightClick to pick the distance or world height under the cursor (traced from the level viewport camera); Shift / Alt set the other end. A readout follows the mouse.
Objects / ActorsClick an actor to add it to the list, Alt + click to remove it.
Surface DirectionClick a surface: every surface facing the same way is selected. Hovering shows how far a surface is from the direction.
Custom Depth ObjectClick an actor to tag it (Render CustomDepth Pass), Alt + click to untag.
World ShapeClick a surface to centre the shape on it, Alt + click an actor to follow it, Shift + click to size the shape so its edge passes through the point.
PaintPaint directly on the preview with the shared brush (see Painted masks).
TextureBrush and eraser into the texture asset (see Texture masks).

Mask tab keys

These keys work while the mouse or the focus is in the Mask tab:

KeyAction
1 / 2 / 3 / 4View Overlay / B&W / Outline / Off
\Toggle the black and white view
IInvert the selected component
F, P, GFit, freeze the live preview, graded / original preview
B, E, XPaint component: paint white, paint black, swap (also the swap button next to White / Black). Texture component: brush, eraser, eraser
[ and ] (Ctrl + wheel)Brush size; with Shift: hardness
Alt while paintingPaint with the other colour for that stroke
EscStop the painting session
Ctrl+Z / Ctrl+YUndo / redo (Paint strokes are editor undo steps; Texture strokes have their own stroke history)

Masks in the node list

Every node card in the Nodes panel shows a small mask thumbnail next to the name, like the layer mask beside a layer in a photo editor. It shows a tiny black and white preview of the 2D and painted components, the icon of a scene mask type, a red cross when the mask is disabled, a chain badge when the node is clipped, and an accent outline while its mask is shown in the viewport. Its tooltip describes the mask stack and says what the mask limits: the node's colour and its effects, or only its colour when Also limit effects is off.

Mask thumbnails beside the nodes: a node clipped to the one below and a switched-off mask
Mask thumbnails beside the nodes: a node clipped to the one below and a switched-off mask
GestureAction
Click the thumbnail, or Ctrl + click anywhere on the cardSelect the node and open its mask in the Mask tab
Alt + click the thumbnailBlack and white view of this node's mask (again to switch it off)
Shift + click the thumbnailDisable / enable the whole mask
Right-click the card > MaskAdd Mask (the same groups as the Mask tab), Show Mask, Disable / Enable Mask, Delete Mask (every component and the density / feather / expand settings), Create / Release Clipping Mask

Mask types

Type (menu name)SelectsNeedsIn Image mode
LinearA gradient across the frame (graduated filter).-Works
RadialA soft ellipse (vignette, spot, power window).-Works
Luminance RangeA brightness range (shadows only, highlights only).-Works
Color RangePixels close to a colour.-Works
Paint (Screen)An area painted over the view, stored in the node.-Works
Objects / ActorsThe listed actors, or every actor with a tag.Custom Depth-StencilFull
Surface DirectionSurfaces facing a direction: the tops of everything, undersides, toward the camera.GBuffer (fallback)Full
Edges / FacingSilhouette edges of objects (rim), or the surfaces facing the camera.GBuffer (fallback)Full
Light & ShadowShadowed or lit areas, whatever the surface colour.GBuffer (fallback)Full
MotionPixels that move on screen.Velocity (fallback)Full
DepthA distance range from the camera.Scene depthFull
HeightA world height range.Scene depthFull
SkyThe sky (pixels at the far plane).Scene depthFull
World ShapeA soft sphere, box, capsule or cylinder in the level that can follow an actor or a bone.Scene depthFull
Paint (World)Brush strokes on the level's surfaces that stay in place when the camera moves.Scene depthFull
NoiseSoft procedural patches in the world (or on the screen) to break a mask up.Scene depth (world noise)Screen noise works, world noise full
TextureA mask texture asset stretched over the view.-Works
Custom Depth ObjectActors you rendered to Custom Depth yourself, optionally one stencil value.Custom Depth-StencilFull

"Full" means the component selects the whole picture (Invert ignored), because a picture has no 3D scene. See Requirements and fallbacks for what happens without an input.

Every parameter with its range and default: Layer Mask (the component settings and the Mask Layer struct of the extra components) and Layer (Extra Masks, Mask Enabled, Density, Feather, Expand, Clip To Below). Positions of 2D masks use normalised view coordinates: (0, 0) is the top left and (1, 1) the bottom right.

2D masks

2D masks work everywhere: live views, games, captures, Movie Render Queue and Image mode.

TypeSettingsSelects
LinearStart, End (or Angle and Transition); quick buttons From top, Bottom, Left, RightFull at Start, fading to nothing at End. Skies, foregrounds.
RadialCenter, Width, Height, Feather 0..1; Center and Circle buttonsThe inside of an ellipse.
Luminance RangeRange from / to 0..1, Softness 0..1A brightness range; picks use the original image (the input of the first node).
Color RangeKey colour, Tolerance 0..1, Softness 0..1Pixels close to a colour (hue first, lightness counts half).
A Linear mask: the start (100 %) and end (0 %) lines with the centre and rotation handles
A Linear mask: the start (100 %) and end (0 %) lines with the centre and rotation handles
A Luminance mask selecting the brights, with its range bar and softness
A Luminance mask selecting the brights, with its range bar and softness
A Color Range mask: the picked colour, tolerance and softness, with the eyedropper
A Color Range mask: the picked colour, tolerance and softness, with the eyedropper

Scene masks (3D)

Scene masks read the rendered 3D scene of a live view (level viewports, Play In Editor, games, Movie Render Queue). They stay on the objects when the camera moves, because they are computed for every pixel of every frame.

Depth, Height and Sky

TypeSettingsSelects
DepthNear / Far (cm), Softness 0..1Full between Near and Far; Softness is a fraction of that range. At the maximum Far: everything beyond Near, sky included. Aerial haze, background grading. Click: from there to the horizon; Shift + click: set Far; Alt + click: a band around the clicked surface.
HeightFrom / To height (world Z, cm), Softness 0..1A world height range rebuilt from the scene depth: ground fog tints, water lines, snow lines. Click: everything below that surface; Shift + click: the lower bound; Alt + click: a 2 m band.
Sky-Pixels at the far plane (sky sphere, sky atmosphere, HDRI backdrop). Invert it to grade everything but the sky.
A Depth mask: everything beyond 30 m, with Near, Far and Softness
A Depth mask: everything beyond 30 m, with Near, Far and Softness
A Sky mask: the pixels at the far plane only
A Sky mask: the pixels at the far plane only
A Height mask: everything below 3 m of world height
A Height mask: everything below 3 m of world height

Objects / Actors

Select actors of the level directly: a character, a car, a group of props. GRADE takes care of the Custom Depth setup by itself while the mask is used, so you change nothing on the actors.

An Actors mask: the listed character selected through GRADE's own stencil values
An Actors mask: the listed character selected through GRADE's own stencil values
  • Add Selected adds the actors selected in the viewport or the Outliner (a new Objects / Actors component starts with them). Pick adds one from the actor list or with the eyedropper. On the canvas, click an actor to add it and Alt + click to remove it. Clear empties the list. Clicking a row selects its actor in the level; each row has a remove button, and an actor that is not in the loaded level is marked.
  • Tag: every actor with this actor tag (Actor > Tags) is selected too, including actors spawned while the game runs. Actors spawned by a running game cannot be listed: give them a tag instead.
  • Include attached actors (default on): also the actors attached to the listed or tagged ones (weapons, hair, props).
  • Edge softness (0..32 px at 1080 lines) grows and softens the edge to hide aliasing on thin parts.

How it works: while a mask lists an actor, GRADE draws the actor's visible meshes into the Custom Depth-Stencil pass with a stencil value of its own (from 216..240) and gives every mesh its own settings back as soon as no mask needs it (component deleted, type changed, node or volume removed, Play In Editor ended), and before any save, so nothing of it is saved with the level. An actor already drawn by the Targets effect (200..215) or by the Echo Trail / Pixel Stretch target lists (241..255) keeps its value and is shared. Several masks listing the same actor share one value for that combination, so 25 different combinations can be selected at the same time. Keep your own Custom Depth stencil values between 1 and 199.

Surface Direction (Normal)

Selects the surfaces facing a direction, from the scene's surface normals: the tops of everything for snow, moss, dust or sunlit tops; the undersides; the walls facing one side; or directions relative to the camera.

A Surface Direction (Normal) mask: the tops of everything
A Surface Direction (Normal) mask: the tops of everything
SettingMeaning
DirectionThe direction the selected surfaces face: world X / Y / Z (Z = up). Quick buttons Tops, Undersides, Facing camera. Click a surface on the canvas to use its direction.
Relative to the cameraThe direction turns with the camera (X forward, Y right, Z up) instead of being fixed in the world.
AngleSurfaces within this angle of the direction (0..180 degrees, default 45) are fully selected.
SoftnessHow gradually the selection fades beyond the angle (100 % = over 90 degrees).

The sky is never selected. With deferred shading the normals include the materials' normal maps (fine detail such as the grain of a rock); see Requirements and fallbacks for forward shading.

Edges / Facing

Measures, for every pixel, the angle between the surface and the view: 0 % = a surface seen edge on (the silhouettes of objects), 100 % = a surface facing the camera. It follows the objects as the camera moves.

SettingMeaning
From / ToThe fully selected range (0..100 %). Quick buttons Edges (rim) (0..35 %, the default) and Facing camera.
SoftnessHow gradually the selection fades outside the range.

Use Edges for a rim light look (brighten or warm the silhouettes), Facing camera to lift the fronts of objects. The sky is never selected.

Light & Shadow

Selects the shadowed or the lit areas of the scene. Light is measured apart from the surface colour (the frame's brightness compared with the material's base colour), so a dark material in the sun still counts as lit and a white wall in shadow still counts as shadow.

A Light & Shadow mask: the shadowed areas of the scene
A Light & Shadow mask: the shadowed areas of the scene
SettingMeaning
From / ToThe fully selected range: 0 % = the darkest shadow (4 stops or more below full light), 100 % = full light. Quick buttons Shadows (the default, 0..30 %), Half light, Lit areas.
SoftnessHow gradually the selection fades outside the range.

Cool the shadows and warm the light with two nodes, one with Shadows and one with Lit areas. The sky counts as lit.

Motion

Selects the pixels that move on screen: characters, vehicles, foliage in the wind, from the engine's velocity buffer.

SettingMeaning
Starts atPixels moving faster than this start to be selected (pixels per frame at 1080 lines, default 0.5).
Full after...and are fully selected when they move this much faster (default 4).

Motion is screen motion: when the camera moves, the whole moving picture counts, so raise Starts at for handheld or moving cameras. The editor viewport only shows motion while the scene moves: press Play or Simulate.

Noise

Soft procedural patches to break a mask up naturally: wet patches, uneven light, dirt, patchy fog tints. Use it with Intersect or Subtract under another component.

SettingMeaning
On the screenOff (default in Live Scene): the noise is fixed in the world and stays on the objects. On (default in Image mode): fixed on the screen, also works in Image mode.
SizeSize of the patches: centimetres in the world (default 300), or pixels at 1080 lines on the screen.
Contrast0 % = soft clouds, 100 % = hard black and white patches.
SpeedAnimation speed (patches per second, 0 = still).
PatternThe seed of the pattern; New picks a random one.

World Shape masks

The World Shape mask type selects a soft sphere, box, capsule or cylinder placed in the level, like a power window in a colour grading suite, but in 3D: it stays on the object when the camera moves, and it can follow an actor or a bone (a tracked power window). Light a face, warm a lantern's surroundings, cool everything around a character.

A World Shape mask: a sphere with its size, falloff, offset, rotation and the tracking controls
A World Shape mask: a sphere with its size, falloff, offset, rotation and the tracking controls
SettingMeaning
World ShapeSphere, Box, Capsule or Cylinder.
Size (Extent)Box: half size on X, Y and Z. Sphere: radius = X. Capsule and cylinder: radius = X, half height = Z (a capsule's half height includes its round caps, like a capsule component). The Mask tab shows sizes in metres.
FalloffSoft edge outside the shape, in cm: the selection fades from full at the surface to none this far out.
Offset, Yaw / Pitch / RollThe shape's centre and rotation, relative to the tracked actor or bone (or in the world when it follows nothing).
Tracker IdThe id of the actor to follow (see below). Empty = fixed in the world.
Track Socket (Bone)Optional bone or socket of the tracked actor's skeletal or static mesh.
Follow rotationOn: the shape turns with the tracked actor / bone. Off: it only follows its position.

Following something. A shape follows an id, not an actor reference, so presets stay level independent:

  • Add a GRADE Tracker component to the actor and set its Tracker Id. Attach the component to a bone to follow that bone.
  • Or tag the actor with the id (actor tags).
  • Track Socket picks a bone or socket of the tracked mesh instead.

In the Mask tab:

  • Click the preview to centre the shape on that surface; Alt + click an actor to follow it; Shift + click to size the shape so its edge passes through the clicked point.
  • Track Selected follows the actor selected in the level: it uses the actor's GRADE Tracker, or adds an actor tag GRADE_<label> (undoable). Untrack stops following and leaves the shape where it is, fixed in the world. To View moves the shape to the surface at the centre of the level viewport.
  • A status line says what the shape follows, or warns when its tracker is missing.
  • While the mask is selected, the shape (bright) and its falloff (dim) are drawn in the level viewport (Draw in level viewport) and over the preview. This is display only, never in captures.

Rules:

  • Live Scene only: the shape is evaluated from the scene depth. In Image mode it counts as full.
  • The sky is outside every shape.
  • A missing or disabled tracker selects nothing (Invert still applies, so an inverted mask then selects everything).
  • The tracked actor's scale is ignored: set the size on the mask.

From Blueprint: UGradeTrackerComponent::FindTracker(WorldContext, Id) (Find Tracker) finds a tracker by id, Set Tracker Id changes its id and Tracker Enabled (bTrackerEnabled) turns it off and on.

Object masks (Custom Depth)

The Custom Depth Object type (Asset group) selects the actors that you render to Custom Depth, with the engine's own settings saved on the actors. Use it when your project already manages Custom Depth and stencil values (outlines, highlights) and the mask should follow that setup. For "grade only these actors" without touching them, use Objects / Actors instead.

  1. Enable stencil once per project: Project Settings > Rendering > Custom Depth-Stencil Pass = Enabled with Stencil (r.CustomDepth=3), or the Enable button of the panel. From Blueprint, Is Custom Depth Stencil Enabled tells you whether it is on.
  2. Tag the actors: click them on the canvas, Tag Selected in the panel, right-click actors > GRADE > Tag for GRADE Object Mask, turn on Render CustomDepth Pass on their mesh components yourself, or call Set Actor Grade Mask from Blueprint. These settings are saved with the actors.
  3. To select only some of the tagged actors, give them a CustomDepth Stencil Value (1..255) and turn on Match a stencil value with the same Stencil value. Without it every actor in Custom Depth is selected.
  4. Edge softness grows and softens the mask edge (pixels at 1080 lines) to hide aliasing on thin parts.

Custom Depth is shared with outlines and other effects of your project; use distinct stencil values to keep them apart. GRADE reserves 200..255 (200..215 Targets effect, 216..240 Objects / Actors masks, 241..255 Echo Trail and Pixel Stretch targets), so keep Object mask values between 1 and 199.

An Object mask: the tagged actors, the stencil option, edge softness and the Custom Depth check
An Object mask: the tagged actors, the stencil option, edge softness and the Custom Depth check

Painted masks

Paint a mask with a brush directly, live, without any texture asset and without an Apply step. The painted mask is stored in the node itself (in the level with the GRADE Volume, in a GRADE Preset, in snapshots, in copied nodes), and the grade follows the brush while you paint.

There are two kinds:

KindWhere it livesBest for
Paint (World) (Scene 3D group)Brush dabs on the surfaces of the level: the mask stays on the objects when the camera moves.Live scenes, games, moving cameras: darken one wall, lift a path, warm a group of rocks.
Paint (Screen) (2D group)An image over the view (1024 x 576, stretched over the frame).Image mode, captures, fixed cameras and cinematic shots.
A World Paint mask: strokes painted on the level that stay in place when the camera moves
A World Paint mask: strokes painted on the level that stay in place when the camera moves

How to paint

  1. + Add Mask > Paint (World) or Paint (Screen): painting starts at once. For an existing Paint component, select it and press Paint.
  2. Paint with the left mouse button:
    • Live Scene, World: in the level viewport (the brush circle lies on the surface under the cursor), in the Studio's Live Viewer, or on the Mask tab canvas. In the level viewport only the plain left button paints: Alt / Ctrl / Shift + left button and the right and middle buttons keep their usual navigation and selection, and a paint click never selects the actor behind it.
    • Live Scene, Screen: in the level viewport, the Live Viewer or the canvas: the image over the view.
    • Image mode: on the Viewer's image or the canvas (Screen paint only).
  3. White adds to the mask, black removes from it. X, or the swap button next to White / Black in the Mask tab, swaps them; Alt while painting on the canvas paints with the other colour for that stroke.
  4. Esc or Stop Painting ends the session. Every stroke is already in the node: there is nothing to apply.

While a session runs, a line at the bottom left of the paint surface names the node you paint and shows the brush state: "Painting mask: (node name) ... White / Black (X) ... Size [ ] ... Esc to finish". The session also ends when the Studio changes mode or volume, when Play In Editor starts, when the map changes or when the painted node or component is deleted.

Undo: every stroke is one undo step: Ctrl+Z / Ctrl+Y (in Live Scene the editor's undo; in Image mode the image history).

Brush

SettingKeysMeaning
Size[ and ] (Ctrl + wheel on the canvas)Brush diameter in screen pixels. World brushes cover that size on the surface under the cursor, whatever its distance.
HardnessShift + [ and ]Size of the solid core; the rest fades out.
Opacity1 .. 0 in the viewport (10 .. 100 %)Strength of a stroke.
Flow-How fast paint builds up where dabs overlap.
PaintsB white, E black, X swapWhite selects, black removes (eraser). The swap button next to White / Black swaps them too.

The brush keys work while the mouse is over a paint surface (level viewport, Live Viewer, Image canvas, Mask tab canvas), never while you type in a text field, and never take Ctrl / Alt shortcuts (Ctrl+Z stays undo). On the Mask tab canvas the number keys keep their view meaning (1..4); set the opacity with the slider there.

Paint tools

  • Space (World / Screen) switches the kind of an existing Paint component; switching clears its strokes (undoable).
  • Fill White selects the whole frame (then paint black to remove), Fill Black clears it, Invert swaps the painted and unpainted areas (Screen). Clear removes every dab (World; use the component's Invert to select everything but the painted area).
  • Export as Texture... is optional: it also writes the mask to a texture asset in /Game/GRADE/Masks. The node keeps its live Paint mask.
A Screen Paint mask on the sample photo, stored in the node
A Screen Paint mask on the sample photo, stored in the node

How World paint works: each dab is a soft ball in space around the surface point you painted, its radius the brush size projected at that distance; dabs follow the surfaces along a stroke. Any surface inside a ball is selected, including the other side of a thin wall or an object that later moves into it. The painted area is stored at up to 160 cells per axis, so painting a whole valley gives softer edges than painting one rock: for very large areas prefer a Height, Surface Direction or World Shape mask.

Texture masks

The Texture type (Asset group) uses any Texture2D as a mask: white applies the node, black leaves the image alone. The texture is stretched over the whole view, so it only lines up with a camera that does not move (capture points, cinematic shots, Image mode). Pick an imported greyscale texture (Compression Grayscale or Masks, sRGB off), or paint into the texture asset on the canvas: brush, eraser, fill, clear, invert, soften and an edge-aware brush that stops at edges of the preview; strokes are written into the texture as you paint and Save saves the asset. To Live Paint moves the texture's pixels into a Paint (Screen) component (no asset needed any more).

A Texture mask in the Mask panel: brush, eraser, fill, clear, invert and soften over the preview
A Texture mask in the Mask panel: brush, eraser, fill, clear, invert and soften over the preview

Requirements and fallbacks

ComponentsNeedWithout it
Linear, Radial, Luminance Range, Color Range, Paint (Screen), screen Noise, TextureNothing- (they work everywhere)
Depth, Height, Sky, World Shape, Paint (World), world NoiseThe scene depth of a live viewImage mode: full
Objects / Actors, Custom Depth ObjectCustom Depth-Stencil Pass = Enabled with Stencil (r.CustomDepth=3)Live: select nothing (the panel offers Enable). Image mode: full
Surface Direction, Edges / FacingThe deferred GBuffer normals (the default renderer, Substrate's Blendable GBuffer included)Forward shading or Substrate's Adaptive GBuffer format: normals rebuilt from the depth (smooth surfaces only, no normal-map detail). Unlit and hair materials always use the depth normals. Image mode: full
Light & ShadowThe deferred GBuffer base colourForward shading or Substrate's Adaptive GBuffer format: the frame brightness only, so dark materials count as shadow. Image mode: full
MotionThe engine's velocity bufferPixels without object velocity use the camera's own motion (from the depth). Image mode: full

The output log notes once (category LogGrade, GRADE_MASK) when a fallback or a limit below is hit.

Limits

  • 8 components per node (the base and 7 extra components); further ones are ignored.
  • 4 nodes with an advanced mask per colour pass (one colour pass applies up to 16 nodes, which covers almost every grade). A mask is advanced when it has more than one component, uses one of the types Objects / Actors, Surface Direction, Edges / Facing, Light & Shadow, Motion, Noise or Paint, changes Density / Feather / Expand, or is clipped. Further nodes use only their base mask. Simple masks (one Linear, Radial, Luminance, Color Range, Depth, Height, Sky, World Shape, Texture or Custom Depth Object component) have no such limit.
  • Per node: at most 2 Texture components, 2 Screen paints and 2 World paints; further ones count as full. At most 4 different mask textures per colour pass.
  • HDR Zones of a node (scene-linear, before the tonemapper) follow its base mask only.
  • Effects follow the node's whole mask, with the limits listed in Masks limit effects too.
  • Stencil values 216..240 are reserved for Objects / Actors masks (25 combinations at a time), 200..215 for the Targets effect and 241..255 for the Echo Trail / Pixel Stretch target lists.
  • World paint: up to 160 cells per axis over the painted area and 100,000 dabs per component.
  • GPU cost at 1080p, per node with an advanced mask: about 0.03 to 0.15 ms to evaluate the stack, plus 0.05 to 0.1 ms when Feather or Expand is set (wide feathers run at half resolution). Nodes without an advanced mask cost nothing more. GPU stat: GRADE Masks.

Where masks work

  • 2D masks, Screen paint, screen Noise and Texture masks work everywhere. Scene masks work live (viewports, Play In Editor, games, Movie Render Queue) and count as full in Image mode, because a picture has no 3D scene.
  • Preset thumbnails and the CPU value of Evaluate Layer Mask treat scene components as full and ignore Feather.
  • A node's effects follow its mask in all of these places (see Masks limit effects too).
  • Exported LUTs and the Post Process Volume export ignore every mask, because a LUT only holds colour.
  • Masks blend in look transitions like other values: positions and ranges interpolate, types switch halfway, mask stacks of the same length blend component by component, and a mask that exists on one side only fades in through its density.

Blueprint

The GRADE | Mask functions (UGradeMaskLibrary) edit a volume's masks at runtime or in editor utilities. A Mask Index of 0 is the base mask, 1 the first extra component, and so on. In a game, a volume that uses a preset is detached from it first (the shared preset asset never changes); in the editor every change is undoable.

FunctionWhat it does
Add Extra MaskAppends a component (a Mask Layer: name, enabled, operation, opacity, mask) and returns its mask index.
Remove Extra Mask, Set Extra MaskRemoves / replaces an extra component (mask index 1 and above).
Set Mask ComponentReplaces the mask of any component (0 = the base).
Get Mask StackThe base mask and the extra components of a layer.
Set Mask ActorsMakes a component an Objects / Actors mask with these actors, a tag and the attached option.
Make Actors Mask LayerBuilds an Objects / Actors component for Add Extra Mask.
Set Mask EnabledSwitches the whole mask off (the layer applies everywhere; clipping still applies) or on.
Set Mask RefineDensity (0..1), Feather (0..64 px) and Expand (-1..1).
Set Clip To BelowMakes the layer a clipping mask or releases it.
Evaluate Layer MaskThe CPU value (0..1) of a layer's final mask at a view position (2D and screen components exact, scene components 1).

The fields themselves are Blueprint read / write too: FGradeLayer::ExtraMasks, bMaskEnabled, MaskDensity, MaskFeather, MaskExpand, bClipToBelow and the component settings of FGradeMask.

Effect masks

Chromatic Aberration, Sharpen and Soften have their own effect mask that limits the effect to part of the frame, independent from the node's mask (when the node is masked, both apply):

ParameterRangeNotes
Enabledon/off
TypeRadial, Linear, TextureRadial: distance from the centre (0 centre, 1 corner). Linear: vertical position (0 top, 1 bottom), rotated by Angle. Texture: red channel, white = full effect.
Start, End0..1.5Effect 0 at Start, full at End (unless inverted).
Angle-180..180 degreesLinear only.
Texture, Texture Intensity, Scale, Offsettexture, 0..4, x, yTexture only.
Weight0..1Blend between unmasked (0) and fully masked (1).
Inverton/off

Reference: Effect Mask.

Recipes

  • Darker, richer sky: a node with a Sky mask, Exposure -0.4, Color Slice Blue Density +0.3.
  • Aerial perspective: a node with a Depth mask (Near 50 m, Far 500 m, Softness 0.5), lower Contrast, a little blue in the Color Balance highlights. (The Atmosphere effect does it physically.)
  • Hero pop: an Objects / Actors mask with the character (Add Selected) and Exposure +0.2, Vibrance +25; a second node with the same mask inverted and Saturation -20. Feather 4 px and Expand -10 % keep the edge clean.
  • Spot on the scene, not on the character: a Radial base, then an Objects / Actors component with the character set to Subtract.
  • Snow on every top: a Surface Direction mask (Tops, Angle 35 degrees) with a cooler, brighter white balance; add a world Noise component with Intersect for patchy snow, and a Height component with Intersect to keep it above the snow line.
  • Cool shadows, warm light: one node with Light & Shadow = Shadows and a blue Color Balance; one with Lit areas and a warm white balance.
  • Rim light: Edges / Facing = Edges (rim) with Exposure +0.5 and a warm tint, intersected with an Objects / Actors component so only the character gets it.
  • Speed tint: a Motion mask (Starts at 2 px) with a slight blue shift and extra contrast on whatever moves fast.
  • Grade one wall: Paint (World), paint the wall in the level viewport, then darken it; the mask stays on the wall from every camera.
  • One subject, several corrections: mask the subject once on a node, then add nodes for warmth, contrast and saturation with Clip to node below: each one only applies inside the subject.
  • Lit face that follows the hero: a World Shape mask (Sphere, Falloff 50 cm) tracking the character's head bone (a GRADE Tracker attached to the head, or Track Socket = the head bone) with Exposure +0.3.
  • Clean subject, aberrated edges: Chromatic Aberration with a Radial effect mask (Start 0.3, End 0.9).
  • Aurora in one part of the sky: the Aurora effect on a node with a Linear mask (From top) or a Sky mask intersected with a Radial: the curtains only show inside the mask.
  • Fog only in the valley: Fog Gradient on a node with a Height mask (below the ridge line); Feather 16 px softens the edge.