Some shader functionality is easily accessible using the standard nodes inside the UE4 Material Editor. You can come up with some neat speckled effects, such as the glittering gold shader we show you how to construct in the following recipe. The purpose of this recipe is to familiarize you with the Material Editor's base functions so that you can learn to construct your own material shaders.
Create an asset (such as a treasure chest) that you want to glow, or open the the source code package of Chapter11
to find the treasureChest.fbx
model.
What we'll do is move a plane across the object of a certain thickness W. When the plane passes over the geometry, the emissive color channel is activated, and a glimmer effect is created across the treasure.
We expose several parameters to control the glimmer, including Speed, Period (time between glimmers), Width, Gain, PlaneDirection, and finally, Color.