In this lesson, you will learn how to breathe life into your static meshes by using the Time node in Shader Graph to create pulsing, breathing, or rhythmic emissive light effects.
The Logic of Time-Based Animation
Up until now, you have used emissive maps as static data—a fixed intensity or color applied to your mesh. To make an object pulse, we need to inject a dynamic variable into the Emission input of your Master Stack. The Time node acts as our "heartbeat." It continuously outputs a value that increases as your game runs, which we can manipulate using trigonometric functions to create a smooth, repeating oscillation.
Implementing a Pulsing Effect
To create a pulsing glow, you don't want the value to climb infinitely; you want it to move back and forth between two states. Here is the standard node workflow:
- Time Node: Provides the raw incrementing value.
- Multiply Node: Connects to the
Timeoutput. By multiplying by a smaller number (e.g.,0.5), you slow down the pulse speed. - Sine Node: This is the magic step. The
Sinenode takes your linear time input and converts it into a wave that oscillates smoothly between-1and1. - Remap Node: Since we don't want negative emission, use a
Remapnode to convert the-1to1range into a more useful range, like0.2to2.0. This ensures your light never fully vanishes and provides a pleasant, soft glow. - Multiply (Color): Finally, multiply this result by your desired emissive color and pipe it into the
Emissionslot of your PBR Master node.
Why This Matters
By driving your emission via math rather than animation clips, you save on performance overhead and memory. Because this calculation happens on the GPU, you can have hundreds of objects pulsing independently with slightly offset time values—creating complex, living environments with minimal resource cost.
Key Takeaway: By chaining a Time node through a Sine function, you can mathematically transform raw time into smooth, repeating oscillation to create dynamic emissive light that breathes without the need for manual keyframe animation.