DocsGRADEReference

Layer Mask

6 min read

On this page

Part of every layer: FGradeLayer::Mask (FGradeMask). Manual: Layer Mask.

Parameters

Where a layer applies. Positions are in normalised view coordinates (0,0 top-left .. 1,1 bottom-right).

ParameterBlueprint pathValuesDefaultDescription
TypeEGradeMaskTypeNone
InvertMask.Inverton/offoff
SoftnessMask.Softness0..10.2...fading out over this distance on both sides (also used by ColorRange).

Linear

ParameterBlueprint pathValuesDefaultDescription
StartMask.Start.X/Y2D vector (X, Y)(0.5, 0)
EndMask.End.X/Y2D vector (X, Y)(0.5, 0.6)

Radial

ParameterBlueprint pathValuesDefaultDescription
CenterMask.Center.X/Y2D vector (X, Y)(0.5, 0.5)
RadiusMask.Radius.X/Y2D vector (X, Y)(0.3, 0.3)Half size of the ellipse (fraction of the view width/height).
FeatherMask.Feather0..10.5Softness of the radial edge, 0..1.

Luminance

ParameterBlueprint pathValuesDefaultDescription
Luminance MinMask.LuminanceMin0..10.5Luminance range (0..1) fully selected...
Luminance MaxMask.LuminanceMax0..11

Color Range

ParameterBlueprint pathValuesDefaultDescription
ColorMask.Color.R/G/B/Acolour(1, 0.5, 0.2)
ToleranceMask.Tolerance0..10.15Colour distance (0..1) fully selected.

Depth

ParameterBlueprint pathValuesDefaultDescription
Depth NearMask.DepthNear>= 0 cm (slider to 100000)2000Depth: distance from the camera (cm) where the selection is full...
Depth FarMask.DepthFar>= 0 cm (slider to 1000000)1000000...up to this distance (cm); beyond it fades out over Softness x the range. Set very far to select "everything beyond Near".

Height

ParameterBlueprint pathValuesDefaultDescription
Height MinMask.HeightMinnumber cm-100000Height: world Z range (cm) fully selected (fades over Softness x the range).
Height MaxMask.HeightMaxnumber cm200

Object

ParameterBlueprint pathValuesDefaultDescription
Use StencilMask.UseStencilon/offoffObject: match a Custom Stencil value (1..255) instead of any object rendered to Custom Depth.
Stencil ValueMask.StencilValue1..255, integer1(Editable when Use Stencil is on.)
Edge SoftnessMask.EdgeSoftness0..321.5Grow/soften the object mask edge in pixels (at 1080 lines).

Texture

ParameterBlueprint pathValuesDefaultDescription
Mask TexturetexturenoneTexture: the mask (white = full). Stretched over the view. Painted in GRADE Studio or imported.

World Shape

ParameterBlueprint pathValuesDefaultDescription
World ShapeEGradeWorldShapeSphere
Tracker IdnameFollows the actor that has a GRADE Tracker component with this id (or the actor tag with this name); None = fixed in the world at ShapeOffset. Ids (not actor references) so presets stay level independent.
Track SocketnameOptional bone or socket of the tracked actor's skeletal / static mesh (None = the actor root).
Shape OffsetMask.ShapeOffset.X/Y/Zvector (X, Y, Z)FVector::ZeroVectorShape centre relative to the tracked transform (world space when TrackerId is None), cm.
Shape RotationrotatorFRotator::ZeroRotator
Shape ExtentMask.ShapeExtent.X/Y/Zvector (X, Y, Z)(150, 150, 150)Half size (box), radius (sphere: X; capsule / cylinder: X = radius, Z = half height), cm.
Shape FalloffMask.ShapeFalloff>= 0 cm (slider to 2000)75Soft edge width outside the shape, cm.
Follow RotationMask.FollowRotationon/offonThe shape rotates with the tracked transform (off = only follows its position).

Actors

ParameterBlueprint pathValuesDefaultDescription
Mask Actorslist of actorActors: the actors selected by the mask (GRADE renders them to Custom Depth with its own stencil value).
Mask Actor TagnameActors: every actor with this tag (Actor > Tags) is selected too, spawned ones included (None = off).
Mask Include AttachedMask.MaskIncludeAttachedon/offonActors: also select the actors attached to the listed / tagged ones (weapons, hair, props).

Normal

ParameterBlueprint pathValuesDefaultDescription
Normal DirectionMask.NormalDirection.X/Y/Zvector (X, Y, Z)(0, 0, 1)Normal: the direction the selected surfaces face (world space; camera space when Camera Relative: X forward, Y right, Z up).
Normal Camera RelativeMask.NormalCameraRelativeon/offoffNormal: Normal Direction is relative to the camera instead of the world.
Normal AngleMask.NormalAngle0..180 deg45Normal: surfaces within this angle of the direction are fully selected; the selection fades over Softness x 90 degrees.

