Unity 6: Collision Improvements in VFX Graph

Unity VFX Graph: Collision Improvements and Features in Unity 6

Welcome to our discussion on the recent upgrades to the VFX Graph in Unity 6. This topic focuses on the new collision improvements and features. Let’s break down the key enhancements.

Collision enhancements:

  • URP Depth Buffer Collision

    URP projects can now access the Depth Buffer to collide against it. This is very useful to allow
    thousands of particles to collide dynamically with the environment.

    Artifact_Blogpost

    In this VFX sequence, all particles interact with the dynamic environment using the depth buffer. These
    interactions help to ground the effects and add an extra touch of realism.

  • Improved Stability and Accuracy of Collision

    Previously, particles often struggled to reach a rest state, particularly when constant forces such as
    gravity were applied. This issue required complex workarounds that could be time-consuming and
    challenging. However, with Unity 6, these concerns are a thing of the past. The collision algorithms have been significantly enhanced, ensuring more reliable and precise collision detection. These
    improvements result in smoother, more realistic interactions, providing a much more stable simulation
    environment.
    VFX Graph collision comparison between Unit 2022 and Unity 6.

    Thousand of particles accurately colliding with the environment

    Overall, collisions in Unity 6 are not only more accurate but can also adapt dynamically to the size of the particles being animated.

  • Collision Behavior Options

    Collision Behavior allows VFX artists to choose how particles respond to collisions with options such as:

    • Collide: Standard behavior where particles bounce or react on impact.
    • Trigger: Register collision events.
    • Kill: Particles are reaped upon collision

    A video showing particles Mesh with different colliding behavior.

  • Collision Shapes

    As part of our ongoing UX/UI enhancements, we have consolidated all the different Collision Shape
    blocks into a single, unified block. This improvement allows users to switch between available shapes, making the design process more intuitive.


    Available collider shapes: Sphere/ Box/ Cone / Tube/ Plane / SDF

  • Collision Behavior Options

    You can now access the collision information by storing it in custom attributes:

    • Collision Position: The exact point of impact.

    • Collision Normal: The Collision Surface Normal.
      Particle Mesh colliding and using the collision Normals to spawn other particles.

    • Collision Event: A true/false indication of whether a collision event has occurred
      Particle Mesh that change color and spawn a wave upon collision

    • Collision Event Count: The number of times a particle has collided.
      Particle meshes colliding and displaing the collision count

    By default, collision information is not stored to conserve GPU memory. However, there are two modes available for collision attribute: “punctual” and “write always.”

    All of these collision attributes can be utilized and combined to craft intriguing and complex effects.

    Particles mesh breaking appart uppon collision thank to the collision count attribute.
    In this example, we use the Collision Count attribute to drive the mesh index value. This creates the impression of the mesh breaking upon collision.

    Particles sticking and orienting to a rolling sphere thanks to the new collision attributes.
    In this example, the collision Event and collision normal attributes are used to stick and orient the particle mesh on the rolling sphere.

  • Trigger Event on Collide

    You can now trigger an event on Collision to spawn new particles when a collision occurs, adding layers of complexity and interactivity.

    Particle spawning a trail thanks to the trigger event on collide block.
    With the collision attribute set to “write always,” each sphere spawns a particle strip upon collision

Conclusion and Future Prospects

The collision improvements in Unity 6 offer a more intuitive and user-friendly experience. The new features unlock numerous possibilities and enable VFX artists to be more creative with the interactions between particles and the scene.

Looking ahead, we aim to explore ray-traced collision, rolling upon collision, and the implementation of non-spherical particle collider shapes.

Join the Discussion

We encourage you to share your thoughts, feedback, questions, and experiences with the new collision enhancement of Unity 6 VFX Graph. How have these improvements impacted your projects? What innovative effects have you been able to create?


Feel free to contribute to the discussion below!


Thank you for participating in this Unity community discussion! Happy VFX :sparkles:!

39 Likes

One thing I would like to see is a way for collisions to trigger particle effects on a different object.

Like sending play events on collision or something.

It would allow for different effect triggers depending on surface.

Like say a bullet hits dry wall and dust flies, or concrete and fragments fly instead. But both triggered from the same particle event trigger that was the bullet.

1 Like

Looks amazing!
Can we expect these examples as a sample package? That would be perfect.

3 Likes

Looks amazing!
Can we expect these examples as a sample package? That would be perfect.

+1

2 Likes

Very nice with SDF collisions. Much appreciated.

1 Like

Thanks for sharing. I appreciated.

Are you able to share the project that contains the sand VFX?