RGBA Color Masking
RGBA Color Masking provides a flexible way to apply different color tints, textures, and normal maps with the main color. This allows the user to seamlessly blend between Materials for situations where the need for blending vertex colors is necessary and for consolidating Detail Normals for greater efficiency.
By default, all 4 channels of RGBA color masking will be set to pure white and 1.0 alpha. Any unused channels should be disabled.
Using RGBA Color Masking
Usage of RGBA Color Masking can greatly increase efficiency for various types of usage scenarios. Community member Teeh has put together this video that demonstrates how to use RGBA Color Masking, which you can watch below:
Material Properties
Below are the list of properties available to use in RGBA Color Masking.
Mask Type
- Type
- Dropdown
- Options
- TexturedefaultVertex Colors
- Type
- Dropdown
- Options
- TextureVertex Colors
Texture
Use a Texture Mask to set the RGBA Mask. If enabled, it exposes the Masks slot.
Vertex Colors
Use the mesh's Vertex Colors to set the RGBA Mask.
When using Vertex Colors as the RGBA Mask, make sure the Color Attributes on the Mesh are in Linear Color so that the shader can accurately read them.
Masks and Maps
Masks
- Type
- Texture Slot
- Accepts
- Data texturesRGB Off
Slot for the masks that you wish to use for your RGBA Masking. This will only be exposed when Mask Type is set to Texture.
This slot is only exposed when Mask Type is set to Texture.
Metallic Maps
- Type
- Texture Slot
- Accepts
- Data texturesRGB Off
Slot to use for Metallics & Smoothness effect on your RGBA Masks. Use this for the Metallics mapping in each channel.
Smoothness Maps
- Type
- Texture Slot
- Accepts
- Data texturesRGB Off
Slot to use for Metallics & Smoothness effect on your RGBA Masks. Use this for the Smoothness mapping in each channel.
Channel Module
The following properties below will appear for each Channel you are customizing. We will refer to them as "Channel" on this Documentation. This means the word "Channel" would be the RGBA Mask Channel, such as Red, Green, Blue, or Alpha.
Channel
- Type
- Toggle
Enables the mentioned Channel to be used.
Scale & Offset
- Type
- Float4
- Default
- X1Y1Z0W0
Determines both the Scale and Offset of the affected area.
| Coordinate | Function |
|---|---|
| X | Scale on the X-axis |
| Y | Scale on the Y-axis |
| Z | Offset value on the X-axis |
| W | Offset value on the Y-axis |
Color Blend
- Type
- Dropdown
- Options
- ReplacedefaultDarkenMultiplyLightenScreenSubtractAddOverlayMixed
Choice of Blend mode you wish to use for this channel.
Normal Blend
- Type
- Vector Toggles
- Buttons
- XBaseYRedZGreenWBlue
These button toggles control how the Normal Map blends with the Base, also defined by your RGBA Mask.
If all is turned off, it will overwrite the Normals already existing on your Base with the one defined instead. Channels following it will override it from one another.
If Base is enabled, it will combine the bump Normal with the Base Normal of your Material, if defined.
If a Color channel is enabled (Red, Green, or Blue), it will combine the bump Normal in the channel with the Normals defined in the selected Color channels.
Only RGBA Channels that are above one another (in descending order) can blend Normals with one another. See Table below for what the shader will allow:
| RGBA Channels | Base | Red | Green | Blue |
|---|---|---|---|---|
| Red | ✅ | ❌ | ❌ | ❌ |
| Green | ✅ | ✅ | ❌ | ❌ |
| Blue | ✅ | ✅ | ✅ | ❌ |
| Alpha | ✅ | ✅ | ✅ | ✅ |
Color
- Type
- Color
Set the Color of the Channel to use.
Texture
- Type
- Texture Slot
- Accepts
- Color texturesRGB On
Texture to use for the Channel masked area. This is pure white by default, if a texture is not defined.
Normal
- Type
- Texture Slot
- Accepts
- Normal mapsRGB Off
Normal Map texture to be used for the Channel masked area.
Normal Intensity
- Type
- Range
- Range
- 0to10
Intensity for the Normals in your mask, if defined.
By default, a standard Normal intensity would be 1, for reference.
Emission Strength
- Type
- Range
- Range
- 0to20
Set the Emission strength to the masked area. High values can create a "bloom" effect in worlds with Post Processing.
Metallics & Smoothness
- Type
- Toggle
Enables the usage of your Metallic Map and Smoothness Map to be used in the Channel, if defined.
Custom Sampling
- Type
- Toggle
- Shown when
Metallics & Smoothness is enabled
If enabled, exposes more options for sampling your Metallic Maps and Smoothness Maps.
Tiling/Offset
- Type
- Vector4
- Default
- X1Y1Z0W0
- Shown when
Custom Sampling is enabled
Sets the Tiling and Offset for the custom Metallics & Smoothness sampling.
UV
- Type
- Dropdown
- Options
- UV0UV1UV2UV3PanosphereWorld PosLocal PosPolar UVDistorted UVMatcap
- Shown when
Custom Sampling is enabled
Sets the UV to use for the custom Metallics & Smoothness sampling.
Stochastic Sampling
- Type
- Toggle
- Shown when
Custom Sampling is enabled
Turns on Stochastic Sampling for the Metallics & Smoothness sampling.
Panning
- Type
- Vector2
- Shown when
Custom Sampling is enabled
Sets panning intensity on the Metallics & Smoothness sampling.