Facing

ParameterBlueprint pathValuesDefaultDescription
Facing MinMask.FacingMin0..10Facing: facing range fully selected, 0 = grazing edge (rim) .. 1 = facing the camera (fades over Softness).
Facing MaxMask.FacingMax0..10.35Facing: upper end of the fully selected facing range (0 = edge .. 1 = facing the camera).

Lighting

ParameterBlueprint pathValuesDefaultDescription
Lighting MinMask.LightingMin0..10Lighting: lighting range fully selected, 0 = darkest shadow .. 1 = fully lit (fades over Softness).
Lighting MaxMask.LightingMax0..10.3Lighting: upper end of the fully selected lighting range (0 = darkest shadow .. 1 = fully lit).

Motion

ParameterBlueprint pathValuesDefaultDescription
Motion ThresholdMask.MotionThreshold>= 0 (slider to 32)0.5Motion: pixels moving faster than this start to be selected (pixels per frame at 1080 lines)...
Motion RangeMask.MotionRange>= 0.01 (slider to 64)4...and are fully selected this much faster (pixels per frame at 1080 lines).

Noise

ParameterBlueprint pathValuesDefaultDescription
Noise ScaleMask.NoiseScale>= 1 (slider to 5000)300Noise: size of the noise features (cm in the world; pixels at 1080 lines in screen space).
Noise ContrastMask.NoiseContrast0..10.5Noise: 0 = soft clouds .. 1 = hard black / white patches.
Noise SpeedMask.NoiseSpeed>= 0 (slider to 10)0Noise: animation speed (noise features per second, 0 = still).
Noise SeedMask.NoiseSeedinteger0Noise: changes the pattern.
Noise Screen SpaceMask.NoiseScreenSpaceon/offoffNoise: noise fixed on the screen instead of in the world (also works in Image mode).

Paint

ParameterBlueprint pathValuesDefaultDescription
PaintFGradeMaskPaintPaint: the painted mask (Screen image or World brush dabs), edited live in GRADE Studio. White = selected.

Mask Layer (FGradeMaskLayer)

One extra component of a layer's mask stack (combined in order after the layer's base Mask).

ParameterValuesDefaultDescription
NametextDisplay name in the Mask tab (empty = the type name).
Enabledon/offonOff = this component is skipped.
OpEGradeMaskOpAddHow this component combines with the result of the components above it.
Opacity0..11Strength of this component (0 = no change to the stack, 1 = full).

Nested settings: Mask (FGradeMask): The component (any mask type; its Invert applies before the op).

Entries of this list are not addressable by Blueprint paths; edit them in GRADE Studio, the Details panel or with the dedicated Blueprint helpers.

Enumerations

Mask Type (EGradeMaskType)

ValueMeaning
NoneThe whole image.
LinearLinear gradient from Start (full) to End (none).
RadialEllipse around Center (full inside).
LuminanceSelects a luminance range.
Color RangeSelects pixels close to a colour.
DepthSelects a distance range from the camera (scene depth; full in Image mode).
SkySelects the sky (pixels at the far plane).
HeightSelects a world height range (reconstructed from scene depth).
ObjectSelects objects rendered to Custom Depth (optionally a Custom Stencil value): "only these actors".
TextureA painted / imported screen-space mask texture (fixed cameras, captures, images).
World ShapeA soft 3D shape in the world (sphere, box, capsule, cylinder) that can follow an actor / bone / socket (scene depth; full in Image mode).
ActorsListed actors / actors with a tag (GRADE writes a Custom Depth-Stencil value 216..240 on them; full in Image mode).
NormalSurfaces facing a direction (GBuffer world normal): world up = tops (snow, moss), down, or camera relative.
FacingAngle between the surface and the view: object edges / rim (0) .. surfaces facing the camera (1).
LightingLit vs shadowed areas (scene colour over GBuffer base colour; full in Image mode).
MotionMoving pixels (velocity buffer; full in Image mode).
NoiseProcedural noise in the world (or on the screen) to break masks up.
PaintPainted mask stored in the layer (Screen image or World brush dabs), no texture asset.

World Shape (EGradeWorldShape)

Shape of a World Shape mask.

ValueMeaning
Sphere-
Box-
Capsule-
Cylinder-

Mask Op (EGradeMaskOp)

How a mask component combines with the components above it in the mask stack.

ValueMeaning
AddUnion: max(a, b).
SubtractRemoves the component: a * (1 - b).
IntersectOnly where both select: min(a, b).
DifferenceWhere exactly one selects: abs(a - b).

Generated from the GRADE C++ headers. Back to the reference index.