Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

General HDRP VFX thread

Discussion in 'Graphics Experimental Previews' started by elbows, Sep 12, 2018.

Thread Status:
Not open for further replies.
  1. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    I love the new VFX system! So I thought I would start a thread for it here in the Graphics Experimental Previews forum, since it will evolve over time, well beyond the 2018.3 beta period.

    More from me later when I've had more time to use it.
     
  2. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    At this stage (github only) I didnt really know the best method for getting it running with the provided test scenes, so this is how I did it manually myself last night to get it working on both my windows and macos machines:

    mkdir VFXTest
    cd VFXTest
    git clone https://github.com/Unity-Technologies/ScriptableRenderPipeline
    cd ScriptableRenderPipeline
    git checkout vfx/hdrp

    Then I rename ScriptableRenderPipeline folder to SRP (to keep paths short just in case of long path issues)
    Then I move all the folders from TestProjects/VisualEffectGraph to VFXTest folder
    Then I edit VFXTest/Packages/manifest.json and change paths so that following lines have these paths:
    "com.unity.render-pipelines.core": "file:../SRP/com.unity.render-pipelines.core",
    "com.unity.render-pipelines.high-definition": "file:../SRP/com.unity.render-pipelines.high-definition",
    "com.unity.shadergraph": "file:../SRP/com.unity.shadergraph",
    "com.unity.testframework.graphics": "file:../SRP/com.unity.testframework.graphics",
    "com.unity.visualeffectgraph": "file:../SRP/com.unity.visualeffectgraph",

    Then I open the VFXTest project in Unity 2018.3
    Then I change Player setting 'Scripting Runtime Version' to .NET 4.x Equivalent.
    Then once everything recompile/reload of Unity editor is complete, the test scenes work for me (eg Assets/AllTests/VFXTests/GraphicsTests/07_UnityLogo scene)

    This way is maybe not easiest/cleanest/best way to do it but when I was just rushing to see if I could get it working last night, this method worked for me. If there is a cleaner/quicker way, please let us know, cheers :)
     
    eizenhorn likes this.
  3. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    Also I'm sure Seb wont mind me quoting a post of his from twitter that reiterates the early developmental stage that the system is at (ie no official support):

     
    rahuxx likes this.
  4. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    789
    Nice. I was thinking about trying to get it to work when I have a little time to play around but this will sped up that process.
     
  5. Chrisad

    Chrisad

    Joined:
    Mar 12, 2013
    Posts:
    55
    Anyone start doing some fx ? Even if it is a preview, editor seems to work.
     
  6. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    789
    I messed around with it and made a simple effect - Learned from one of the example graphs in the editor and after I studied the other ones that the devs made in each scene. Learned some more from those so I'm gonna go back and try to apply some of what I learned to the effect I made to try and get it to be closer to what I had in mind. So far it's pretty sweet though
     
  7. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    I've not had that much spare time to play with it yet, although I did find a few hours this evening to start to get more familiar with it.

    I have my own particular mission in mind which involves hooking up a 3D fluid simulator (of type often used for smoke etc, not liquids) to the new VFX system. Initial learning & testing seems extremely promising, since it didnt take that long to work out how to set values of exposed VFX parameters via script. And it looks like I can pass a 3D RenderTexture, rather than a static 3D texture, to a 3D texture parameter without needing to hack away at any of the VFX system source code. Which instantly makes this the easiest of all the systems I've ever tried to make work with this sim (and I've tried quite a few over the years).
     
  8. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Haven't a clue but when I get time (I seem to have none) I would love to try it. If you have vids or pics, I think they would be cool to see!
     
    elbows likes this.
  9. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    I'm sure I will have a simple, crude and premature demo video at some point in the coming days. As usual it will be focussed on my own particular area of interest rather than being a good overview of the entire system. At least this time I will be able to say 'no code was harmed during the making of this video' :cool:
     
    hippocoder likes this.
  10. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    Oh how I love this system so much already, it is everything I hoped it would be.
     
  11. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    789
    Nice! looking forward to seeing what you put together. I can't code to save my life so I'm trying to learn the system to see how I can use it.
     
  12. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Yeah not expecting tutorials or advice even just a few personal thoughts and progress, I always find those much more interesting.
     
  13. uhbygvtfcr

    uhbygvtfcr

    Joined:
    Jan 29, 2015
    Posts:
    9
    Is this Unity's answer to Unreal's new Niagara? Had I known of this obscure feature before I wouldn't have spent the last few months messing with Unreal.
     
  14. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    It's not obscure, it's not released. Pretty big difference.
     
  15. uhbygvtfcr

    uhbygvtfcr

    Joined:
    Jan 29, 2015
    Posts:
    9
    I've been living under a rock. Didn't know this existed, came here from the 2018.3 release notes.
     
  16. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    Yes, it very much is, both in terms of node graph approach and that under the hood its generating compute shaders from the graph. Obviously there are various differences too, which I'm probably not qualified to detail (eg maybe UE4 has a CPU fallback mode, I dont remember properly, I stopped dabbling with UE4 some months ago)
     
    hippocoder likes this.
  17. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    And my tip for not missing features like this that are somewhat obscure because they are being developed publicly but arent officially released even in preview form yet, videos of the Roadmap talks from the various Unite conferences and GDC are where the action is, combined with keeping an eye on Unity github stuff. Actually in this case for me and VFX, I think it took a good while before the GDC video where the VFX was first mentioned was published, and in the meantime it was someone who works for Unitys twitter feed that showed a tiny snippet of the VFX portion of that Roadmap talk that tipped me off back in March.
     
    hippocoder likes this.
  18. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    It doesn't have a fallback mode because it's HDRP only.
     
  19. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    Yeah I'm not complaining that it doesnt have a CPU fallback mode at all, I was just commenting on one of the possible differences to UE4. Personally I am entirely disinterested in CPU-based particles anyway.
     
    hippocoder likes this.
  20. Roni92pl

    Roni92pl

    Joined:
    Jun 2, 2015
    Posts:
    396
    Any chance for some shots? ;
     
  21. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
  22. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    I am well behind schedule in terms of my own testing of this system, and I still have much to learn, but it is all behaving as expected so far :)

    VFXParticlesRGB.png
     
  23. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    Combining fluid sim with the Conform to Signed Distance Field block is probably going to yied results I can spend months playing with. These tests are really not in a fit state to share yet and are much more fun when animated rather than static images but I cannot resist.

    VFXParticlesRGBTeapots.png
     
    Lurking-Ninja, Chrisad and hippocoder like this.
  24. Korindian

    Korindian

    Joined:
    Jun 25, 2013
    Posts:
    584
    @elbows very cool!

    Do you know if there's an equivalent in the VFX editor to Shuriken's Simulation Space (in the main module) for a custom object's transform in addition to world and local?

    In the VFX editor's docs, I only saw world space and local space, but no option for choosing the effect to be in relation to a custom transform. Just hoping it's there for things like floating origin shifts.
     
  25. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    Thanks! Unfortunately I am very poorly equipped to make comparisons to Shuriken, because I have only been interested in GPU particles for years now, so I have hardly used the existing particle system. And my focus is very narrow, on just a few areas, so my general knowledge about particle system features and space issues is extremely limited too. Sorry!
     
    Korindian likes this.
  26. YuriyPopov

    YuriyPopov

    Joined:
    Sep 5, 2017
    Posts:
    237
    Hey what fluid sim are you using and is it realtime? I'm very much interested in hooking up a fluid sim to the density volumes in the hdrp. It seems it would be simular work no?
     
  27. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    I use a heavily modified version of this one: https://github.com/Scrawk/GPU-GEMS-3D-Fluid-Simulation

    I reworked that one to use 3D textures instead of compute buffers, making it fairly trivial to connect it to other systems. I have got it working with HDRP density volumes in the past ( eg see #42 ). It was mostly a case of bypassing the atlas they use for static volumetric density textures and injecting the density rendertexture from the sim instead. VFX was even easier because it is possible to assign rendertextures to 3d texture VFX parameters without changing any code (in this case using velocity texture from sim instead of density texture).
     
  28. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    789
    Saw Elbows posted this in the HDRP chat so I wanted to also give my input on how I used that as well. https://forum.unity.com/threads/fee...on-render-pipeline.560653/page-2#post-3762856

    Played around with the VFX Editor a while back 2018.3 b1 - b2 and for the SDF forces I converted random images to 3d images with the Density Volume Texture Tool that comes with HDRP and plug those in and got some interesting effects. Here is the first effect I made (Actually first ever particle effect in my life) the flares (Particles blasting out and attracted back to the source) is controlled by the SDF Conform and a 3d texture I converted from a noise texture that comes with the VFX Editor Package. The Ball in the middle was a premade effect that came with the editor that I edit slightly to also attract back to itself.

    Red Dwarf.gif

    I should really get back to messing with the system, it's pretty easy to use/learn as I've never messed with VFX in Unity before so I have a lot to learn especially with this new system and its possibilities. I'm also trying to figure out how they did the Point Cache asset in one of the demos, anyone has any ideas? Houdini?
     
    gasanoff and hippocoder like this.
  29. YuriyPopov

    YuriyPopov

    Joined:
    Sep 5, 2017
    Posts:
    237
    Thanks for the answer. Is it possible for you to show me how to modify it to use 3D textures or point me in the right direction.
     
  30. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    I would if it were trivial, but it took me a long time to do. This may be because I am not an expert with maths or compute shaders, so in my case it involved years of studying variou examples of these fluid sims, both 2D and 3D versions, learning a bit about using 3D textures with compute shaders, and then slowly working my way through all the code. I was quite amazed when my version worked. And it was some years ago that I did this work, so I dont remember every issue I faced along the way. I almost certainly used 2D, texture based versions of this kind of sim as a big part of my learning, and if memory serves me correctly Scrawk does have such a 2D version on github.

    I do plan to share my code eventually, but it wont be soon, ie 2019 not 2018. And I dont know if I will just freely share the code on github, or whether I will be able ot make a useful asset store tool out of it that I sell for a reasonable amount of money.
     
  31. XRA

    XRA

    Joined:
    Aug 26, 2010
    Posts:
    265
    *edit* nevermind, i see the issue, 'git checkout vfx/hdrp' is the main important bit, i had switch to another branch
     
    Last edited: Oct 11, 2018
  32. Kriszo91

    Kriszo91

    Joined:
    Mar 26, 2015
    Posts:
    181
    Can i get some sample? also i found the unity logo, is there a way to increase the logo queality? also i see there is a unity image, but its say its an asset, how can i open this?
     
  33. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    elbows, Grimreaper358 and eizenhorn like this.
  34. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    789
    Sweeeet, we will see it in the next HDRP release then
     
  35. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Really looking forward to next HDRP release!
    Blank+_d68a17b6182b4c876c0cff091aa82f96.gif
     
    elbows likes this.
  36. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    I was so impressed that I upgraded my computer. This has put me even further behind with my plans to demo my VFX experiments, especially given the amount of time I've spent benchmarking things before and afterwards. Anyway, I'm sort of glad about this delay because hopefully it means Unity will show off the VFX system properly before I get round to demoing my custom stuff. I would rather people got a proper show of the system in its broadest sense first, since my focus is always extremely narrow and relies on the fluid sim which is not part of any unity scriptable render pipeline or VFX system.

    So hopefully todays keynote will feature the VFX system, I cant think of a good reason for it not to, and so I suppose I will be surprised if it does not.
     
    hippocoder likes this.
  37. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    They actually had session named "Create Amazing VFX with the Visual Effect Graph" today already but it wasn't livestreamed, I guess we'll see it later on once Unity uploads these individual talks into Youtube. Description of that session was:

    Also kinda disappointed that Roadmap talk was moved to Day 2 but livestream doesn't cover it :/
     
    elbows likes this.
  38. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    789
    Yea I was really looking forward to the Roadmap talk, as well as some more graphics talks but gotta wait for the videos to be uploaded.

    Day 2 is ECS and Day 3 is multiplayer. There's a really cool ECS talk on ECS and LODs. (ECS: Building a Living Breathing World on a Shoestring Budget) this talk I'm looking forward to.
    No VFX (I'm also hoping it's in the keynote) and pretty graphics until the videos are uploaded.
     
  39. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    Cheers. The genie came out of the bottle apparently, going by this photo:

    https://twitter.com/teknic/status/1054802307945127936
     
  40. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    789
    That will be a nice talk to see looking forward to the video. Seeing pictures popping up on twitter from it, it looks like everyone took pictures at the same time
     
  41. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    I had a little play with the lit mode of VFX output tonight, to make up for my sadness at not being able to attend that talk or watch a stream of it. It cheered me up very quickly :)
     
  42. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    789
    Nice, looking forward to seeing what you're working on.

    I played around with lit mode a few weeks ago. Only problems I had with it was that the compile time is kind of long a lot more than for an unlit system.

    Today didn't go without VFX goodness everyone could see (Made sense for them to hold off showing anything until the keynote) which we got these two videos from it

    This one was a Demo on stage as well


    and a Showcase/Reel
     
    elbows likes this.
  43. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    Yeah I stayed up to watch, which given I am in the UK now means I am very tired today! I did have enough energy left to make a bad joke about how if John Riccitiellos mic had signed distance field support, we could have avoided some audio problems in the first keynote segment!
     
    Lurking-Ninja likes this.
  44. Kriszo91

    Kriszo91

    Joined:
    Mar 26, 2015
    Posts:
    181
    spaceship demo will have a downloadable version?
     
  45. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,521
    Happy to hear its also coming to
    LWRP
     
    elbows likes this.
  46. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    Yeah.

    Since there is an official thread now ( Feedback Wanted: Visual Effect Graph ) I suggest we keep this one for general Visual Effect Graph chatter etc that isnt really feedback to Unity. I will start referring to it as the Visual Effect Graph from now on, since VFX was too generic when searching etc.
     
  47. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    789
    Little off topic but I know there are people here really interested in the Roadmap as I am and I just came across this tweet that has some pics from the talk and 2019 is looking mighty fine guys. So many new tools and improvements, A lot I didn't even expect.

    https://twitter.com/LotteMakesStuff/status/1055246505374699520
     
    Mauri and elbows like this.
  48. unity_RuwGDfd2lVx01A

    unity_RuwGDfd2lVx01A

    Joined:
    Oct 25, 2017
    Posts:
    23
    It's not much thanks to youtube's compression, but this is an audio reactor I made. It's really simple in design and was really easy to make. The workflow is insanely optimal, and I can't wait to experiment further!

     
  49. TerraUnity

    TerraUnity

    Joined:
    Aug 3, 2012
    Posts:
    1,247
    Hey guys, sorry for the basic questions as I haven't tried VFX editor myself... Is it possible to port the exact particle system from Shuriken into the VFX editor? (an automatic workflow would be awesome). Are all HDRP shaders supported?

    And for the most vital question, is it scriptable as used to be in Shuriken or it's only via graphs and nodes!
     
  50. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Try it out.
     
Thread Status:
Not open for further replies.