In this lesson, you will learn how to orchestrate a particle’s lifecycle by mastering the three primary contexts: Spawn, Update, and Output.
The Lifecycle Architecture
Visual Effect Graph operates on a strict, sequential pipeline. Unlike traditional scripts, where logic might be scattered, the VFX Graph forces you to categorize your operations into distinct blocks:
- Spawn Context: This is the entry point. It controls when and how many particles are birthed. Nodes like
Periodic BurstorConstant Spawn Rateexist here. If you want your effect to pulse or fire in rhythmic intervals, you modify parameters solely within this context. - Update Context: This is the "brain" of your simulation. Once a particle is spawned, it passes through this context every frame. Here, you define the physical laws: gravity, velocity, drag, and age-based calculations. Because this executes per frame for every active particle, it is where you implement logic like
Set VelocityorTurbulence. - Output Context: This is the visual representation. It does not control physics; it only determines how the particle is drawn. You select your shader here, define alignment (e.g.,
BillboardvsCamera Facing), and set the render mode.
Navigating the Data Flow
The key to navigating the graph is understanding how data moves through these blocks. You can visualize this as a vertical pipeline. For example, if you want a particle to grow over time:
- You use an
Age over Lifetimenode in the Update context to define the time normalization. - You then pass that value into a
Set Sizenode. - The Output context reads that updated size value from the particle buffer and renders the quad accordingly.
If your simulation is stuttering or not behaving as expected, always ask: "Am I trying to define physical movement in the Output context?" If so, move that logic up into the Update context. The separation of these zones ensures that your logic remains predictable, performant, and easy to debug as your graph scales in complexity.
Key Takeaway: The VFX Graph workflow relies on a strict separation of concerns where the Spawn context triggers birth, the Update context manages physical behavior, and the Output context handles visual rendering.