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

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
    Next stuff I add to off line system:
     
    OCASM likes this.
  2. Lex4art

    Lex4art

    Joined:
    Nov 17, 2012
    Posts:
    445
    Some more days on benchmark scene - now with actual FPS at 2560x1080 on 2080Ti. GI in "Quality" mode (single bounce, but still it's too heavy; "Performance" mode is broken for now). And captured using OBS studio (Unity Recorder makes Timeline events shoot in wrong time ... or Pegasus camera addon didn't compatible with Recorder):


    Now it's much more accurate but... missing a lot of good shots from the first version. Meh, some more work to do XD
     
    Last edited: Sep 12, 2020
  3. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    Lex4art looks good! Gi is not accurate but for exteriors is not that important as for interiors.
    This is alpha HDRP 10.x ?
     
  4. Lex4art

    Lex4art

    Joined:
    Nov 17, 2012
    Posts:
    445
    Thanks! Yep, this is latest 10.x
     
  5. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    Great job on last Beta update! You really crash code ;)
    GI from background only.

    background.jpg
     
    OCASM and Lex4art like this.
  6. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    Also LEM works very good! Really great progress in HDRP 10.x ;)
     
  7. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    For what it is and how to use: Probe Volume Controller?
     
  8. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,248
    Where do I find the denoiser?
     
  9. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,248
    Does Amplify shaders work with DXR?
     
  10. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,248
    Its very confusion the settings. There's a global place to enable raytracing, but then each thing also has its own setting for enabling raytracing.

    If you have the global one on, it should just say everywhere else its on. Like it is now, I have my global one on, but on each other thing it says its off, making things confusing
     
  11. Lex4art

    Lex4art

    Joined:
    Nov 17, 2012
    Posts:
    445
    newguy123 likes this.
  12. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    No...I mean works but doesn't work in reflection (you get fail recurse: black) They promised support RTX but no idea when...probably not so soon.
     
  13. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    When is new feature developing (RTX in this case) that is the best idea to deal with it.
     
  14. Weidz_

    Weidz_

    Joined:
    Feb 15, 2018
    Posts:
    41
    Any ETA for a better denoiser ? (for realtime)
     
    Lex4art likes this.
  15. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,248
    can I use an eGPU with DXR in Unity?
    .....or the GPU has to be native in a PC?
     
  16. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    I think this is almost the best solution...maybe in future will be a bit better.
    Solution for now: better GPU card.
     
  17. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,248
    I'm missing a sun disc in the sky. Why am I not seeing the sun disk?

    EDIT: Nevermind, found it!

    upload_2020-9-18_14-1-36.png

    It is very low res however :-(

    upload_2020-9-18_14-3-8.png
     
    Last edited: Sep 18, 2020
  18. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,248
    Nevermind, figured it out.

    Just adjust it in the sky resolution settings
    upload_2020-9-18_16-43-24.png
     
  19. m0nsky

    m0nsky

    Joined:
    Dec 9, 2015
    Posts:
    257
    Quick first test on my RTX 3080, I'd say it's about a 2.5x jump from RTX 2070 -> RTX 3080.



    It's a quite old HDRP version though, today marks exactly 4 months since HDRP 8/9/10 DXR performance mode broke.
     
    Last edited: Sep 18, 2020
  20. Weidz_

    Weidz_

    Joined:
    Feb 15, 2018
    Posts:
    41
    There has to be better solutions already, AAA like Metro or Control have basically no noise and very little temporal artifact, except when moving the camera very fast and even then the temporal fade quite a lot faster than Unity does atm
     
  21. Lex4art

    Lex4art

    Joined:
    Nov 17, 2012
    Posts:
    445
    +1 here, feels like classical math is on her last legs there (were you use few smart and very fast formulas to blur noise in real time) but squeezing some more quality & polishing is possible (use curvature buffer data to solve some specific problematic situations with noise? (like on attached image)); maybe neural networks can do real time denoising much better due their ability adapt to very wide range of context, though... But current state of whole real time ray tracing since HDRP 8 release in April feels like "almost dropped" - while HDRP 9 & 10x itself actively developing (even Path tracing got huge attention in last months) there are almost no news in changelogs about real time ray tracing improvements, probably big bad news ahead (like Unreal team gave up on thorough implementation of real time ray tracing same happening with Unity team now ?). Or maybe it's just a seasonal vacation time + Covid-19 hit for Unity team... Or there are very small team dedicated to DXR (because some things got better here and there, like ray tracing shadows filtering/glass reflections)... Compare this progress to SEUS PTGI releases/features (developed by just one person in depression) and there are a lot of reasons for grim thoughts ...
     

    Attached Files:

    Last edited: Sep 18, 2020
  22. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    Lex4art computation in real time GI is incredible difficult with GPU. Even more complicate is to make it interpolated.
    This is completely different World than CPU. this technology just started....
     
  23. Lex4art

    Lex4art

    Joined:
    Nov 17, 2012
    Posts:
    445
    Also, having some fun prepearing play mode in Buildmark: I've managed to find a sweet spot were I can hide insane denoiser artifacts (huge spots) at distance with short ranged black fog + without sun (direct light) when only emissive textures used ray traced GI is actually very fast and you can spawn hundreds of emissive models as a light sources without much performance loss:
     

    Attached Files:

  24. Lex4art

    Lex4art

    Joined:
    Nov 17, 2012
    Posts:
    445
    And some more:
     

    Attached Files:

  25. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,248
    What is Buildmark?
    I googled it, but cant find anything......
     
  26. Lex4art

    Lex4art

    Joined:
    Nov 17, 2012
    Posts:
    445
    It's an unreleased ray tracing sandbox + benchmark project that I'm working on. First rough version should be available soon but it seems I can't finish it in September... meh...
     
    Last edited: Sep 20, 2020
  27. m0nsky

    m0nsky

    Joined:
    Dec 9, 2015
    Posts:
    257
    Something weird I've noticed, DXR performance modes actually work fine on my RTX 3080. I've cleared my library, changed projects, swapped packages, "it just works" on this card. Maybe it's hardware/driver related after all? It has been broken on my RTX 2070 for months, but on other people's RTX 2070s too.

    Also I'm still wondering, is there anything that can be done to the Global Illumination denoiser? Something seems off, a lot of detail gets lost, pixels seem to translate with weird offsets. I feel like there's some kind of scaling bug going on and it would actually look a million times better if the denoiser gave a better result.

    Denoiser off


    Denoiser on
     
    Last edited: Sep 20, 2020
    rz_0lento, Lex4art and sendspace like this.
  28. auzaiffe

    auzaiffe

    Unity Technologies

    Joined:
    Sep 4, 2018
    Posts:
    255

    Can you precise what you mean by "performance mode is broken"? We have tests that validate that the result doesn't change, it is possible that me do not cover everything. However, "it's broken" is not really helpful to locate what is not working for us.
     
    Lex4art likes this.
  29. auzaiffe

    auzaiffe

    Unity Technologies

    Joined:
    Sep 4, 2018
    Posts:
    255
    A recent PR was merged that breaks that pattern a bit, i would like to know if these screenshots are with or without the improvement.
     
    m0nsky likes this.
  30. valarnur

    valarnur

    Joined:
    Apr 7, 2019
    Posts:
    440
    When will raytracing be production ready?
     
    newguy123 likes this.
  31. Lex4art

    Lex4art

    Joined:
    Nov 17, 2012
    Posts:
    445
    Previously (a couple of weeks ago) GI "Performance" mode was obviously broken (like direct light shadows disappearing and scene goes completely black/white at random). With latest version of 10.1.0-26 preview "Performance" mode is stable but it's not a GI - looks like it's sky-colored ambient occlusion, actual GI light bounces are missing:
    GI performance mode.jpg

    Here single-bounce "Quality" mode for comparison:
    GI quality mode.jpg
     
  32. m0nsky

    m0nsky

    Joined:
    Dec 9, 2015
    Posts:
    257
    This is yesterday's staging, indeed with PR #1771 that uses SampleDiskCubic. But I have tried both and they give similar results. Most useful GI data 'disappears' or more likely has some kind of misalignment of sampleOffset in DiffuseDenoiser.

    Regarding performance mode, on a RTX 2070, the scene gets overexposed (white) because RTGI and RTR are both writing preExposure to the global constant buffer (and overwriting eachother).

     
    Last edited: Sep 21, 2020
  33. auzaiffe

    auzaiffe

    Unity Technologies

    Joined:
    Sep 4, 2018
    Posts:
    255

    Unfortunately, with such little details about your scene and lighting setup it not possible for me to guess where the exact issue is. The best thing would be to share a repro through the bug report system and i'll look at your scene to understand why such a difference.

    The first thing that disturbs me is that your ray length is 10 meters and your scene seems to be at a significantly lager scale. I would recommend using the "High" Preset instead of the custom mode to setup the RTGI.

    For instance, if i take the small office, set the directional light's intensity to 1e6 lux and compare the RTGI's contribution in perf and quality modes. While some very small differences being visible (the translucency of the plants is not supported in Perf, so less green around the plants), the result of both is very close.

    upload_2020-9-21_11-12-44.png
     
    Lex4art likes this.
  34. Lex4art

    Lex4art

    Joined:
    Nov 17, 2012
    Posts:
    445
    Keen eye you have ) - I'm using scene objects downscaled to 1/10 of their original size so 10 meters in GI settings actually means 100 meters in scene (because that weird 50m limit for ray traced GI/reflections/etc is simply not enough for architecture... needed values are 100m ~ 280m in city environment for GI and unlimited distance for reflections with smoothness value around ~0.9-1.0...).

    Thanks for comparison screenshots - "Performance" mode obviously working fine there, probably I need to delete "Library" folder/create new overrides preset from scratch to fix my problem (dropped doing this after 3~months of testing 10.x previews because it was not helping).

    Upd: nope, "Library" deletion + new overrides from scratch - still no GI in "Performance" mode. Will do a bugreport later today with simplest scene setup with this problem...
     
    Last edited: Sep 21, 2020
    newguy123 likes this.
  35. auzaiffe

    auzaiffe

    Unity Technologies

    Joined:
    Sep 4, 2018
    Posts:
    255
    I guess we could rethink the management of the max ray length.This is not the first time i hear someone complain about this one.We will log a bug we'll tackle it.

    If the problem persists, the best way is to push a repro and we'll look at it to figure out what is happening.
     
    newguy123, m0nsky and Lex4art like this.
  36. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    I can't repro the a16+ DXR GI performance mode exposure issue anymore either. I'm still on 2070 Super. I even tried to roll back to drivers and HDRP version where it last broke for me but it still kept working now.
     
  37. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    934
    There is a dependency chain here. We need first to have DX12 out of preview, then DXR out of preview then HDRP raytracing will be out of preview. Due to this, current plan if out of preview for 2021.
     
    Lex4art likes this.
  38. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    auzaiffe how you activate RTGI mode?
     
  39. m0nsky

    m0nsky

    Joined:
    Dec 9, 2015
    Posts:
    257
    I've given the modification of DiffuseDenoiser a go to attempt to get rid of the mismatching coordinates

    It did however immediately reveal how noisy the RTGI output actually is, but it does seem correct now, perfectly usable when you're using full res or upscaling.

    Edit
    See post below.
     
    Last edited: Sep 22, 2020
    rz_0lento likes this.
  40. Lex4art

    Lex4art

    Joined:
    Nov 17, 2012
    Posts:
    445
    "Performance" mode for GI working properly in fresh empty project - so it's not the Library or volume settings, feels more like HDRP configuration files/settings were the source of my problem. Well, another thing to keep in mind while working with preview versions...
     
  41. Mark_29

    Mark_29

    Joined:
    Aug 11, 2014
    Posts:
    79
    Performance is not on par with Quality in regards to the clamp value. I have been using clamp to "brighten" scenes and bring in more GI. I can post a repo of the scene. In my test so far, GI in performance mode is significantly darker - granted it could be my setup. I will try and post screenshots this week (as some are too big for a bug report)

    Is it best practice to keep the clamp value at "1" and push "GI" in interiors using area lights? As phyiscal sky and gradient sky does not boost interiors enough on their own.

    Below is an example of the differences I am seeing between performance and quality (its apparent even with a clamp value of 1, but gets worse the higher the clamp value)
     

    Attached Files:

    Last edited: Sep 22, 2020
    newguy123 likes this.
  42. VRising

    VRising

    Joined:
    Apr 15, 2016
    Posts:
    29
    How did you get the emission to work?
     
  43. m0nsky

    m0nsky

    Joined:
    Dec 9, 2015
    Posts:
    257
    I did some experimenting with ray traced global illumination and reflections because I thought it always looked off.

    - Fixed RTGI denoiser mismatched sample scaling
    - GGX height-correlated smith masking for RTGI/RTR
    - VNDF importance sampling for RTGI/RTR

    Edit
    Removed comparisons, found a couple of mistakes :D
     
    Last edited: Sep 23, 2020
  44. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    Hi Guys! If I do not posting images it does`t men I do nothing ! ;)
    Some test scenes (DXR HDRP 8.x)

    Ocean scene contains Atmos Clouding System and Ocean Crest.
    Everything full DXR.

    Soon I will start testing beta HDRP 10.x. vlcsnap-2020-09-22-21h53m37s937.png vlcsnap-2020-09-20-14h12m53s965.png vlcsnap-2020-09-22-21h57m20s163.png vlcsnap-2020-09-22-21h56m48s604.png vlcsnap-2020-09-22-21h55m20s232.png
     
  45. m0nsky

    m0nsky

    Joined:
    Dec 9, 2015
    Posts:
    257
    I'm also wondering how you got emission to work. I can get it to do something using extremely high intensity values, but that makes the bloom go crazy.
     
  46. Lex4art

    Lex4art

    Joined:
    Nov 17, 2012
    Posts:
    445
    It's just a combination between optimal exposure value, emissive material brightness value, GI with clamp 2 or higher (but noise...) and bloom settings:
    Emissive settings.png
    The optimal settings window is very narrow, one step and it's looks poor or emissive effect is too weak. Note that those settings valid only for completely dark environment + GI distance is 10 times larger in my downscaled scene.
     
    cultureulterior likes this.
  47. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,248

    What kind of values do you add in for the Area lights? Same as the sun or less?
    Also, am I correct in thinking these area light should be rectangular shaped and its size set to my window openings?
     
  48. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    This is standard trick in off line render. You use Area Lights or LEM in windows to boost light inside. I suggest size of the windows glass and position inside room (to avoid not necessary shadowing from windows frames).
    This is necessary trick to avoid strong light from outside (increasing Environment light you increase problems for interior scenes like noise, errors, light leaks, splotches). Solution for that is to use Light Portals with Power Shader system.
     
  49. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,248
    What is power shader system?
    Can't we just use importance sampling in 10.x and use just the sun and sky?
     
  50. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    Power Shader is like multiply power of light source (Physical or LEM) with clamp system reduction. For example: You increase Power by value 3 so Sun will have 3 times more light without seeing 3 time more brightness.
    This is use in interiors to improve Sun light bounces (dark floor is killer for Sun light). This should be in Unity DXR improvement list also.
    Always I use LEM or Area Light in windows, without Light Portals is impossible to get correct GI level. So even with good Importance sampling you should always use support light.