Target environment and result
Use Unreal Engine 5.6 Material Editor to hide the black areas of a grayscale picture and add color. A Material controls an object’s appearance. This exercise uses the traditional Surface / Unlit / Translucent workflow. A project using Substrate has different settings; use a matching practice project for these steps.
Place a Plane, a flat surface with UV coordinates for the image, in the Level. Assign the material after building it. Use an opaque grayscale PNG and read its R component for opacity. First check that white remains visible and black disappears; then move the material to Niagara.
1. Prepare the texture and parameters
- Import the PNG as mask data with sRGB disabled. Match compression and the Texture Sample sampler type to mask use.
Connect image brightness to opacity: black disappears - Create a Material with Domain Surface, Blend Mode Translucent and Shading Model Unlit.
Base Color: unused - Add TextureSampleParameter2D MaskTex, VectorParameter Tint and ScalarParameters Intensity and Opacity. Select MaskTex and assign the imported PNG to its Texture field. Start with white Tint and values of one.
Add TextureSampleParameter2D MaskTex · VectorParameter Tint ·
2. Connect color and opacity separately
| Output | Connect |
|---|---|
| Emissive Color | Tint RGB × Intensity |
| Opacity | Saturate(MaskTex R × Opacity) |
Right-click empty graph space to add nodes, the calculation blocks. Multiply performs multiplication. Build the two paths below and put Saturate on the opacity path to keep its result between 0 and 1. Read R from this grayscale image; an all-one A would leave the black rectangle visible. For this Unlit material, display color connects to Emissive Color.
Click Apply and save. Select the Plane in the Level and assign the Material under Materials in Details. The white shape should appear with the background visible through its black areas. If it disappears only from behind, inspect face orientation and enable Two Sided if the effect needs both sides.
3. Adjust a Material Instance
Right-click the Material in Content Browser and choose Create Material Instance. The Instance shares the original calculation while letting you adjust its values. Open it, enable the overrides for Tint, Intensity and Opacity, and change them. Assign the Instance to the Plane to see the changes. Edit structural choices such as Blend Mode in the original Material. Bloom, exposure and Light settings also affect the appearance of bright materials.
4. Add a Panner
Panner moves the image’s UV sampling coordinates over time. Connect TextureCoordinate to Coordinate, Time to the Panner Time input, and the output to MaskTex UVs. Try SpeedX 0.2 and SpeedY 0: the Plane stays still while the pattern moves. An arrow image makes the visible travel direction easy to check.
Use a texture intended to wrap in the scrolling direction and inspect the seam. Scrolling an isolated image can clamp or cut at its edges.
5. Add particle-driven inputs afterward
After the Plane test works, add a Particle Color node. Multiply its RGB into display color and its A into opacity. Assign the Material to Niagara’s Renderer, the component drawing the particles, and change particle color and Alpha to check that both reach the material. Also confirm the Material Usage needed by that Renderer.