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

Official Unity Experimental HDRP DXR

Discussion in 'HDRP Ray Tracing' started by SebLagarde, Apr 4, 2019.

  1. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
  2. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    #3
    image_054_0000.png image_046_0000.png image_047_0000.png image_048_0000.png
     
    Lex4art likes this.
  3. Lex4art

    Lex4art

    Joined:
    Nov 17, 2012
    Posts:
    445
    DLSS will act as regular anti-aliasing solution (without upscale) if "Use custom attributes" checkbox is active and/or "Ultra performance" mode is selected; weird, but it's in alpha so.... so, no performance gain but quality is very nice, almost no pixel jittering like with TAA and smoother edges without blurring.

    Btw, not sure but it seems that fps monitor tool ("Graphy") causes crashes (most of them) in a19.
     
    Last edited: Jun 6, 2021
  4. m0nsky

    m0nsky

    Joined:
    Dec 9, 2015
    Posts:
    257
    Ah, I'll try removing graphy. I've been trying to get a19 to work for a few days but every project just keeps crashing on startup, and when I finally get one to load, they crash on entering play mode.

    Edit
    Removing graphy fixed the crashes on startup/play mode, but it's still randomly crashing every now and then.
     
    Last edited: Jun 6, 2021
  5. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    Lex4art thanks!
    Will check without Graphy how is going.
    Yes no performance gain but AA is best ever!. I can live with this :)
    Perhaps later it will be more fps, even 30-50% will help a lot.
    I get more fps with other options enabled, but camera view get strange perspective......
     
  6. Lex4art

    Lex4art

    Joined:
    Nov 17, 2012
    Posts:
    445
    Same here, I've noticed that similar to Graphy my own 2D interface (or TextMeshPro part of it) in Buildmark crashes hard, while almost pure 3D interface in main menu way more stable. But it seems to be only Editor problem, in build 2D UI works stable enough.
     
    Last edited: Jun 6, 2021
  7. Lex4art

    Lex4art

    Joined:
    Nov 17, 2012
    Posts:
    445
    DLSS was added to Buildmark beta 6
    It's raw but for testing purposes totally worth it :). UI for switching between DLSS modes was added to main menu (also, now there are benchmarking presets to test DLSS):
    Buildmark v2021.2 beta 6 _ 07-06-2021 5.jpg Buildmark v2021.2 beta 6 _ 07-06-2021 4.jpg Buildmark v2021.2 beta 6 _ 07-06-2021 3.jpg Buildmark v2021.2 beta 6 _ 07-06-2021 2.jpg Buildmark v2021.2 beta 6 _ 07-06-2021 6.jpg
     
    Last edited: Jun 7, 2021
    keeponshading likes this.
  8. Lex4art

    Lex4art

    Joined:
    Nov 17, 2012
    Posts:
    445
    (UPD: restart Steam to receive hotfix for this feature properly working)
    Also, in Play mode/Build mode it's possible to switch between DLSS modes via side menu (hotkey 'F1'):
    Buildmark v2021.2 beta 6 _ 07-06-2021 7.jpg


    Overall it's raw - performance gain is good, but those checkerboard noise patterns all other the edges and crashes more often (not only on scene changes)... well, preview is preview, hope to see fine tuned DLSS in upcoming HDRP updates :)
     
    Last edited: Jun 7, 2021
    keeponshading likes this.
  9. phil-harvey

    phil-harvey

    Joined:
    Aug 27, 2014
    Posts:
    75
    What water shader is this on the asset store?

    Thanks
     
  10. Lex4art

    Lex4art

    Joined:
    Nov 17, 2012
    Posts:
    445
    Last edited: Jun 7, 2021
  11. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    Lex4art thanks for link! I just bought it. Needed something simple for limited region, like pool. Crest Ocean do not have yet limited regions like pool or lakes (it is tool there for that but I need something simple)
     
  12. chap-unity

    chap-unity

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    760
    Hey, a PR has been made to fix this exact issue.
    Basically:
    • Before, when the occluder was moving, history wasn't discarded, thus creating ghosting. It became problematic especially at high velocity.
    • After that, we favored noise over ghosting, as soon as the occluder moved.
    • Now by default, we still favor noise over ghosting but there's the possibility (in the advanced parameters) to not consider the occluder movement as a rejection condition which can be used for low velocity movement where ghosting is not really pronounced.
     
    rz_0lento likes this.
  13. phil-harvey

    phil-harvey

    Joined:
    Aug 27, 2014
    Posts:
    75
  14. Lex4art

    Lex4art

    Joined:
    Nov 17, 2012
    Posts:
    445
    The idea that in decal material base map has gradient opacity and has checkbox "affect smoothness" active. So, in the end this effect is just darker color + smoothness increase by opacity gradient:
    Wetness decal settings.jpg
     
  15. m0nsky

    m0nsky

    Joined:
    Dec 9, 2015
    Posts:
    257
    I've been following the PR, thanks for introducing these options, this will definitely work.
    Do you know if there are any fixes planned for DLSS + DXR, and DLSS + Physically Based DOF?

    When using DLSS + DXR, a lot of checkerboarding/pixelated edges are visible.



    One thing I've managed to find so far is that the resolution of the denoisers seem to affect this. You'll not only notice this inside the toolset, but also on top of the helmet if you look closely. (you might need to open the image in full size) Keep in mind, these images are not zoomed in, this is actually how choppy it looks.



    I believe this is related to the issue that popped up when the ray traced reflection upscale radius was removed in PR 2798. Ever since, half resolution ray traced reflections have become jagged and kind of unusable, which was not happening prior to the PR.

    Another downside to this change was that midrange hardware (ie RTX 2060/2070) now also need to switch to the full resolution effects to get around this "regression" so to speak, which is too heavy for these cards.



    Another point I'd like to bring to attention is that the denoiser is not functional for multiple bounces. I am using ray traced reflections with 2 bounces for my realtime cinematics, but the second bounce is always noisy.



    As for DLSS + Physically Based DOF, it seems to tank performance, performing worse than native resolution. A performance hit is expected compared to the regular DOF, but something seems to be conflicting with DLSS. I've tried all open PR's (including PR 4848 from this morning) but no luck so far.

    Edit
    I submitted a bugreport for the performance issue regarding DLSS + Physically Based DOF. (Case 1339656)

    Edit 2
    I just got an email stating they have successfully managed to reproduce the issue.

    Edit 3
    I've also submitted a bugreport for the DLSS/DXR pixelated scaling issues. (Case 1342588)
     
    Last edited: Jun 26, 2021
    PutridEx, sqallpl, rz_0lento and 5 others like this.
  16. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    Last Alpha20 very stable but lagging system is huge! For example if you want open folder in windows, it takes years or you try move open window.
     
  17. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    Hi!
    Silly question:
    LOD system is supported in DXR?
    When I crested basic LOD I noticed this black splotches:
    Capture.PNG
     
  18. Lex4art

    Lex4art

    Joined:
    Nov 17, 2012
    Posts:
    445
    LODs are working, but ray tracing doesn't see them - it builds an "BSP-tree-something" using only first LOD0 of every object with and when switching to lower LOD happens this causes a problems (almost exclusive to ray traced shadows, though); same for shader-animated grass/tree leafs - they're moving by their shadow are not witch causing bad artifacts all other their surface.

    Fixing those shadow artifacts is possible only via several hacks:
    - In "Ray tracing settings" increasing "Ray bias" value - so ray tracing shadows will have increased tolerance to different geometry. But this fix comes with a price - it will increase gap between object and it's shadow, so small thin objects/tiny details will be "floating" (enabling contact shadows probably can mask that), ray traced reflections/AO/GI/refraciton also will receive some "floating" problems/light leaks here and there.
    - Switching off ray traced shadows per light back to shadowmaps will fix that, but all limitations/artifacts of traditional shadowmaps will be there.

    Personally I'm just rising LOD switching distances to unreasonable high values so those artifacts are not recognizeable but meanwhile gathering guts to try write my own LOD manager that at scene start will automatically find all objects with LOD group component on them -> grab LOD distance data from them -> disable this LOD group component -> expose all LODs to ray tracing all at once to force it to calculate those "BSP-tree-something" for each LOD0-1-2-3-4 object and then manually switch visibility of each LOD of each model using gathered data adapted to Vector3.Distance (ray tracing seems to be working with appearing/disappearing models just fine if they're where present at level start & have no LOD group component on them). But maybe there are some hidden bottlenecks that will ruin this idea when there will be many objects to switch on/off all at once + video memory cost is unknown ... or transition between LODs will not be seampless (those shadow artifacts may pop-up and slowly fade away)... testing needed.
     
    Last edited: Jun 18, 2021
    chap-unity likes this.
  19. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
  20. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    I think right now Ray Bias higher value is best solution. I just start making pipe-line for exteriors that`s why I bother about it.
    0.03 Ray Bias solve problem, also there is no need to have accurate contact shadows for exteriors (can be supported by good level of OCC).
    Of course this needs improvement (LOD) in future. But now I can go forward. Thanks!
     
  21. auzaiffe

    auzaiffe

    Unity Technologies

    Joined:
    Sep 4, 2018
    Posts:
    255
    Currently looking at a solution to support LODs "properly"
     
    newguy123 likes this.
  22. auzaiffe

    auzaiffe

    Unity Technologies

    Joined:
    Sep 4, 2018
    Posts:
    255
    Here is a working example with the construction light from the old HDRP template. I'll soon do a PR for it.

    upload_2021-6-25_19-12-37.png
     

    Attached Files:

    sqallpl, PutridEx, newguy123 and 6 others like this.
  23. Lex4art

    Lex4art

    Joined:
    Nov 17, 2012
    Posts:
    445
    I've noticed that in latest beta changelog there is a mention of new ray tracing "Mixed" mode for GI/reflections:
    New ray tracing mixed mode.png
    But switching to this mode doesn't increase my fps (at least in comparison with ray tracing GI in "Performance" mode). Is it really working? Or it's requires more tricky activation?
     
    Last edited: Jun 28, 2021
  24. m0nsky

    m0nsky

    Joined:
    Dec 9, 2015
    Posts:
    257
    You can read more about what the "mixed" (hybrid) mode does in the PR over here.
    Not everything can be added to the ray tracing acceleration structure, so the mixed mode makes it possible to blend this with ray marching to show things that otherwise would be invisible in your ray traced effects.
     
    Lex4art and chap-unity like this.
  25. chap-unity

    chap-unity

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    760
    Yes, it won't probably bring some performance increase, like @m0nsky said, it was more about being able to include un-supported things in the Ray Traced Reflection for example, like VFX particles or Decals.

    It's basically expensive ray marching (not the same algorithm used in regular SSR) and then perf ray traced reflection when the screen space algorithm is failing, so it makes sense not to expect wonders in terms of perf since it was not the goal in the first place.
     
    Last edited: Jun 28, 2021
    keeponshading, Lex4art and m0nsky like this.
  26. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,248
    Has any progress been made with the denoiser (or GI) working on far away objects? I seem to recall something like anythying further than 50m does not get denoised (or GI) or something to that effect...
     
  27. chap-unity

    chap-unity

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    760
    AFAIK, there's no max distance limit specifically for the denoiser.
    The upper limits for max ray length have been removed for a while now on latest HDRP.
     
  28. m0nsky

    m0nsky

    Joined:
    Dec 9, 2015
    Posts:
    257
    Is there any ETA when these todo's will be picked up in HDRenderPipeline.RaytracingReflection and HDRenderPipeline.RaytracingIndirectDiffuse? :D

     
  29. auzaiffe

    auzaiffe

    Unity Technologies

    Joined:
    Sep 4, 2018
    Posts:
    255
    I think it's just lost in the backlog.

    Can you please create a fogbug and i'll look at it.

    Best,
     
    m0nsky likes this.
  30. m0nsky

    m0nsky

    Joined:
    Dec 9, 2015
    Posts:
    257
    Thanks @auzaiffe, I really appreciate it.
    FogBugz case 1346374

    Edit
    About ray binning in XR, would it be preparing two sets of binned rays for two dispatches, or do a combined ray binning (both eyes) for a single dispatch? (The last option seems super tidy and makes the most difference in XR, but I assume is harder to develop)
     
    Last edited: Jun 29, 2021
    auzaiffe likes this.
  31. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    937
    Last edited: Jul 1, 2021
    newguy123 likes this.
  32. Rich_A

    Rich_A

    Joined:
    Nov 22, 2016
    Posts:
    338
    I agree, updating this for 2021.2 would be a huge help. I think its necessary to have a DXR HDRP template officially.
     
  33. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    789



    A DXR version of the current Termplate Scene is being worked on.
     
  34. auzaiffe

    auzaiffe

    Unity Technologies

    Joined:
    Sep 4, 2018
    Posts:
    255
    For now we've decided to go with binning the ray seperately. Maybe i'll implement the joined binning at some point, but it will require a bit more work. PR is open for the issue.
     
    m0nsky likes this.
  35. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,248
    @auzaiffe @chap-unity could you shed some light on raytracing with the hardware raytrace capable AMD 6800 XT or W6800 please with Unity? I made a seperate thread about it but no naswer from Unity staff on that one...
     
  36. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    937
    Unity 2021.2.0bx

    Has anyone an idea how to find the reaons for this Deallocate on pointer issue.


    all.JPG

    click bring me here

    hdrpt.JPG
     
  37. Lex4art

    Lex4art

    Joined:
    Nov 17, 2012
    Posts:
    445
    No idea, last 3-4 versions has this error (too obvious to bugreport) and it's still there in b2...
     
  38. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    Latest versions of Alpha and beta totally useless...but lets be patience ;)
     
  39. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    937
    Leave this here because did not understand this behavoiur.

    Unity 2020.2.0bx

    In Editor play of my dxr scene i get often
    10 to 15fps on play.

    However. It should have 50 to 60.

    The scene starts always with expected frame rate when i set this Play Mode Settings

    load.JPG

    Without these settings there is a total inconsistent fps behaviour in the editor.
     
  40. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    937
    After working a while in the Editor, fps gets slower and slower and it ends in a windows stop blue screen with greetings from the graphics memory.

    It also happens in the small office demo.
     
  41. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    Some my tests grass for upcoming Exterior pipe-line:
    image_064_0000.jpg image_065_0000.jpg image_066_0000.jpg image_067_0000.jpg
     
    jcarpay, Rowlan, PutridEx and 7 others like this.
  42. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    937
    Leave this here, because searched so long for an solution.

    Topic: TAA smearing from video textures and external injected video streams (spout here)

    The last digit are running very fast , are sent from an external unity application and are not readable with default rendering.
    Same for all other moving screen content like video textures or moving ui content.


    upper screen: normal rendering of an injected spout stream -> TAA smears everything and moving content is badly smeared up to not readable at all

    screen below: Custom Pass, NoTAA rendering -> good readability from static and fast moving screen content

    Thanks to alelivr who did an custom pass after request.
    https://github.com/alelievr/HDRP-Custom-Passes

    see
    Render Video Without TAA
    custom pass example and simply add it to your project like on screenshot.

    and

    new spout implementation who finally works with DX12 from keijiro
    https://github.com/keijiro/KlakSpout

    4.JPG
     
    Last edited: Jul 14, 2021
    Lex4art likes this.
  43. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    I have as always silly question:
    How to increase this ridiculous too low bit rate in Unity Recorder?
    High profile offers still very bad quality (useless when you want to edit created video in After Effect for example).
    I need at least 15.000-20.000 kb/sec. Maybe is way to edit some scripts?

    Capture.PNG
     
  44. m0nsky

    m0nsky

    Joined:
    Dec 9, 2015
    Posts:
    257
    I just noticed this PR for case 1342588 but this doesn't fix the issue. This only makes it impossible to create a situation where the issue is the most apparent (half resolution effects, DLSS performance), but this is not something you'd use in a real world scenario, this was used to highlight what's going wrong for the bugreport.

    Edit
    It's definitely just the ray traced reflection denoiser. I watched the Lego Builder's Journey tech video and they ran into the same issue. I'm doing the same trick they are doing now, 4 samples per pixel with no denoiser, until a better solution is available.

    Is there any way I can locally test running the ray traced reflection denoiser pass at full resolution or after DRS upscale?
     
    Last edited: Jul 9, 2021
    Lex4art likes this.
  45. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    New SunFall SSAA (Lagacy MadGoat)
    I really like this AA solution which reduce a lot noise from Physical Lights through Nvidia features. By reducing samples and Denoise lvl. I got really good fps boost not mention quality:
    image_072_0000.jpg image_073_0000.jpg image_074_0000.jpg image_075_0000.jpg image_076_0000.jpg
     
    TerraUnity, jcarpay, ftejada and 8 others like this.
  46. Lex4art

    Lex4art

    Joined:
    Nov 17, 2012
    Posts:
    445
    Nice shots )
     
  47. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    937
  48. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    keeponshading I must export my interior scene (beta/alpha is broken) and roll back to official 2021. Soon!
     
  49. chap-unity

    chap-unity

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    760
    FYI, I just updated the master branch to latest 2021.1.14f1 version.

    I will update again when 2021.2 will get out of beta. (but you can already update it, shouldn't cause any major issue now that it is up to date with HDRP 11)
     
    keeponshading, Rowlan and newguy123 like this.
  50. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    I feel like in home (Lightwave Icons) ;) :
    Capture.PNG