Search Unity

Showcase How to VFX Graph

Discussion in 'Visual Effect Graph' started by Qriva, Apr 20, 2023.

  1. Qriva

    Qriva

    Joined:
    Jun 30, 2019
    Posts:
    1,314
    For a long time I wanted to create a document that would contain examples of common uses for vfx graph and some technical details that are harder to find. I finally sat down and created it.

    This is neither tutorial for beginners or guide for advanced users, I would say this is some kind of cheatsheet and it's partly based on recurring questions on the forum. At the beginning I wanted to make it as forum thread, but there are a lot of gifs, images and other stuff, so I decided to build it as simple github page.

    You are free to use it in any way, and in case you wanted to contribute you can do it directly on github or by proposing things here in this thread. I hope someone find this page useful :)

    https://qriva.github.io/posts/how-to-vfx-graph/
     
    Onigiri, XieJiJun, Olmi and 12 others like this.
  2. koirat

    koirat

    Joined:
    Jul 7, 2012
    Posts:
    2,074
    I'm so happy to be the first person to Like it.
     
  3. OrsonFavrel

    OrsonFavrel

    Unity Technologies

    Joined:
    Jul 25, 2022
    Posts:
    194
    Thanks a lot for the hard work @Qriva . :)
     
  4. gabriel-delacruz

    gabriel-delacruz

    Unity Technologies

    Joined:
    May 19, 2021
    Posts:
    37
    This is awesome. Thank you Qriva!
     
  5. Unifikation

    Unifikation

    Joined:
    Jan 4, 2023
    Posts:
    1,087
    If you already know Shuriken reasonably well, what are the advantages of VFX Graph?
     
  6. koirat

    koirat

    Joined:
    Jul 7, 2012
    Posts:
    2,074
    Flexibility and performance for example.
    Vfx graph uses gpu for calculations, shuriken uses cpu.

    But you should ask about disadvantages of using VFX graph:
    Vfx graph is harder to learn and less intuitive.
    Since shuriken is simulated on cpu you can have collisions with world colliders out of the box, this is not possible with VFX.
    In Vfx you can have collisions but not with arbitrary world colliders.
     
    Unifikation likes this.
  7. Unifikation

    Unifikation

    Joined:
    Jan 4, 2023
    Posts:
    1,087
    Excellent points. Thank you immensely. I think you probably saved me a few weeks of wasted time experimenting, getting enthused, only to find this, later. Invaluable advice. All the very best to you!!!
     
  8. Qriva

    Qriva

    Joined:
    Jun 30, 2019
    Posts:
    1,314
    Update - added "How to bake SDF" section plus minor fixes.
    The only problem is I made example script using
    MeshToSDFBaker
    , but I am unable to make it work without any errors and warnings. I am not sure this is my fault or there is something broken, so if someone find out what I did wrong let me know.
     
  9. ludovic-theobald

    ludovic-theobald

    Unity Technologies

    Joined:
    Jun 3, 2021
    Posts:
    13
    Nice post, thanks a lot!
    Regarding the errors and warnings that you're experiencing with the SDF baker, could you share what these are ?
    So far I could see two errors : one when trying to bake when the scene has no meshes, and one when switching scene. Please let us know if there is any other error/warning :)
     
  10. Qriva

    Qriva

    Joined:
    Jun 30, 2019
    Posts:
    1,314
    Hello, all errors are related to disposing. I tried to make this script as ExecuteAlways with a bit different destruction flow, but when entered playmode there was error about dispose. This current implementation throws only that warning from destructor:
    upload_2023-5-10_14-14-7.png