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:!

45 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.

2 Likes

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

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

Hello, just to let you know that your messages didn’t fall into oblivion.

I’ve made a cleaning pass on the collisions samples that I made for the documentation/showcase.
The scenes are far from perfect, but all the VFX should now be working for both HDRP and URP .
You’ll find, in the ColliderV2 folder, different scenes for the various examples.
Everything should be working smoothly for Unity 6.1 and above.

I’ll do the same for Sand VFX later on.

Collision_Base_HDRP_URP.unitypackage (28.7 MB)
Collision_Katamari_HDRP_URP.unitypackage (17.5 MB)

7 Likes

Thank you very much for these updates and the samples.

We are shipping a game on 2022.3 soon and I encountered all the issues mentioned above. Especially Stability and Accuracy of collision. That jittering was so annoying and “This issue required complex workarounds that could be time-consuming and challenging” YES YES! absolutely.

1 Like

I’m glad to see excitement regarding this collision update. It unlocked many new possibilities on my end :grinning:. Don’t hesitate to share your feedback when you’ll be able to test the improvement.
Where is your game, where can I see it? :raccoon:

Gladly, however we have locked the version on the project already for a while. But in the next hopefully I get to enjoy the improvements too :smiley:

The game isn’t out just yet but it will be released soon… very soon.

Wooo, Art style is sick and Gameplay seems pretty fun ! :heart_eyes:
Will be waiting for this one to try out. Thanks for sharing, always lovely to see and try what people are doing with the tool. Have a fantastic day.

Thank you for your effort. it looks like Tyflow right now.
I will try to built a flow a path way. if it is possible.
Sincerely

www.kibrit.com.tr

Could you please also Share first sample ?
Thank you so much for other samples.
Sincerely

www.kibrit.com.tr

Are these changes live now? I have issues with particles bouncing still and friction against an SDF. Friction seems to basically not work when my particles are colliding against an SDF of my terrain mesh.

These changes have been live since the launch of Unity 6. If you have blocks that interact with velocity (Turbulence, forces, attractors, drag etc…) make sure to put them before the Collision block.
From there, just increase your friction until you reach the desired behavior.

Thanks for getting back to me, so I do have the collision block after all of that - however on the SDF collider (its generated from a terrain mesh) everything just slides no matter what friction value I put, I can have 5k+ and no change.

I would suggest that you open another specific topic so that you can share details of your VFX. This will be more easy to help you and understand what is going on.