In this lesson, you will learn how to create a dynamic dissolve effect by using grayscale noise textures to mask out sections of a 3D object over time.
The Core Concept: Alpha Clipping vs. Transparency
A dissolve effect is essentially a sophisticated form of "Alpha Clipping." Instead of making an object semi-transparent, we use the Alpha Clip Threshold on the Master Node. By comparing a grayscale noise texture to a scalar value (the "Dissolve Amount"), we can discard pixels where the noise value is lower than our threshold.
As we increase the threshold from 0 to 1, the areas of the texture with darker values "disappear" first, followed by the lighter areas. When this threshold is driven by a Time node, the object appears to evaporate or crumble into nothingness.
Implementation Logic
To build this, you’ll need a Sample Texture 2D node (using a Perlin or Simplex noise texture) connected to a Step or Subtract node. Here is the logic flow in Shader Graph:
- Noise Input: Feed your noise texture into a
Subtractnode. - Threshold Control: Subtract a
Floatproperty (e.g.,DissolveAmount) from your noise map. - Clipping: Connect the result to the
Alpha Clip Thresholdinput on your PBR Master Node.
To create the "burning" edge effect, you can add an Emission component. Use the output of your Subtract node and clamp it to highlight the values precisely at the threshold boundary:
// Conceptual logic for the edge glow
float edge = step(Noise - DissolveAmount, EdgeWidth);
float3 emission = edge * BurnColor;
By multiplying the edge value by a color property and plugging it into the Emission slot, the areas currently being "dissolved" will glow as they vanish. Because we are using a noise mask, the object will erode along organic, uneven patterns rather than vanishing in a uniform block, providing a much more professional and tactile visual result for spawning or death animations.
Key Takeaway: The dissolve effect is achieved by comparing a dynamic scalar value against a grayscale noise map to trigger Alpha Clipping, while simultaneously using that same threshold boundary to drive Emissive color for an organic burning effect.