Search Unity

Do VFX mesh particles have tris counting?

Discussion in 'Visual Effect Graph' started by PrakNep, Feb 22, 2020.

  1. PrakNep

    PrakNep

    Joined:
    Oct 24, 2016
    Posts:
    17
    Does the particles made through VFX graph have polygon stuffs? As in Shuriken, when I spawn cube particles, the polygons of the cubes do get counted on the camera. Does the particles from VFX graph count as meshes too, even being on the GPU side? I want to spawn a lot of cubes on many area, which dont need to be interactable, just for cosmetic purposes. Either I can go the ECS way, which is pretty good for that, or VFX, considering GPU would be faster o_O. Let me know your thoughs!! And its for a mobile game so I need go the performant route :).
     
    pontushero likes this.
  2. fffMalzbier

    fffMalzbier

    Joined:
    Jun 14, 2011
    Posts:
    3,276
    In the end everything that is drawn is in some way a mesh.
    If the VFX graph works for you depends on if you can do with it what you need to do or you need some more smarts and you need to go with ECS and drawing instanced mesh by code.
     
  3. VladVNeykov

    VladVNeykov

    Unity Technologies

    Joined:
    Sep 16, 2016
    Posts:
    550
    Hi @PrakNep ,

    I would like to throw in a consideration that the VFX graph depends on the use of compute shaders, so this narrows down a bit the range of mobile devices you can use to more recent / high-end ones. In addition, the focus for the 7.x VFX was on HDRP and as of right now we don't have full parity with the Universal Render Pipeline.

    Shuriken is at the moment a more robust and versatile choice when targeting mobile devices. You can also enable in the render of Shuriken GPU instancing, and as long as you are using a material which supports it (e.g. the standard particle shader) you can output a significant number of meshes with less overhead.
     
  4. PrakNep

    PrakNep

    Joined:
    Oct 24, 2016
    Posts:
    17
    I understand.. And if the VFX Graph doesnt allow it, I'll do it with ECS.

    I had a look on Google's charts of devices distribution, and according to it around 50% of devices in market supports compute shaders, so I'm willing to go that route. But still, I didnt get an actual answer if the VFX system in its current version supports mesh as particles?
    Regards.
     
  5. VladVNeykov

    VladVNeykov

    Unity Technologies

    Joined:
    Sep 16, 2016
    Posts:
    550
    Apologies, didn't get that this was your question. Yes, the VFX Graph supports Mesh particles. In HDRP there's an unlit and a lit version of the mesh particle output, in URP currently we only have the unlit one, with work on lit outputs planned for this year.
    upload_2020-2-27_9-55-43.png

    Hope this helps!
     
  6. PrakNep

    PrakNep

    Joined:
    Oct 24, 2016
    Posts:
    17
    Hey! Thanks for the reply:)
    Also, do the vertices of the mesh particles count on camera like Shuriken particles does?
     
  7. VladVNeykov

    VladVNeykov

    Unity Technologies

    Joined:
    Sep 16, 2016
    Posts:
    550
    You won't see the exact mesh vert count on the CPU in the game view statistic like you would see in Shuriken since the VFX graph is running on the GPU, but yes, there is always a cost associated with drawing particles, though you should be able to output significantly more particles with the VFX Graph than with Shuriken.