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
    2021.1.0a9
    Finally you got it. Best version of Unity DXR so far! :)
    Background GI and direct light works as should do!
     
    fuzzy3d likes this.
  2. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,248
    Do you start with the 3D template or the HDRP template?
    ...and then from there enable all the raytracing?

    I find that ANY project I start from either 3D or HDRP template, with 2021.1.0a8 or 2021.1.0a9 immediately starts with error before I even get into the project the 1st time:

    upload_2020-12-12_17-28-42.png

    WHen the project then eventually starts, I dont see any compilation errors. Its only when I try enabling raytracing features when the errors start

     
  3. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    newguy123 I have my own HDRP core since many months. I do not start new template (waste time) I just copy/paste project (whole Unity folder) and after that open and wipe all stuff which I do not need: objects and textures.
     
  4. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    This Ampere 3090 is Amazing with new Unity. Very complex scene, 4K textures, QHD animation resolution.Got 2 FPS/sec in Pure DXR High Quality render!
    GPUa.gif

    gpu.jpg
     
    m0nsky likes this.
  5. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,248
    Can we see a screenshot?
    What do you consider a very complex scene?
     
  6. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    newguy123 I can not show you any of renders (confident policy about design)
    Also this is not commercial project (this is my side test of the my actual project - to see on what stage is Unity with DXR)
    Size of project: medium, typical standard but complex in details. Lightwave and Rhino objects. No Bake, no UV Light Maps (only my UV maps), 4K textures.

    One more important thing: 2 bounce lights. With new Ampere I stopped using 1 bounce light...is completely senseless for Interior renders.

    2.png img_001.png img_002.png
     
    Last edited: Dec 14, 2020
  7. cdriehm

    cdriehm

    Joined:
    Nov 22, 2016
    Posts:
    4
    Does anyone here know if there is a roadmap for enabling raytracing in VR? or possibly a current method for doing so? I'm aware that performance would likely be poor, but still would like to start working on it with hopes that software optimization and future hardware could make it run smoothly.
     
  8. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    HDRP supports VR, even DXR in VR. It's just Unity's current VR solution doesn't, which is frankly silly. Basically before the new Unity XR system, DXR still worked in VR, now the new thing is limited to DX11 on Windows and we'd need DX12. There's not been any official response on this so no idea if Unity is going to resolve this. See this thread: https://forum.unity.com/threads/dxr-in-virtual-reality-possible-or-not.992183/
     
  9. cdriehm

    cdriehm

    Joined:
    Nov 22, 2016
    Posts:
    4
    Great, thanks! So do you think that using the "legacy" VR system with an older version of Unity would be a viable solution for now?
     
  10. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    There's no good option today. Basically best you could get would be to use the last 2020.1 version that still supported the old style VR and try to hack in the newest HDRP that you could.

    But DXR and DX12 has gotten improvements on newer HDRP and Unity versions so just going back to say, 2019.4 and HDRP 7 will not give you that great results and you can't use the latest improvements because current Unity versions don't support DX12 on VR..
     
  11. DGordon

    DGordon

    Joined:
    Dec 8, 2013
    Posts:
    649
    How is performance with DX12? For a good while, just enabling DX12 tanked the fps massively ... is that basically fixed now (meaning, is this becoming a viable option to have toggled on/off in settings)?
     
  12. m0nsky

    m0nsky

    Joined:
    Dec 9, 2015
    Posts:
    257
    It has improved but there's still a pretty big performance hit compared to DX11. Makes me think what Vulkan ray tracing could mean for Unity. Nvidia driver 460.89 with support for Quake II RTX + Vulkan ray tracing released a couple of minutes ago. Maybe there's someone on the team who could hack together an experimental editor build in their sparetime? :p
     
  13. Weidz_

    Weidz_

    Joined:
    Feb 15, 2018
    Posts:
    41
    If the RT implementation has been hardcoded for the DirectX API since the beginning then it is unlikely a sparetime-made hack could port it to Vulkan this easily
     
  14. copperrobot

    copperrobot

    Joined:
    May 22, 2013
    Posts:
    69
    Trying out a horror scene:

    2020.2 - This is all RT shadows, and some reflections. GI works well. However I have yet to get emissive materials casting their own light/shadows. The light at the top is emissive, but no matter how bright I make it it will not cast any light.

     
    m0nsky likes this.
  15. Lex4art

    Lex4art

    Joined:
    Nov 17, 2012
    Posts:
    445
    copperrobot - emissive lighting is very weak, you can see it working only at very specific Exposure values (for "Fixed" exposure mode it's "-3") and "Clamp" parameter (that limits brightness of emissive/bounced light) in ray traced GI settings is set to "4" or more. General rule - emissive lights can be used for scene lighting purposes but only if emissive surface is huge (at least square meter or better 5+ m2). Also with single bounce GI mode emissive lighting won't have light bounces because it's implemented like reflected light itself.

    But it's free (no additional cost to GI) and casts smooth area shadows (also free). Dealing with noise is a challenge, though - it's tricky to balance Clamp, GI distance and Exposure parameters to work together...
     
    Last edited: Dec 22, 2020
    fuzzy3d likes this.
  16. copperrobot

    copperrobot

    Joined:
    May 22, 2013
    Posts:
    69
    Ah sure, well I guess I could expand it further. Would just be nice to be able to have some self illuminated objects that cast their own light. Hopefully that's a feature on it's way.
     
  17. Lex4art

    Lex4art

    Joined:
    Nov 17, 2012
    Posts:
    445
    Bright enough emissive surfaces produces tons of fireflies/hot pixels and even in offline rendering denosiers those are unsolved problem, hard to expect that real time > 5ms per frame denoisers can deal with that (maybe with NN magic but definitely not on math-based accumulation + blurring solutions). Hope I'm wrong here...
     
    Last edited: Dec 22, 2020
  18. copperrobot

    copperrobot

    Joined:
    May 22, 2013
    Posts:
    69
    Strangely an older scene I worked on was fine with emissive:



    This was a year ago, without any crazy issues and running in realtime. Very simple of course, and the glow does take a while to go away. It's just a shame it's not really worked since.
     
  19. Lex4art

    Lex4art

    Joined:
    Nov 17, 2012
    Posts:
    445
    Emissive surfaces working, but only when they're large enough - this way low-intensity light is produced from large surface and can actually lit something around while it's low intensity allows denoiser do it's job. But for small high-intensive sources - like lamps from post above - it's not an option, and with distance like 50m and more noise becomes a problem - denosier has "quality cascades" and distant ones are not good enough to kill hot pixels - large bright spots will be all around....
     
  20. copperrobot

    copperrobot

    Joined:
    May 22, 2013
    Posts:
    69
    Well, hopefully they figure it out, in the meantime I guess lighting can fake most of it.
     
  21. wenzy

    wenzy

    Joined:
    Nov 17, 2015
    Posts:
    44
    I have a question about the metal reflection. Does anyone know the ray tracing can only reflect the direction light? I found some color is totally black on the bottle. Normally , it should be orange. I'm not sure is there any other settings can avoid this
     

    Attached Files:

    • tttf.jpg
      tttf.jpg
      File size:
      76.8 KB
      Views:
      480
  22. Lex4art

    Lex4art

    Joined:
    Nov 17, 2012
    Posts:
    445
    Ray traced reflections simply not reflecting other ray tracing effects - GI, AO, shadows (rasterized shadows used instead). So, they're fast enough but often looks cheap as hell. If you're using procedural skybox - try to increase brightness and orange tint in ground settings to make those dark spots go away, but after that every reflection will be bright and orange (even in completely dark place).
     
  23. auzaiffe

    auzaiffe

    Unity Technologies

    Joined:
    Sep 4, 2018
    Posts:
    255
  24. Lex4art

    Lex4art

    Joined:
    Nov 17, 2012
    Posts:
    445
    *maybe it's already noticed, but just in case*
    In latest branches (10.x.x release, 12.x master) ray tracing GI in quality mode completely broken (every object affected by GI turns super bright). Maybe this related with propagation of this bugfix into those branches...

    Bugreported (Case 1307454).
     
    chap-unity likes this.
  25. chap-unity

    chap-unity

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    766
    It's known indeed and it's currently being worked on.
    Hopefully this will be fixed shortly and backported to the soon to be released HDRP 10.3
     
  26. auzaiffe

    auzaiffe

    Unity Technologies

    Joined:
    Sep 4, 2018
    Posts:
    255
    Issue fixed here: https://github.com/Unity-Technologies/Graphics/pull/3206
     
    Lex4art, rz_0lento and m0nsky like this.
  27. m0nsky

    m0nsky

    Joined:
    Dec 9, 2015
    Posts:
    257
    Hi @auzaiffe ,

    Thanks for your work as always. I am currently trying to improve DXR performance by using a custom acceleration structure manager that makes use of caching, culling and async tasks to update on demand, to completely eliminate any CPU overhead that comes with DXR, to bring DXR to 144hz/VR.

    I have tried optimizing the RTR/RTGI upscaling before and a few weeks ago I noticed your work in PR #2798 which changes the denoising strategy for ray traced reflections by removing the upscaling function.

    I have compared the performance difference before and after this change.

    Commit c658c22f48c4861cd4ae655d92d6c883c9451f01 (before) : 78 fps (12.8ms)
    Commit 0cf69b68b41d8a67a3b6fae549d73d1d53b11833 (after) : 88 fps (11.3 ms)

    This is a massive performance increase for RTR, and I wonder if we could achieve the same with RTGI, but keeping the upscaling option available as optional.

    This could lead to another massive performance increase for most situations (possibly even hit 100fps in my example scene?), but we would still be able to toggle the upscaling function in edge cases where it's necessary (cinematics, low light).
     
    fuzzy3d and rz_0lento like this.
  28. fuzzy3d

    fuzzy3d

    Joined:
    Jun 17, 2009
    Posts:
    228
    I know silence is better than bullshit, but, WOW!
     
    Last edited: Jan 22, 2021
  29. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,248
    I'm getting lost in all the acronyms

    RTR = Raytrace Reflections
    RTGI - Raytrace GI

    Is that correct?
     
  30. chap-unity

    chap-unity

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    766
    Yes. You got it right :)
     
    newguy123 likes this.
  31. Lex4art

    Lex4art

    Joined:
    Nov 17, 2012
    Posts:
    445
    I'm trying to use latest branches with needed fixes but there is some kind of PS5 related error:
    Code (CSharp):
    1. Exception: Compute Shader compilation error on platform 25 in file D:/U - TEST 2/HDRP_GitHub/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl:165: Couldn't open include file 'Packages/com.unity.render-pipelines.ps5/ShaderLibrary/API/PSSL.hlsl'.
    2. HDRP will not run until the error is fixed.
    3.  
    Tested with latest master & 10.3 branches - no luck, same problem. I did wait for a couple of days but seems this is still not addressed for some reason - does anybody know how to surpass this (or should I just wait)? Is there something new to import procedures or this "com.unity.render-pipelines.ps5" thing is simply missing? How I do it:
    How I import HDRP in my project.png

    Thanks in advance!
     
  32. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    789
    All version 12 of anything Render Pipeline related is for Unity 2021.2 alpha. You will be getting errors since the alpha isn't out yet.
     
  33. Lex4art

    Lex4art

    Joined:
    Nov 17, 2012
    Posts:
    445
    I thought so, but with Unity 2020.2 + HDRP 10.3 it's the same. Nevermind, I've managed to copypaste bugfix codes from GitHub and put those in to last PS5-free HDRP branch (2021 staging) - seems to be working fine, VRAM not leaking and new clamping for performance mode is really better handling color value (thanks to auzaiffe!).
     
    Last edited: Jan 23, 2021
    fuzzy3d and Grimreaper358 like this.
  34. valarnur

    valarnur

    Joined:
    Apr 7, 2019
    Posts:
    440
    Shall support for PS5 platform added in v12 backport in v10+?
     
  35. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    Some shots from my new interior (WiP): image_2021-01-26_01-10-27.jpg image_2021-01-26_01-11-47.jpg image_2021-01-26_01-14-09.jpg image_2021-01-26_01-15-25.jpg image_2021-01-26_01-17-51.jpg
     
    NotaNaN, m0nsky, sendspace and 5 others like this.
  36. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    NotaNaN, m0nsky, sendspace and 3 others like this.
  37. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
  38. auzaiffe

    auzaiffe

    Unity Technologies

    Joined:
    Sep 4, 2018
    Posts:
    255
    VR is indeed a complex question because every tiny performance impact can make the program go from fine to un-usable. I'll keep that in mind when working on the rtgi denoisers. I have a bunch of improvements in minds for all of them, but if i improve that one i'll see what i can do.
     
    m0nsky likes this.
  39. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,248
    I watched last night's NVidia Unity Raytracing Webinar and thoroughly enjoyed it @pierred_unity

    However, I think I missed the bit about having the scene view and game view with different settings.

    I'm not making an app, but will be using raytracing for high quality visualisation. I will be using Unity Recorder in conjunction with cinamachine, to offline render 4K image sequences.

    My scene is HUGE, and I mean HUMONGOUS. Ideally I will be working in scene view to arrange things, but it gets slow very quicly navigating. How can I get the scene view to use low quality or minimal settings, while keeping the Gamne View High quality?

    Ideally I will have only 1 view visible at a time. That way I can work in scene view and only use game view to quickly see if things look ok, so the game view is ready for Unity Recorder.

    Makes sense?
     
    NotaNaN and Ruchir like this.
  40. chap-unity

    chap-unity

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    766
    Hey, In HDRP quality settings are applied to both (scene and game view), so you can't do anything there.

    However, there's a system called "Frame settings". These frame settings can be set by default in the HDRP Default Frame Settings (Edit > Project Settings > HDRP Default Settings).
    Here you can say that the scene camera (and every new camera) will not see decals for example (or ray traced effects in your case).

    Now those settings will be used for two things : the scene camera and as a default frame settings (hence the name) for any new camera created in the hierarchy.
    Now, you can override theses frame settings in each camera by enabling "custom frame settings" checkbox at the bottom of the general tab. Here you can override the decal checkbox and enable it for your camera to see decals again.

    That way you can see the rendered decals in the game view but not in the scene view.

    upload_2021-1-28_16-1-30.png
     
  41. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,248
    Thanks @chap-unity that info helps.

    Is there also some kind of half resolution and quarter resolution setting somewhere that I can flip between working on the scene and between outputting the final offline frames?

    I'm expecting my viewport to come to an abrupt crawl while working as I will be setting up a HUGE scene with thousands of high poly objects and plenty 4K textures.

    Typically we need to output high quality still images at 6000 X 4000 and animation sequances at 4K. I'm pushing the limits straight out the gate to see if we can make the switch from traditional DCC offline rendering to Unity.
     
  42. m0nsky

    m0nsky

    Joined:
    Dec 9, 2015
    Posts:
    257
    I recommend creating two HDRP assets, one for editing and one for rendering.
     
    newguy123 likes this.
  43. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    Update:
    WiP_B_apartament.jpg
     
    Gokcan and petersx like this.
  44. formatc2013

    formatc2013

    Joined:
    Jul 4, 2016
    Posts:
    30
    hey guys how's it going?
    I am looking for the DDGI script from this video, is that a feature, that I can access from the SmallOfficeRayTracing repo, or from anywhere else?
    thanks
     
  45. chap-unity

    chap-unity

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    766
    Unfortunately, AFAIK, there's no way to set a specific resolution (or a multiplier in you case) for the scene view currently. You can only control a few things in the camera button in the scene view (like FoV, Near/Far clipping plane distance and TAA...)

     
  46. Lex4art

    Lex4art

    Joined:
    Nov 17, 2012
    Posts:
    445
    Buildmark is finally released on Steam (Early Access) - meh, two months ago I wrote "almost ready"... that joke about "when you feel that your project is finished on 90% there are actually another 90% of work ahead till release" - it's not a joke, never has been! XD

    Now there is an official forum thread for future updates but I still post here best screenshots with ray tracing :).
     
    Last edited: Jan 29, 2021
    OCASM, Yanus3D, chap-unity and 4 others like this.
  47. chap-unity

    chap-unity

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    766
    No, as far as I know, this work (DDGI) is on pause/hold at the moment.
    What your get in the SmallOfficeRaytracing (and ultimately in latest HDRP package) is Ray Traced Global Illumination (aka RTGI)
     
  48. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,248
    I'm still having issues getting rid of those 2 warnings, despite having everything checked in all assets and quality levels. Tried with Both 10.2.2 and also 11.0

    upload_2021-1-30_17-59-35.png
     
  49. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    789

    What you enabled is the frame settings. So that's telling HDRP to render those effects to the camera. You didn't actually enable those settings yet for the renderer. That will be under the HDRP tab under Quality. Select HDRP then choose the pipeline asset in use to the right and then you will see those effects in the list to enable. As well as all the other HDRP rendering settings.
     
  50. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,248
    Its already enabled there also. Still doesnt go away

    upload_2021-1-30_19-36-39.png