Search Unity

GPU Events still experimental?

Discussion in 'Visual Effect Graph' started by DuvE, Jul 15, 2021.

  1. DuvE

    DuvE

    Joined:
    May 22, 2016
    Posts:
    143
    HI,

    According to documentation, GPU Events is an experimental feature, but they work pretty well. I just worry if there is a chance they will be deprecated or something like that. Will they still be supported and worked on in the future?
     
  2. VladVNeykov

    VladVNeykov

    Unity Technologies

    Joined:
    Sep 16, 2016
    Posts:
    443
    Hi @DuvE ,

    GPU Events are not going to be removed! :) The experimental bit is more of a UX matter, when we are not 100% set with the current implementation and are trying to gather feedback on how to make them more intuitive and easy to use.

    Some examples for GPU events: visualizing better that they are actually triggered at the end of Update (and not wherever your trigger block is, as this can be misleading), or making them better integrated with the rest of the VFX Graph (like look into them working with nested Subgraph Visual Effects).

    And any future work on experimental features will absolutely consider upgradability to not break existing graphs.
     
    valarus and DuvE like this.
  3. Qriva

    Qriva

    Joined:
    Jun 30, 2019
    Posts:
    226
    Actually I wondered how is it with experimental features. Should any vfx graph experimental feature be used in production? I mean is it more like "it works, but we might change it" or "it might works, but it could explode any moment"?
    Some time ago when I downloaded one of first versions of 2020.3 there was new feature "Multi-Mesh", but enabling it didn't work at all, changing number of meshes threw errors. I had similar experience with particle strip in 2019.4.

    My feedback would be - if there are different reasons for feature to be experimental it would be very nice if docs clearly stated something like "this works and you can use it, but we might change this later" or "it worked last time we compiled it, but its very bugged - use at your own risk".
     
  4. VladVNeykov

    VladVNeykov

    Unity Technologies

    Joined:
    Sep 16, 2016
    Posts:
    443
    Hey @Qriva ,

    Experimental features in general fall in the "it works, but the UX might change" or "it's not fully feature complete" categories. They should never explode, and if you find some issues please file a bug so we can look into them.

    The Multi-Mesh thing you mentioned sounds like a bug, which hopefully has been addressed since then.
    I like the docs suggestion explaining why something is experimental and what potential changes might be expected in the future. Cheers, will raise it with the team!
     
    Qriva likes this.
  5. JLM_fell

    JLM_fell

    Joined:
    Jul 26, 2018
    Posts:
    6
    How to use Unity Visual Effect to launch a single particle and Colider to do collision processing The OnParticleCollision(GameObject Other) event function can listen for Collision information just like the Collision in Unity Particle System.
     
  6. VladVNeykov

    VladVNeykov

    Unity Technologies

    Joined:
    Sep 16, 2016
    Posts:
    443
    Hey @JLM_fell ,

    The VFX Graph simulates on the GPU, while Unity's collision system is on the CPU, so you won't be able to receive a collision call-back. The VFX Graph can handle collisions via different scene representations (collision shape blocks, colliding with SDFs, or in HDRP with the depth buffer), but you won't be able to receive an event of this happening outside of the graph.

    While we have plans on enabling reading particle data on the CPU down the road, your use case still feels like it would be better served by using the built-in Particle System or if you have one/few particles, handling your collision via script and sending the impact point to the VFX Graph if you wanted to simulate something like a larger particle explosion at the impact point.

    Just a quick note, I see you also direct-messaged me with the same question: to help our community, please start new threads with your questions so it's easier for others who have a similar question to find the answer as neither this thread about GPU events nor a direct message will have visibility.
     
unityunity