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

HDRP new post processing extending

Discussion in 'Graphics Experimental Previews' started by Chaiker, Feb 4, 2019.

  1. Chaiker

    Chaiker

    Joined:
    Apr 14, 2014
    Posts:
    63
    How can I write my own effects for new post processing in HDRP?
     
    darkydoodle, id0 and rz_0lento like this.
  2. id0

    id0

    Joined:
    Nov 23, 2012
    Posts:
    455
    Yeah, I'm interested too. I had nice effects for PPV2 (glitches, some other effects for immersion), but now they just don't work.
     
  3. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    934
    This will come in a future version, current package don't allow that.
     
  4. Chaiker

    Chaiker

    Joined:
    Apr 14, 2014
    Posts:
    63
    Thank you, I was waiting for this answer :)
     
  5. darkydoodle

    darkydoodle

    Joined:
    Oct 27, 2018
    Posts:
    64
    Future version as in approx ? weeks ? months ? I'm using post-processing for game data effects (cloud systems, fog of war, etc...). Between this, shader graph instancing not taking in account material property blocks parameters, not being able to write custom vertex nodes and custom nodes not working anymore anyway, I'm a little bit stuck.
    Refraction on older cards might work now, but it's one step forward, two steps backward...
     
    M_R_M and id0 like this.
  6. andybak

    andybak

    Joined:
    Jan 14, 2017
    Posts:
    569
    @SebLagarde

    > This will come in a future version, current package don't allow that.

    There's several projects on Github which seem to show custom post-processing FX - including one by Keijiro.

    Maybe it's more a case of "it's possible but expect breakages and API changes"?
     
  7. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    It's not about that. Those custom PP effects, including one from Keijiro, work on PPv2 which is extendable by design. This thread is about HDRP 5.3+ which uses PPv3 which doesn't have this functionality (yet) and you can't use PPv2 anymore on 5.3+ HDRP (it does nothing there).
     
  8. andybak

    andybak

    Joined:
    Jan 14, 2017
    Posts:
    569
    PPv3?

    Bloody hell. I'd only just come to terms with v2!
     
    PrecisionCats likes this.
  9. interpol_kun

    interpol_kun

    Joined:
    Jul 28, 2016
    Posts:
    134
    Wow, are there any major updates to PPv2 to actually change its version to PPv3?

    Can't imagine what they did add, cause PPv2 was pretty solid.
     
  10. andybak

    andybak

    Joined:
    Jan 14, 2017
    Posts:
    569
    So - what's the status of post-processing v2? There were major issues with single pass stereo last time I checked making some effects unusable with VR.
     
  11. id0

    id0

    Joined:
    Nov 23, 2012
    Posts:
    455
    PPV2 no longer works in HDRP. PPv3 was made specifically for HDRP, to better work with physically correct lighting and other features.
     
    Last edited: Feb 17, 2019
  12. andybak

    andybak

    Joined:
    Jan 14, 2017
    Posts:
    569
    Thanks - but I was more enquiring about whether PP v2 is still being actively developed. I'm hoping it's not deprecated so soon after release.

    Will v3 be recommended for anything other than HDRP? Is it the future?

    (also - how do we try it out? I tried pulling SRP master from Github but I couldn't get it working)
     
  13. eizenhorn

    eizenhorn

    Joined:
    Oct 17, 2016
    Posts:
    2,685
    You can’t use it outside new HDRP (yet?) it’s integrated inside this pipeline
     
  14. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    789
    - This only work for Unity 2019.2 so if you gotta have the latest alpha or download it
    Download the 5.3.1-preview - 6.0.0-preview package from Github or add the staging repo to your projects manifest and manually type in the version number (This is because adding the staging repo to a manifest in 2019.2)
    (any version beyond 6.0.0 doesn't work with the current alpha version you get errors as you did with the master branch)

    PPV2 still get updates from time to time but not as much. Don't think it needs any major updates currently. Still works fine for Unity 2017 to the current version and beyond for the default render pipeline as well as the only post processing for LWRP, which uses a limited selection from the set.
     
  15. andybak

    andybak

    Joined:
    Jan 14, 2017
    Posts:
    569
    > Don't think it needs any major updates currently

    Can't remember the details but I had to basically give up on having bloom and single pass stereo on at the same time. And in the end I had to give up on bloom entirely as the frame-rate hit using post-processing with Daydream was too much without single-pass.

    I might be misremembering some of the details here as this was frantic pre-launch optimisation work but I definitely didn't feel that PPv2 was production ready - at least for mobile VR.
     
  16. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    934
    Hi,

    There is no plan to make any improvement on PPV2. Just bugfix / maintenance.
    There is no PPV3 in itself, this is how we call the HDRP postprocess. We still use this name as opposition to PPV3 but really it is not a package and is just part of the HDRP pipeline and such can't be use at other place. We fully drop the support of PPV2 for HDRP. Motivation is better everything (better integration with PBR, better quality, better memory usage, better performance etc...). This is still in progress work. Later a dedicated version will be done for LW as well which will not be computed based and will better fit mobile. VR will be better handled for postprocess and PPV3 for LW and HD. For LW PPV2 should still be compatible (so you could chose between V2 and V3). Customization of PPV3 should come for 2019.2.
     
    Elecman, hippocoder, optimise and 4 others like this.
  17. darkydoodle

    darkydoodle

    Joined:
    Oct 27, 2018
    Posts:
    64
    Ok, since almost all my shaders use custom nodes (and no, you cannot recreate them with normal nodes), and I make heavy use of custom post processes, my project is not launching in 2019.1b and will never be. Means I can already use the 2019.2a without any guilt or regret.
     
  18. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,307
    Better everything certainly sounds great.

    But can you please make sure that moving from one to the other is an easy process?

    In other words, please use the same MonoBehaviours / APIs and the same profiles. I don't care if you run different shaders in the background, or even if the actual C# implementations are completely different - just don't make me assign different components to my cameras (in our case, the one volume we use is a child object of the camera), and don't make my existing profiles obsolete.

    I'm currently moving from v1 to v2 and it's a bit of a nightmare because we primarily use PostProcessing for color grading, and the profiles are not only not compatible but there is also no way to go from one to the other without basically doing the whole color grading process manually again (we also change some parts of the color grading from script during gameplay, so LUTs are only of very limited help).

    Out main motivation to move from v1 to v2 is (hopefully) better performance and less shader keywords. Currently we have v1 and v2 in the project and that adds a lot of extra shaders, so we would like to get rid of v1 (or return to v1 and get rid of v2).

    Aside of being more modern / better maintained, v2 doesn't add anything of value for us (in particular, the whole concept of volume blending is something that we'll never use in this project). I hope performance is actually better in v2 than v1; at least for bloom and color grading.

    I'm not sure I fully understand this. So, for VR, PPV3 will be best if we use LW or HD?

    So far, it looks like HDRP isn't suitable for VR (it added 5ms per frame in an empty scene on a 980Ti when I tried). For now, we'll stay with legacy but might move to LWRP at some point. Our target platforms are PC, Mac, Linux and PS4; we also support mobile on side projects but for the time being strip everything that adds to build size / costs performance, including post-processing.
     
  19. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    789
    You will have to redo your post with PPv3 for HDRP, it won't carry over because they are set up differently.

    We don't have any info on how LWRP's PPv3 will be so not sure if it will be the same process. Sebastian mentioned that we will be able to use both for LWRP so maybe the same profiles will be compatible between the two.
     
    hippocoder likes this.
  20. Kichang-Kim

    Kichang-Kim

    Joined:
    Oct 19, 2010
    Posts:
    1,011
    @SebLagarde How about built-in pipeline? Is there any PPv3 for built-in pipeline?
     
  21. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    @jashan unfortunately too late, as of HDRP 5.3, the volumes are all merged (post + HDRP volume features) and everything looks different anyway, has different options.. HAH! That'll teach you to be a pioneer :D
     
    Ryiah likes this.
  22. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,307
    Oh oh ;-) ... but I'm not using HDRP, anyways. Shiny new stuff is always bad, I'm going all the way with legacy render pipeline until the end of time (rumor is that the end of time is near ;-) ).
     
    Weendie-Games and hippocoder like this.
  23. twistms

    twistms

    Joined:
    Jul 16, 2014
    Posts:
    3
    My reflections from reflection planar probe hiding in play mode, what I do wrong?
     
  24. QuadraticForm

    QuadraticForm

    Joined:
    Oct 13, 2016
    Posts:
    2
    what is this PPv3 you guys are talking about, I just can't find it anywhere,
    I use HDRP 5.10.0 and unity 2019.2
     
  25. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    @QuadraticForm, quote from this thread :)
     
    QuadraticForm and hippocoder like this.
  26. Flurgle

    Flurgle

    Joined:
    May 16, 2016
    Posts:
    389
    To use HDRP post processing:

    1) Load up a HDRP 5.10.0 (not sure about other version) project. (If you're importing, make sure to set to Linear, .net 4.0, and create a new HDRP settings, and drag into the slot in the Project Settings -> Graphics)

    2) Add a HDRP "Scene Settings":
    upload_2019-3-22_21-9-51.png

    3) Go to Scene Settings that you just added and click "Add Override" and add whatever Post Processing things you want to use:
    upload_2019-3-22_21-10-39.png


    Check out all these cool effects:
    upload_2019-3-22_21-10-57.png


    Just to show it works:

    upload_2019-3-22_21-11-47.png


    Have fun!
     

    Attached Files:

  27. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,618
    Have you thought about renaming post processing specific implementation? For example, HDRP-PP or HDPP rather than just PPV3?

    My assumption is that it helps to avoid confusion and sets expectations more clearly.
     
  28. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    It's called HDRP post process I think.
     
  29. kurzemnieks

    kurzemnieks

    Joined:
    Nov 22, 2012
    Posts:
    16
    What about PPV3 integration with Cinemachine? Is it something planned in the future? I could not find how to assign different post processing profiles to Cinemachine virtual cameras.
     
  30. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    There is no longer a PPV3, only LWRP PP and HDRP PP (Just a heads up as they're now wildly different and built in)

    They also don't have post process volumes anymore but instead a unified volume so perhaps your project is heading for a mess. Hopefully you'll properly remove PPV2 and use the volume system (PPV2 doesn't work in HDRP).

    I also recommend developing on lastes 2019.1 beta which should yield HDRP 5.10+ in package manager.

    This should work fine with timeline as-is, but if you're having cinemachine problems, can you be more specific (after correctly ensuring you do not have V2 in the project).
     
  31. id0

    id0

    Joined:
    Nov 23, 2012
    Posts:
    455
    I'm ask about it somewhere in cinemachine thread, and this in the roadmap.
     
  32. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,307
    So basically how they handled it in PPv1? ;-)

    I'm not gonna miss post process volumes in my project but I can see how they may have been useful for other projects.
     
  33. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    No, it still supports volumes. Its just that it uses the same sort of volumes as are also used for scene HDRP settings. This seems to have caused some confusion because some people seem only to be aware of using a single global scene volume, but I think you can still use multiple volumes of this type (although I havent tried).
     
    jashan likes this.
  34. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    I use one global volume to "set the stage" with pretty much everything added to it, followed by non global ones which only have variations of specific things, like we might adjust just shadow quality indoors or something.

    It'd be a shame if everyone just dumbly grunts and stares at the global tickbox and wonders what global means.
     
    jashan likes this.
  35. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,307
    Ah, cool, makes sense and simplifies things.
     
  36. LIVENDA_LABS

    LIVENDA_LABS

    Joined:
    Sep 23, 2013
    Posts:
    377
    How about custom post processing? how and when as there are hundreds if not thousands of asset store plugins which need to be upgraded to work with HDRP / LWRP by developers?
     
    GoGoGadget likes this.
  37. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    PPv2 is extendable already (and works with current LWRP + works with HDRP for versions prior to 5.3.0). SRPs have camera and frame callbacks implemented as well, the thing that people still miss is HDRP PP extendability for 5.3.0 and newer HDRP versions and Unity staff has told it's coming.

    btw, hows that SSR update coming along? Are you planning to update it to SRPs?
     
  38. Milanis

    Milanis

    Joined:
    Apr 6, 2018
    Posts:
    55
    I have an honest request as a dump regular 3D Artist.

    How do I get 2019.1 to work with HDRP, Shader Graph, and VFX Graph?

    Here's my list what I tried so far:

    #1 Fresh install with HDRP preview package.
    First, I tried the regular HDRP preview project and made the update to the latest 5.13.0 as suggested on the migration doc from Unity because my project that needs to be load in is based on 2018.3+

    The HDRP Test scene just vanished after updating to 5.13.0 > many errors > unusable. OK. Uninstall everything.

    #2 Fresh install without HDRP, then adding HDRP 5.13.0 through the package manager. Works.
    Added VFX graph 5.13.0: works.
    Adding Shader Graph 5.7.2: red-red-red. > many errors > unusable. OK. Uninstall everything.

    #3 So what is 5.3.0 you're talking about? Is Shader Graph 5.7.2 incompatible with HDRP 5.10+?

    I really just want to find out "how" to setup Unity 2019.1 to a usable state for testing these new features and nodes and beauties > like mentioned on the Unity 2019.1 release blog.




    PS: Could I open a portal to Narnia if I start to mix Cinemachine 2.3.3 with Entities v0.0.20.302.0.0203 after upgrading Jobs from 0.2.3.4.5a to 0.5.1.2.3f? (Don't kill me - Happy Eastern ;D)
     
    Last edited: Apr 19, 2019
    BradZoob and fherbst like this.
  39. id0

    id0

    Joined:
    Nov 23, 2012
    Posts:
    455
    Milanis, Shader Graph is added automatically when you install HDRP, you don't need to install it one more time.
     
  40. andybak

    andybak

    Joined:
    Jan 14, 2017
    Posts:
    569
    1. Use Unity Hub to create a new 2019.1 project and choose the HDRP template
    2. Add Visual Effects Graph via the package manager.
     
  41. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    @Milanis like mentioned above, you don't need to separately install Shader Graph as it's a dependency on HDRP package itself. If you want to install it manually, you have to match the version. To do so, just expand the Shader Graph package version list like you did on your screenshot for HDRP (hit "See all versions" link to expand the list), pick the matching version from there and hit update button.
     
  42. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    Version of HDRP specified by the template is usually out of date, so I usually recommend upgrading that via the package manager after creating template project.

    Unity even mention this on the long blog post about 2019.1:

    https://blogs.unity3d.com/2019/04/16/introducing-unity-2019-1/#hdrp
     
  43. andybak

    andybak

    Joined:
    Jan 14, 2017
    Posts:
    569
    Me too but the current version is broken for me so I was wary of recommending it.
     
  44. Milanis

    Milanis

    Joined:
    Apr 6, 2018
    Posts:
    55
    Ok, I think it starts to work. Thank you @id0 @andybak @rizu @elbows !!!

    @Unity Devs: For new users, I think it would be helpful to make a little "Starter" Blog post that really mentions things like above.

    I also want to explain why I wrote it down here in this thread for Post Processing. I started with a new project and HDRP Template with the little "HDRP Sample scene" (the one with the wall and the light, etc) and wondering why it breaks when I update to 5.13.0 and also installing shader graph - which was another version, I agree that I should have expected things to break. I also knew that post-processing 2.0 is not compatible with the new one.

    For me as fresh Unity user (one year now) and also just a regular 3D Artist, I think that I make mistakes during the install/package install/upgrading when just a single yellow mark pops up.

    Before upgrading to 5.13:

    The sample scene with 5.13.0:



    For me, I am confused very quickly then. Why the yellow and red marks. What can I do to make the scene visible again? Sometimes it gets fixed when restarting Unity - I fine with that- But I took me a whole night yesterday to test different package and it ended up in broken states before I even got the chance to have anything usable. I searched through the forums and google for the particular error messages without any luck or just found posts from 2011-2014.

    I really try to read every manual page and following recommended workflows all the time. Both at work and free time. For the shader graph part, I overread that shader graph actually "is" part of the SRP now and it was marked "not installed" on the package manager. It's good to know but I really think (as a former Unreal Engine User) that this workflow could be way more effective for new users if they don't get overwhelmed by the love of Unity developers for their version-number festival. At least adding a little note on the shader graph package that the user does not have to install it "if" he already got HDRP installed would help. Same goes for the Post Processing 2.x package.

    The little things.
     
    Last edited: Apr 19, 2019
    fherbst likes this.
  45. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    937
    Just started some deep dive into ppv3 and physical camera parameters. Great things happens there.

    Think it really needed to connect all physical camera parameters to the ppv3 effects ,further proofing these by many realworld comparisons.
    Why not connect it further with cinemachine.


    Fyi. Here some great real world photography read up.

    https://www.davemorrowphotography.com/depth-of-field-photography
     
    Last edited: Apr 19, 2019
  46. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    They are doing all the cinemachine stuff.
     
  47. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    937
    I was thinking more towards something like HQ Autofocus out of the box....
    At the moment i use SuperRaycast, because it does not need coliders and do my own tweening of the deptvalues against multiple raycasts.
     
  48. Carterryan1990

    Carterryan1990

    Joined:
    Dec 29, 2016
    Posts:
    79
    Thanks for the info, the slightest changes make the biggest differences lol
     
    Flurgle likes this.
  49. nehvaleem

    nehvaleem

    Joined:
    Dec 13, 2012
    Posts:
    437
    It is really sad for me to hear that. My project relies heavily on custom post processing so I am unable to upgrade to 2019.1 (HDRP 5.x) unelss it has ability to extend post processing. You've had mention that extending of HDRP-PP would be arriving in 2019.2 - is it possible that alpha version available supports that? It is a really annoying to be forced to stay in particular version and can't use of new features.
     
  50. andybak

    andybak

    Joined:
    Jan 14, 2017
    Posts:
    569
    I've had some luck extending the Visual Effects Graph (which has no official support for adding custom nodes) using Keijiro's asmdef trick: https://github.com/keijiro/Vdn8/blo...ra/Unity.VisualEffectGraph.EditorTests.asmdef

    I imagine something similar would be possible for post-processing. Even if not - the code is all there in the repo so you can just fork it and add in your own effects that way.