Search Unity

Unity Unity Experimental HDRP DXR

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

  1. Janusz_Biela

    Janusz_Biela

    Joined:
    May 6, 2019
    Posts:
    263
    Not to say I sleep :cool: I add to my surface system HDRP StackLit (great quality):

    image_001_0000.png image_002_0000.png image_003_0000.png image_006_0000.png
     
  2. Janusz_Biela

    Janusz_Biela

    Joined:
    May 6, 2019
    Posts:
    263
  3. Janusz_Biela

    Janusz_Biela

    Joined:
    May 6, 2019
    Posts:
    263
    auzaiffe can you provide correct setting for Global Illumination from Background light sources (Gradient Sky or Physical Sky) which do not gives issue with reflections? I really stuck with this and it seems it not working properly for me....
     
  4. Lex4art

    Lex4art

    Joined:
    Nov 17, 2012
    Posts:
    353
    *Recently updated from 2021.1f1 to 2021.2a12 - wow, editor performance 50-100% faster in complex scenes with ray tracing. Impressive!*
     
    keeponshading and fuzzy3d like this.
  5. Janusz_Biela

    Janusz_Biela

    Joined:
    May 6, 2019
    Posts:
    263
    ...and finally Specularity can be disable for each light separately! :p
     
  6. Janusz_Biela

    Janusz_Biela

    Joined:
    May 6, 2019
    Posts:
    263
    Looks like latest alpha (12) is the best DXR version so far. Super Reflector option for spot/IES lights - gives a lot more realism for light power physical behavior . :cool:
     
    sqallpl likes this.
  7. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    718
    Do you had have some problems with recursive rendering and raytraced reflections.
    I get total bright orange spots in all alphas?
    Somehow the volume overides need layers set they are gone from my project a long time ago.

    I checked all my prefabs and geometrys in project. The volume overiddes need a layer whos is not in my project anymore. Tried everything i could imagine. for hours.
     
  8. Janusz_Biela

    Janusz_Biela

    Joined:
    May 6, 2019
    Posts:
    263
    Latest Alpha is definitely best DXR version of Unity right now (loved new DoF engine!)
    image_011_0000.png image_013_0000.png image_014_0000.png image_015_0000.png image_016_0000.png
     
    Rowlan, m0nsky and sqallpl like this.
  9. Janusz_Biela

    Janusz_Biela

    Joined:
    May 6, 2019
    Posts:
    263
    Also improvement speed render! (I get like 30 fps in 940 pix resolution)
    image_017_0000.png image_018_0000.png image_019_0000.png image_020_0000.png
     
    hippocoder, Rowlan, m0nsky and 4 others like this.
  10. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    718
    When i upgrade my DXR scene to
    2021.2.a12

    my HDRP Lits (mainly all transparent materials) look like

    1.JPG

    i have to switch to any other shader than back to HDRP Lit to get the full options like

    2.JPG

    Does anyone has an idea why and how to solve for all materials?
    Tried also to upgrade "HDRP Material to latest HDRP option" which doesnt help in this case.
     
    Last edited: Apr 13, 2021
  11. Lex4art

    Lex4art

    Joined:
    Nov 17, 2012
    Posts:
    353
    Rendering is fine for me, no orange spots - I can recommend to check it out with fresh new project, old one can hold some settings that didn't fits with new alpha improvements & changes in code.

    About layers - well, it's like that since forever: placing object on a layer outside of standard set and later moving this object to the project that didn't have this layer will cause tricky behavior (as far as I can remember this object will be moved to "Default" layer but only till you give a name one of the empty layers - object will instantly move on this layer again without any notice, it keeps number of previously assigned layer somewhere in its *.meta file and returning to it as this layer receives any kind of name (matching original or not)). My suggestion is to give a distinct names to all layers with empty name field (like "ERROR 01", "ERROR 02") that will makes them active again and check out assets that causing troubles - they're will be on one of those "ERROR" layers I guess, only after that you can safely remove them to correct layers (like to 'Default') and this time it will work fine and won't be switched/ignored.

    Hope this helps (probably this problem has some tools to correct all this automatically, but I didn't dig it much).
     
  12. Lex4art

    Lex4art

    Joined:
    Nov 17, 2012
    Posts:
    353
    ftejada, chap-unity, sqallpl and 5 others like this.
  13. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    718
    Thanks for the detailed help and info.

    There is this great tool where you can transfer all your layers to others
    https://github.com/YondernautsGames/LayerManager

    I tried this and it works in general.
    But it cannot handle layers in prefabs like described in the github issues of the project.
    1.JPG

    So meantime i found out there seems to be no way to transfer geometrys to layers project wide when you use prefabs in a clean way.
    When you work with prefabs there seems to be a big problem.

    Like i said the old layers don t exis anymore project wide but they need to be set in volume overides to render these.
    I had to go back with my project to unity dxr experimental 2 years ago before e i introduced these layers.
    So all between work in between versions is lost and unfixable. There are hundreds of complex prefabs i my project with complex layer settings.

    To make it clear, even by selectiing objects manually and trying to transfer them to new layers is not possible at all.
    Even by manually reimport, unpack, repack the prefabs and by trying to transfer layers manually.
    They stick to the layer once set and are not moveable anymore. Unity UI displays they belong to the new layer i transfered these but internally they still belong to the old layers.

    The ui says they belong to the new transfered layer. But they are not. They seem stick internally to the "zombie" layer.

    All project between version up to todays 2020.1.x are not fixable anymore.
    At least i found no way up to now and this generates an absolut showstopper to use layers and prefabs.

    So using prefabs and layers is not recommended and possible in Unity because you generate Zombie Layers there you never get back ore are transferable over time?

    To to set Recursive Rendering Layer i have to add 15 old layer names who are not existing anymore to render all my transparent objects the right way.

    Adding new stuff to the project with layers set become impossible becuase you crossfire will the old existing ones you cannot transfer anymore.

    The problem is up to hundred of hours to set layers correctly is lost and not correctable in future Unity versions anymore? For me it seems to be a century bug.) Hope i am completly wrong here.
     
    Last edited: Apr 14, 2021
  14. copperrobot

    copperrobot

    Joined:
    May 22, 2013
    Posts:
    61
    Been working on some experimental pieces recently. These are in order of most recent first, but all using full DXR (GI, Reflection, AO, Shadows etc):








     
    Rowlan, m0nsky, keeponshading and 5 others like this.
  15. m0nsky

    m0nsky

    Joined:
    Dec 9, 2015
    Posts:
    111
    @auzaiffe I noticed that a lot of noise has been introduced for moving objects compared to before, and my first guess is that this was introduced in PR #3343. Is there any way we can get some control over (or an option to completely disable) the velocity threshold?

    Before (december 2020)



    After (april 2021)



    RTGI/RTAO was acceptable for moving objects before but has now become unusable.

    I will try to locally revert the PR for now but it's quite difficult because of recent API/naming changes.

    Edit
    Same applies for the RTSS PR, I will try to locally revert this also until a better solution is available.

    Edit 2



    When the car is moving, disabling the RTGI denoiser produces less noise than having the denoiser enabled.
     
    Last edited: Apr 19, 2021
  16. chap-unity

    chap-unity

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    211
    Hey, thanks for the feedback ! Really appreciated.
    I agree this can be problematic. With a lot of effects that uses accumulation, most of the time, it's a tradeoff between noise and ghosting.
    In this specific cases (RTAO and RT shadows), we switched from ghosting to noise indeed because we believe it was still an improvement for the majority of the cases, but I agree the best way would be to give this artistic control to the user.
    As you can see on the PR, the idea of a "speed rejection" threshold has already been discussed and it was not really feasible right now with how it has been implemented.

    However, I believe we could at least make that an advanced parameter, a boolean to allow users to choose between rejecting history or not when the object is moving since the current threshold is really low.
     
    keeponshading and Lex4art like this.
  17. m0nsky

    m0nsky

    Joined:
    Dec 9, 2015
    Posts:
    111
    Would it be possible to define a max number of frames used for temporal (denoiser) accumulation to find a good working balance instead of a boolean?

    Edit
    Speed rejection would probably be the best option here. (and have the number of frames depend on the velocity?)
     
    Last edited: Apr 19, 2021
    fuzzy3d likes this.
  18. chap-unity

    chap-unity

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    211
    I agree with this, I'll log something and see what can be done to further improve this.
     
    keeponshading and m0nsky like this.
  19. Janusz_Biela

    Janusz_Biela

    Joined:
    May 6, 2019
    Posts:
    263
    Lex4art likes this.
  20. chap-unity

    chap-unity

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    211
    Hey @Janusz_Biela, We can't guarantee support since this plugin is out of our hands, but I just tried (latest a14 with latest HDRP) and it seems to work. The CTAA Custom Post Process is hooked just before post process so it should apply to ray traced effect like anything else.
     
    m0nsky and Lex4art like this.
  21. Janusz_Biela

    Janusz_Biela

    Joined:
    May 6, 2019
    Posts:
    263
    never mind I just bought it because is 50% off now as starter new plugin v3!
    Setup looks incredible Simple: add to post process volume :)
    Works in latest alpha. Will try post some tests soon!
     
    Lex4art likes this.
  22. Janusz_Biela

    Janusz_Biela

    Joined:
    May 6, 2019
    Posts:
    263
    ...Also MadGoat has plan to back develop his plugin (limited Unity versions) Lets keep cross finger for his decision!
    With both plugins: CTAA and SSAA we will have full solution in rendering!
     
  23. Janusz_Biela

    Janusz_Biela

    Joined:
    May 6, 2019
    Posts:
    263
    This is what I got so far (zoom x2).
    CTAA soft:
    CTAA.PNG

    CTAA sharp:
    CTAA_sharp.PNG
     
    AydinDeveloper and wetcircuit like this.
  24. Janusz_Biela

    Janusz_Biela

    Joined:
    May 6, 2019
    Posts:
    263
    Some renders in FullHD:
    image_2021-04-28_02-48-41.png image_2021-04-28_02-50-14.png image_2021-04-28_02-52-48.png image_2021-04-28_02-53-56.png
     
  25. Lex4art

    Lex4art

    Joined:
    Nov 17, 2012
    Posts:
    353
    Seems to be working quite well, thanks for information )
     
  26. Janusz_Biela

    Janusz_Biela

    Joined:
    May 6, 2019
    Posts:
    263
    Lex4art is not big deal in quality for static images ...actually for me as off line render system it has low impact for quality but blur effect on edges gives better quality in low resolution when TAA from Unity is activated. Of course I prefer SSAA as still images AA solution.
    I need test it more (CTAA looks promise) and also I want check what happen when I activate MadGoat.
    Activating CTAA now I do not see practically any impact on speed render! so If I will add SSAA MadGoat as low quality it can be best solution.
    Will back with more info about it ;)
     
  27. Lex4art

    Lex4art

    Joined:
    Nov 17, 2012
    Posts:
    353
    Bough 5$ assets pack with construction site stuff and mixed it with my old assets for new main menu design in Buildmark beta 3 - nice! But porting all those items to work with my runtime material replacement pipeline/texture density 1m per tile ... it will be a challenge:
    20210502112154_1.jpg

    Also new look & feel for Play mode lobby (but performance is meh, need to tweak (probably shadows samples/sun diameter too high)): 20210502112213_1.jpg
     
    Last edited: May 2, 2021
  28. Janusz_Biela

    Janusz_Biela

    Joined:
    May 6, 2019
    Posts:
    263
    Lex4art cool job! I follow you project since beginning ...its really developing nicely!
     
    chap-unity likes this.
  29. sqallpl

    sqallpl

    Joined:
    Oct 22, 2013
    Posts:
    271
    I have a question. I'm wondering if the raytraced AO effect is visible on semitransparent materials. Or maybe it works similar to standard SSAO which is not visible on them?

    Thanks.
     
  30. chap-unity

    chap-unity

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    211
    Transparent materials won't receive RTAO (same as they do with SSAO) indeed.
     
    sqallpl likes this.
  31. wm-VR

    wm-VR

    Joined:
    Aug 17, 2014
    Posts:
    80
    I am proud to share my first HDRP raytracing screenshot with you!

    RTX 3070, 1080p,

    image_010_0000.png
     
    Last edited: May 12, 2021
  32. wm-VR

    wm-VR

    Joined:
    Aug 17, 2014
    Posts:
    80
    ...
     

    Attached Files:

    Janusz_Biela and m0nsky like this.
  33. m0nsky

    m0nsky

    Joined:
    Dec 9, 2015
    Posts:
    111
    Absolutely stunning @wm-VR , hope to see more of your work here.

    A feature I would love to see is the ability to use HDRI lighting when creating games with DXR in performance mode. Currently the HDRI does not contribute to the first bounce which makes all of the lighting render black.

    Performance mode (1 bounce)



    Quality mode (2 bounces)



    - If this is actually unintended, let me know and I will set up a sample project and report it as a bug.
    - If this is intended and not possible, it would be nice to add a second bounce option to performance mode, since it is faster, and has a half resolution option, compared to the quality mode which is not suitable for game use.

    Thanks!
     
    wm-VR likes this.
  34. auzaiffe

    auzaiffe

    Unity Technologies

    Joined:
    Sep 4, 2018
    Posts:
    68
    With the current design of our performance mode, it not possible nor wanted to add a second bounce to the performance mode. That said, the problem here is simply the ability to have a fallback for both the indirect diffuse and indirect specular. For the indirect diffuse the ambient probe or any light probe should do the trick (make sure to set it in the lighting menu) and for the indirect specular having a sky or a reflection probe should do the trick. Let me know how it goes.
     
    chap-unity likes this.
  35. m0nsky

    m0nsky

    Joined:
    Dec 9, 2015
    Posts:
    111
    Understood, that will do the trick for now.

    I seem to be running into some inconsistent behaviour when combining realtime ray tracing with reflection/ambient probes. I've been toggling my probes on/off (both in the scene and lighting panel), clearing and baking and now it's rendering the correct result, but my settings are exactly the same as before. It's a bit hard to reproduce and submit a bug report.

    Sometimes the probe contribution seems to turn overexposed with only the ambient probe enabled, sometimes it all turns black (like in my previous post), and right now it seems to be correct.
     
  36. auzaiffe

    auzaiffe

    Unity Technologies

    Joined:
    Sep 4, 2018
    Posts:
    68
    If you can find a good repro, i'll gladly look at it. I understand that reproducing may be tricky :(
     
    m0nsky likes this.
  37. m0nsky

    m0nsky

    Joined:
    Dec 9, 2015
    Posts:
    111
    I've created a boilerplate project ready to test HDRP + DXR + DLSS. (PR #3484)
    All you need to do is clone the project, load it in 2021.2.0a17, open Scenes/samplescene and hit play.

    https://github.com/m0nsky/hdrp_dxr_dlss

    The project will run at 3840x2160 (using DLSS Balanced) by default and has the following options enabled:

    - Ray traced global illumination
    - Ray traced reflections
    - Ray traced ambient occlusion
    - Ray traced shadows

    You can disable/change DLSS settings by clicking on the Main Camera and opening the Rendering tab.



    Performance metrics on my RTX 3080
    Native : 35 fps (baseline)
    DLSS Maximum Quality : 61 fps (1.74x)
    DLSS Balanced : 73 fps (2.06x)
    DLSS Maximum Performance : 87 fps (2.49x)

    There also seems to be a great improvement in motion (in terms of blur) when DLSS is enabled compared to TAA.
    I've also noticed the heavier you make use of ray tracing, the more performance increase you'll get from DLSS.

    2 bounces RTGI + 2 bounces RTR @ 3840x2160
    Native : 17 fps (baseline)
    DLSS Maximum Quality : 35 fps (2.06x)
    DLSS Balanced : 43 fps (2.53x)
    DLSS Maximum Performance : 54 fps (3.17x)

    Currently the only issue I've found is that the framerate will significantly drop upon enabling physically based DOF, it does not play well with DLSS in it's current state.
     
    Last edited: May 19, 2021
  38. GeniusKoala

    GeniusKoala

    Joined:
    Oct 13, 2017
    Posts:
    35
    How did you add DLSS inside your project? I see you have some custom packages.

    upload_2021-5-14_18-7-2.png

    And the Unity 2021.2 log talks about NVIDIA native package but I can't find it.
     
    MagiJedi and fuzzy3d like this.
  39. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    718

    wow. Thanks for the project.
    Very impressive.

    think Ultra Performance should be = Ultra Quality.)

    DLSS.JPG
     
  40. Janusz_Biela

    Janusz_Biela

    Joined:
    May 6, 2019
    Posts:
    263
    Thanks! Now we talk about :D
    We will test ;)
     
  41. Janusz_Biela

    Janusz_Biela

    Joined:
    May 6, 2019
    Posts:
    263
    This what I got:
    Max Quality:
    max_quality.png

    Balanced:
    balanced.png


    Max Performance:
    max_performance.png
     
    keeponshading likes this.
  42. Janusz_Biela

    Janusz_Biela

    Joined:
    May 6, 2019
    Posts:
    263
    Ah....forgot: no DLSS ;)
    no_DLSS.png
     
    sendspace likes this.
  43. DGordon

    DGordon

    Joined:
    Dec 8, 2013
    Posts:
    607
    How is dx12 performance these days? Whats the hit if RTX is turned off vs sticking with dx11?
     
  44. Janusz_Biela

    Janusz_Biela

    Joined:
    May 6, 2019
    Posts:
    263
    DXR trough dx12 is next generation, DX11 die slowly as old technology. Everything goes to real time computation: games, architecture.
    For me as off line architecture render designer is REVOLUTION: getting 5000+ times faster rendering than standard CPU rendering.....
     
  45. Janusz_Biela

    Janusz_Biela

    Joined:
    May 6, 2019
    Posts:
    263
    DiD some tests with MadGoat Soft Filter.
    DLSS max performance:
    MaxPerformance.png

    DLSS + MadGoat soft filer (no upscaling):
    MadGoat_Soft.png

    DLSS off, no Anti-Aliasing at all:
    no_DLSS.png
     
  46. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    718
    First fast DLSS test.... on a RTX 2080 (Laptop)

    Unity 2021.2.0a17
    2560x1440

    Ray traced global illumination
    - Ray traced reflections
    - Ray traced ambient occlusion
    - Ray traced shadows

    TAA

    everything fine. in movement too.

    taa.jpg


    Unity 2021.2.0a17
    2560x1440

    Ray traced global illumination
    - Ray traced reflections
    - Ray traced ambient occlusion
    - Ray traced shadows

    DLSS Maximum Quality

    In the orange squares i get a during camera movement a flicker dico par exellence on the chrome an glass parts and the the edges in general are very jaggy.

    Most visible during camera movement or gemoetry movement (opening door).
    The quality against TAA is much worse in movement for high detailed geometry.

    For now i don t get the point of DLSS.
    Is it to run an 2560x1440 optimized scene on 3840x2160 upscaled with less quality?
    Is TAA in addition possible in future implementations?


    DLSS.JPG

    This screeshot shows better the quality during movement.

    DLSSmovement6.jpg
     
    Last edited: May 15, 2021
  47. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    718
    Thanks for the test.
    Is the Mad Goat Soft Filter working good during movement and
    did you try CTAA V3 HDRP on DXR scenes?
    Liked it in BuiltIn RP and gave me some cinematique quality with slower camera aimations.
     
    Last edited: May 15, 2021
  48. Janusz_Biela

    Janusz_Biela

    Joined:
    May 6, 2019
    Posts:
    263
    keeponshading where from I can get this interior car scene for testing?
     
  49. Janusz_Biela

    Janusz_Biela

    Joined:
    May 6, 2019
    Posts:
    263
    keeponshading did not yet have time to test CTAA V3....soon will check!
     
  50. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    718
    I ported the scene from Unity DXR Experimental to actual version and use it as DXR test scene. Unfortunately the scene is not public available.
     
unityunity