Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

VFX Graph with legacy render pipeline

Discussion in 'Visual Effect Graph' started by mutp, Aug 3, 2020.

  1. mutp

    mutp

    Joined:
    Oct 1, 2018
    Posts:
    79
    Hello,

    I'm wondering if anyone has managed to successfully use the VFX graph with the built-in render pipeline. I've got it working but I wanted to know if there are any obvious downsides apart from it not being officially supported by Unity. I only have to do this because I need GPU particles but got to stick to the built in render pipeline for a number of reasons.
     
  2. mutp

    mutp

    Joined:
    Oct 1, 2018
    Posts:
    79
    UPDATE: There don't seem to be any obvious downsides (aside from the lack of support for built-in). The biggest thing for me however is that I can't get it to work XR Plugin Management Single Pass Instanced (SPI). Works fine in MultiPass but not in SPI.

    Anyone got this working?
     
  3. wlad_s

    wlad_s

    Joined:
    Feb 18, 2011
    Posts:
    142
    Hi,
    Please, could you share how you made VFX graph work in the built-in pipeline?
     
  4. MillerMark

    MillerMark

    Joined:
    Nov 29, 2018
    Posts:
    2
  5. NavidK0

    NavidK0

    Joined:
    May 19, 2013
    Posts:
    9
    Apparently, I was able to get it to work by using an older package version, aka 10.3.2. It seems compatibility was removed in version 10.4.0. But since there's zero support for it, your mileage may vary moving forward. You'd have to manually backport bug fixes yourself... (that being said, v10.3.2 seems to still work in 2021.1.14f1...)
     
  6. wlad_s

    wlad_s

    Joined:
    Feb 18, 2011
    Posts:
    142
    NavidK0 likes this.
  7. NavidK0

    NavidK0

    Joined:
    May 19, 2013
    Posts:
    9
    Nice! I tried that asset but unfortunately, it didn't seem to work out for our project due to a few bugs. I ended up forking the VFX Graph and backporting v11 updates to v10.3.2 to keep built-in compatibility while applying bug fixes. It seems to work for now (and all of our effects still work with 2021, which is nice).
     
    wlad_s likes this.
  8. karlanton98

    karlanton98

    Joined:
    Nov 6, 2016
    Posts:
    7
    Trying to replicate this. However, i can't find any downloads now to previous versions of the VFX graph, any tips on how you've done this? :)
     
  9. NavidK0

    NavidK0

    Joined:
    May 19, 2013
    Posts:
    9
    Sure, the forked code is public [here].

    I basically diff'd and merged the updates from future versions into v10.3.2, which is the last version that still worked with the built-in pipeline. You can find versions in their [VFX graph changelog]. I have only backported up to v11 so far.

    Disclaimer: It is *quite* jank, and I make no guarantees that it will work into the future. ;)
    It still works for us in 2021.1.20f1, though, so that's good. The URP and HDRP don't have everything we need yet, so this has allowed us to stick with the built-in render pipeline while keeping most of the effects we've created in the past.
     
    Last edited: Sep 12, 2021
  10. karlanton98

    karlanton98

    Joined:
    Nov 6, 2016
    Posts:
    7

    Ah sweet! Well done:)
    Yeah same for me. Also, URP is abit too low end and HDRP too high end. Built-in is quite perfect..

    Hmm, can't seem to find any versions to download in their changelog. Am i blind or have they removed it?
    Trying to use this in 2020.3.17f, the only shadergraph there is 10.6. Is shadergraph v11 required since you've upgraded the VFX graph to this version? I presume they are supposed to have the same version...

    TLDR: Not sure how to make it work. :(
     
  11. NavidK0

    NavidK0

    Joined:
    May 19, 2013
    Posts:
    9
    As far as I know, you need to edit the Packages/manifest.json manually to download versions that are hidden from view. However, that should be unnecessary for this purpose.

    As for the forked code, all you need to do is clone/copy the repo into your Packages folder located in your project directory. Then it should show up in your project. It should automatically synchronize the dependencies. In the case it doesn't, v11 of the shader graph and v11 of the render-pipelines core is required, so make sure you edit the manifest.json accordingly if that happens.
     
  12. karlanton98

    karlanton98

    Joined:
    Nov 6, 2016
    Posts:
    7

    Thanks for the continued help! Getting some errors after following your steps however. o_O


    upload_2021-9-13_16-55-2.png


    Installed 2021.1.20f1, put the repo in packages upload_2021-9-13_16-55-30.png

    Installed shadergraph 11.0, it worked and i can create a VFX graph asset. However, when i create it and place it in the scene those errors happens. Tried changing to linear instead of gamma color space, forward / deffered etc.
     
  13. NavidK0

    NavidK0

    Joined:
    May 19, 2013
    Posts:
    9
    Turns out I had a small typo in Shaders/VFXCommon.hlsl that prevented the shaders from compiling. I am a little embarrassed to admit that it took longer than I wanted to hunt it down, lol... the typo prevented the shaders from compiling when the VFX effects were set to local space. Of course, all of the effects we have are in world space. :oops:

    Anyways, it should be working now with the latest push.
     
  14. karlanton98

    karlanton98

    Joined:
    Nov 6, 2016
    Posts:
    7

    Hahaha no worries! You're very helpful to someone without shader knowledge so thanks alot for providing this :D:D

    Yep, worked flawlessly ! Thanks once more.
     
  15. Stephanommg

    Stephanommg

    Joined:
    Aug 18, 2014
    Posts:
    28
    Hi NavidK0. I tried your steps but it didnt work.
    This is the error I get:
    upload_2022-5-9_1-51-9.png

    It is not much clear to me if this works in Unity 2020.3 or just Unity 2021.
    I placed the files in the packages folder, nothing happened. Then, I edited the manifest.json to make shader graph have version 11.0.0. I am not sure if this is the correct edition. I am also not sure what was supposed to change in the manifest.json when you said "v11 of the the render-pipelines core ".
     
  16. aaaaaieeeeeeeee

    aaaaaieeeeeeeee

    Joined:
    Aug 17, 2014
    Posts:
    9
    You're my favorite human of this Year!! :D
    It seems to work flawlessly in 2021.2.13f1
    this means both shader graph and VFX graph are able to be used with built in render pipeline :cool:
     
    NavidK0 likes this.
  17. aaaaaieeeeeeeee

    aaaaaieeeeeeeee

    Joined:
    Aug 17, 2014
    Posts:
    9
    Hey mate
    thanks again for sharing the repository that allows using VFX Graph in standard pipeline. I cannot use any scriptable render pipeline because I am reliant on a lot of important and custom made built in shaders.

    in the new version (2021.2.13f1) Shader graph too is now able to be used for standard render pipeline.

    So in other words both VFX Graph and shader graph.

    I noticed that however when I tried to make a VFX Graph Shader Graph (A shader graph Particle Shader) I get these crazy shader error when I add it to VFX Graph :oops:



    I'm an VFX Artist and being able to add Custom Shaders to VFX Graph is kind of important :(
    Do you maybe know a workaround?
     
  18. NavidK0

    NavidK0

    Joined:
    May 19, 2013
    Posts:
    9
    It's likely that the new version of the Shader Graph is only compatible with the new version of the VFX Graph. That means you won't be able to add new shaders to the old VFX Graph since there's no code to support it.

    We could update our fork to support this functionality, but unfortunately I haven't had any time for gamedev for quite some time, so I can't promise that I'll be able to put it in. Sorry! :(
     
    aaaaaieeeeeeeee likes this.
unityunity