{
"introduction":
"""Welcome to the VFX Learning Samples.
This collection is composed of various VFX Graphs, each, here, to visually explain one or several aspects of VFX Graph. Those visual examples are packed with notes so that users can get a good understanding of the VFX Graph feature set. This collection will be updated based on users inputs and/or development updates.""",
"samples": [
{
"title": "Contexts & Data Flow",
"prefabName": "Contexts & Data Flow",
"description":
"""Open VFX
Show VFX
This VFX is intended to provide an overview and basic understanding of how data flow is articulated in VFX Graph. It also presents an overview of the most frequently used Context Blocks.
Covered Aspects:
• Data Flow
• Context Block"""
},
{
"title": "Capacity Count",
"prefabName": "Capacity",
"description":
"""Open VFX
Show VFX
Capacity Count is used for the particle Memory allocation of a system. Increasing this number will increase the memory allocated.This capacity can be seen as the max active particles.It's a good practice to keep this number as close as possible to the Maximum alive particles.This VFX explains what capacity is and how to use the VFX Control to set the Capacity.
Covered Aspects:
• Capacity
• Memory allocation
• VFX Control"""
},
{
"title": "Spawn Context",
"prefabName": "Spawn Context",
"description":
"""Open VFX
Show VFX
This VFX is intended to provide information related to the Spawn Context.What is the Spawn Context, what options can be found in the inspector but also extra informations like: What are Spawn Event Attributes ? How to setup Spawn Event Attributes? What is the Spawn State Operator.
Covered Aspects:
• Spawn Context
• Spawn Event Attributes
• Spawn State"""
},
{
"title": "Multiple Outputs",
"prefabName": "Multiple Outputs",
"description":
"""Open VFX
Show VFX
The output context is where everything related to the rendering part of particles is done. You can render particles as billboard quads, meshes, points, decals, etc...
This VFX Graph shows how you can add several outputs to render each particle multiple times.
Covered Aspects:
• Output Context
• Composition Mode"""
},
{
"title": "Bounds",
"prefabName": "Bounds",
"description":
"""Open VFX
Show VFX
The Bounds are used to cull the VFX when it's not in the camera frustum. Bounds can be manually or automatically set. The VFX Bound is the cumulative Bounds of each System within a VFX Graph. In this example, the Bounds aren't properly set up, so the particles aren't rendering correctly. Don't hesitate to open the VFX to correctly set the Bounds.Covered Aspects:
• Bounds
• Culling"""
},
{
"title": "Orient Face Camera",
"prefabName": "Orient Face Camera",
"description":
"""Open VFX
Show VFX
Whether the output is set to quads, meshes, or even strips, we often want to control how the geometry is oriented on a particle. Should it face the camera? What is the forward and/or up-axis?
The Orient Block helps us to easily orient our particles with its various modes. In this example, we're using the Face Camera Position mode, which will ensure that the particles are always facing the Camera position.
Covered Aspects:
• Orient
• AxisX AxisY AxisZ"""
},
{
"title": "Orient Fixed Axis",
"prefabName": "Orient Fixed Axis",
"description":
"""Open VFX
Show VFX
Whether the Output is set to Quads, Meshes, or even Strips, we often want to control how to orient the geometry on a particle. Should it be facing the camera? What is the forward or Up-Axis ? The Orient Block helps us to easily orient our particles, as it comes with several modes. This example shows how to use the Fixed Axis mode.
Covered Aspects:
• Orient
• AxisX AxisY AxisZ
• Custom Attribute"""
},
{
"title": "Orient Advanced",
"prefabName": "Orient Advanced",
"description":
"""Open VFX
Show VFX
Whether the Output is set to Quads, Meshes, or even strips, we often want to control how to orient the geometry on a particle. Should it be facing the camera? What is the forward or Up-Axis ? The Orient Block helps us to easily orient our particles as it comes with many handy modes. This example shows how to use the Advanced Mode.
Covered Aspects:
• Orient
• AxisX AxisY AxisZ"""
},
{
"title": "Rotation & Angle",
"prefabName": "Rotation & Angle",
"description":
"""Open VFX
Show VFX
It's often really useful to be able to rotate particles. This VFX shows how to rotate particles thanks to the Angle attribute.
Covered Aspects:
• Rotation
• Angle attribute
• Pivot attribute"""
},
{
"title": "Rotation & Angular Velocity",
"prefabName": "Rotation & Angular Velocity",
"description":
"""Open VFX
Show VFX
The Particle’s rotation can be controlled by setting the angle attribute. To get more realistic behavior, you can also, like in this example, use the angular velocity. This attribute is usually set in the Initialize Context, and then, the Update Context is responsible for integrating this angular velocity to update the rotation.
Covered Aspects:
• Angular Velocity
• Angle
• Update Rotation"""
},
{
"title": "TexIndex Attribute",
"prefabName": "TexIndex Attribute",
"description":
"""Open VFX
Show VFX
It's quite common for VFX artists to rely on sprite sheets. This VFX shows how to use UVs options in the Output to use a sprite sheet. It also explains how to set up the Flipbook Settings and its relationship with the texIndex attribute.
Covered Aspects:
• TexIndex Attribute
• UVs Mode
• Flipbook"""
},
{
"title": "Flipbook Mode",
"prefabName": "Flipbook Mode",
"description":
"""Open VFX
Show VFX
This VFX shows how to set up the UVs mode of the Output to Flipbook to use a Sprite sheet. It also shows the differences of using Flipbook Blend Frames and a basic usage of the Flipbook Player Block. Flipbook Blend Frames setting allows interpolation between the frames. This can help to get smoother looking animation.
Covered Aspects:
• Flipbook Player
• UVs Mode
• TexIndex Attribute"""
},
{
"title":"Flipbook Blending",
"prefabName":"Flipbook Blending",
"description":"""Open VFX
Show VFX
This VFX illustrates the differences between a traditional frame blending and a frame blending using motion vectors. Motion vector blending uses a texture to describe the pixel displacement between two frames. This allows for a very smooth transition between frames, which can be extremely useful for reducing the number of frames in a flipbook or for doing slow-motion.
Covered Aspects:
• Flipbook Player
• UVs Mode
• TexIndex Attribute"""
},
{
"title": "TexIndex Advanced",
"prefabName": "TexIndex Advanced",
"description":
"""Open VFX
Show VFX
This complex VFX is composed of several systems that are playing with the texIndex attribute creatively. Time, noise, and even particle position are used to control the texIndex attribute and give life to this VFX.
Covered Aspects:
• Flipbook UVs
• TexIndex Attribute
• Flipbook Player"""
},
{
"title": "Pivot Attribute",
"prefabName": "Pivot Attribute",
"description":
"""Open VFX
Show VFX
The pivot attribute controls where the output render is instantiated regarding the particle position. By default, the pivot is centered on the Particle's Position. But you can offset it on any axis (XYZ). Offsetting the pivot can be extremely helpful as it can lead to appealing motion when doing scaling or rotation.
Covered Aspects:
• Pivot Attribute
• Angle attribute"""
},
{
"title": "Pivot Advanced",
"prefabName": "Pivot Advanced",
"description":
"""Open VFX
Show VFX
Controlling the Pivot of a particle is a key aspect to unlocking interesting motion. This VFX gives an example of Pivot manipulation. Here the petals, leafs and spikes of the flower are all particles. The Pivot attribute is controlled and sometimes animated to be able to properly locate and animate the particles. This example also demonstrates the Shader Graph integration and how you can control a Shader Graph through VFX Graph.
Covered Aspects:
• Pivot Attribute
• Shader Graph integration
• Activation Port """
},
{
"title": "Sample Mesh",
"prefabName": "Sample Mesh",
"description":
"""Open VFX
Show VFX
This VFX gives an example of how to sample a Mesh to spawn particles on its surface and inherit its Vertex Color of the Mesh. Ambient Occlusion has been baked into the vertex color of the Mesh and is used to set the particle’s colorCovered Aspects:
• Mesh Sampling
• Sample Mesh Operator"""
},
{
"title": "Sample Texture2D",
"prefabName": "Sample Texture2D",
"description":
"""Open VFX
Show VFX
This VFX demonstrates how to use the texture2D sample operator to determine the color of particles and perform rejection sampling. We spawn particles in a 2D grid fashion and use their XY coordinates to sample the texture. We then kill the particles based on a threshold value of the sampled texture values.
Covered Aspects:
• Texture2D Sample Operator
• Alive attribute
• Rejection Sampling"""
},
{
"title": "Sample Signed Distance Field (SDF)",
"prefabName": "Sample SDF",
"description":
"""Open VFX
Show VFX
A signed distance field (SDF) is a technique used to efficiently represent the shape and contours of 2D or 3D objects. It allows us to calculate the distance from any point in space to the nearest point on the object's surface. This VFX demonstrates how to sample an SDF to have particles crawling on the surface of a mesh. Note that an SDF Baker tool is provided:
Window->Visual Effects->Utilities->SDF Bake Tool
Covered Aspects:
• SDF Sample Operator
• Conform to SDF
• Strip/trails"""
},
{
"title": "Sample Skinned Mesh",
"prefabName": "Sample Skinned Mesh",
"description":
"""Open VFX
Show VFX
Sampling a skinned mesh enables you to get a lot of information from it, like surface position, vertex colors, UVs, Normals, Velocity etc. This basic example shows how to sample a Skinned Mesh and spawn particles on its surface. We're also getting the UVs of the Skinned Mesh to sample the same texture that the Mesh is using so that we can drive where to spawn feathers on our creature's back.
Covered Aspects:
• SkinnedMesh Sample Operator
• Texture2D Sample Operator
• Set position SkinnedMesh"""
},
{
"title": "Collision Properties",
"prefabName": "Collision Properties",
"description":
"""Open VFX
Show VFX
As VFX Graph is simulating particles on the GPU, they cannot collide with regular Rigid Body Colliders. But you can still make them collide with different geometry approximations like Boxes, Spheres, Cones, Planes or even complex shapes with the use of SDF and/or Depth Buffer. This VFX Graph, shows the use of a standard Collider Block and how the different Collision Properties like Bounce, Friction and/or Roughness can influence the collision response of the particles.
Covered Aspects:
• Collision Properties
• Collider Blocks"""
},
{
"title": "Collision Simple",
"prefabName": "Collision Simple",
"description":
"""Open VFX
Show VFX
As VFX Graph is simulating particles on the GPU, they cannot collide with regular Rigid Body Colliders. But you can still make them collide with different geometry approximations like Boxes, Spheres, Cones, Planes or even complex shapes with the use of SDF and/or Depth Buffer. This example shows you how to combine different collider blocks to get the desired results.
Covered Aspects:
• Collision Properties
• Collider Blocks
• Boolean Port"""
},
{
"title": "Collision Advanced",
"prefabName": "Collision Advanced",
"description":
"""Open VFX
Show VFX
As VFX Graph is simulating particles on the GPU, they cannot collide with regular Rigid Body Colliders. But you can still make them collide with different geometry approximations like Boxes, Spheres, Cones, Planes or even complex shapes with the use of SDF and/or Depth Buffer. Sometimes using simple collision shapes isn’t enough to get a precise enough collision with the environment. In this case, using SDF can be a good solution to approximate complex geometry like this sculpture of a hand.
Covered Aspects:
• Collision Properties
• SDF Collider"""
},
{
"title": "Trigger Event on Collide",
"prefabName": "Trigger Event on Collide",
"description":
"""Open VFX
Show VFX
This VFX is displaying an advanced usage of the Trigger Event on Collide block that allows us to spawn new particles when a particle collides. Dart particles are thrown at the dartboard. When they collide, they instantaneously die and trigger different GPU Events. Those GPU Events are used to spawn new particles, like the Springy darts or the UI Score particles, that all inherit attributes from their parent.
Covered Aspects:
• Trigger Event on Collide
• GPU Events
• Source Attribute"""
},
{
"title": "Decal Particles",
"prefabName": "Decal Particles",
"description":
"""Open VFX
Show VFX
Decal is powerful tool that can add a lot of visual complexity to an environment. We can use decals to project textures on the environment and even on dynamic objects or skinned meshes. Output Decals allow you to render particles as decals and to project its properties onto a surface using a Base Color map (albedo), a Normal Map, or a Mask Map. This example shows how to leverage the Output Decal to stick and project animated decals onto an animated skinned mesh renderer.
Warning: For this feature to work in URP, make sure to add an Decal Renderer Feature in your URP Renderer Data file.Covered Aspects:
• Skinned Mesh Position
• Output Decals HDRP
• Output Decals URP"""
},
{
"title": "Strip Properties",
"prefabName": "Strip Properties",
"description":
"""Open VFX
Show VFX
You can use Strips, also known as Ribbons or Trails, to create a wide range of VFX. The Strip Ouput Context and Strip particle data allow you to draw a quad between each particle. This example demonstrates a straightforward Strip setup. It explains the various strip properties and attributes that control its visual appearance and behavior.
Covered Aspects:
• Strip Output Context
• Particle Index in Strip
• Particle Count in Strip
• Strip Index"""
},
{
"title": "Strip Spawn Rate",
"prefabName": "Strip SpawnRate",
"description":
"""Open VFX
Show VFX
There are several ways to spawn particles, and when dealing with strips, this can have some implications for how you need to set up your VFX. This example shows you how to make a single trail out of a continuous spawn rate of particles.
Covered Aspects:
• Strip Output Context
• Strip Index
• Attribute Locations"""
},
{
"title": "Multi-Strip SpawnRate",
"prefabName": "Multi-Strip SpawnRate",
"description":
"""Open VFX
Show VFX
There are several ways to spawn particles, and when dealing with strips, this can have some implications for how you need to set up your VFX. This example shows you how to make multiple trails out of a continuous spawn rate of particles
Covered Aspects:
• Strip Output Context
• Strip Index"""
},
{
"title": "Multi-Strip Single Burst",
"prefabName": "Multi-Strip Single Burst",
"description":
"""Open VFX
Show VFX
There are several ways to spawn particles, and when dealing with strips, this can have some implications for how you need to set up your VFX. This example shows you how to make multiple trails with one single burst of particles.
Covered Aspects:
• Strip Output Context
• Strip Index"""
},
{
"title": "Multi-Strip Periodic Burst",
"prefabName": "Multi-Strip Periodic Burst",
"description":
"""Open VFX
Show VFX
There are several ways to spawn particles, and when dealing with strips, this can have some implications for how you need to set up your VFX. This example shows you how to make a new trail for each periodic burst within a single system.
Covered Aspects:
• Strip Output Context
• Strip Index"""
},
{
"title": "Strip GPU-Event",
"prefabName": "Strip GPU-Events",
"description":
"""Open VFX
Show VFX
There are several ways to spawn particles, and when dealing with strips, this can have some implications for how you need to set up your VFX. Using GPU trigger events is often the most straightforward way of creating strips. This example shows an example of a growing mushroom's VFX, with the mushroom’s hat being particle meshes and the mushroom’s foot made with particle strips.
Covered Aspects:
• Strip Output Context
• Strip Index
• Trigger Event Rate
• GPU Events"""
},
{
"title": "Multi-Strips GPU-Event",
"prefabName": "Multi-Strips GPU-Event",
"description":
"""Open VFX
Show VFX
There are several ways to spawn particles, and when dealing with strips, this can have some implications for how you need to set up your VFX. This example illustrates how to circumvent the usual limitation that only permits the creation of one strip per parent's particle when dealing with Trigger Events. Each headphone jack is made of a particle mesh and spawns particles along its path.
Covered Aspects:
• Strip Output Context
• Strip Index"""
}
]
}