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. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    867
    Another thing, reflection probes need the option to be baked with either path tracing, or using the same rendering settings as the raytraced realtime lighting.

    Right now unless you have baked lighting reflection probed don't render properly. Now i think you can just bake lighting and turn off baked lighting in the render settings (EDIT: No it makes things look weird). But if you want to release a fully raytraced only game, that's simply wasteful.

    Proper baked reflection probes would solve a lot of problems, and may even allow separating that aweful HDRI Sky effect from the actual scene rendering.

    Some samples...

    No reflection probe full raytraced lighting
    upload_2021-7-31_23-45-55.png

    Baked reflection probe without baked lighting only raytraced
    upload_2021-7-31_23-45-28.png

    With baked reflection probes and baked lighting and raytracing
    upload_2021-7-31_23-58-55.png

    Path tracing
    upload_2021-7-31_23-51-24.png

    I think the key here, is that the baked lighting only helps the reflection probe, it does not help the overall lighting. It's otherwise wasted data to have those light maps isn't it? On top of that i think the reflection probe would be more accurate using a path traced or realtime raytraced setup.

    upload_2021-8-1_0-0-10.png

    Better reflection probes would get more accurate results, cause the above probe does not look accurate to me.

    In this scenario I would need to tune both real time raytacing and baked lighting to get accurate results. Viable, but shouldn't be nessecary.

    It doesn't even matter if these are rendered at very low resolution either since their primary use would be for rough surfaces not reflective ones.

    EDIT: And this may also make something like updating probes for a time of day transition to not be as much of an issue as well. Requiring some optimization but at very low resolutions may be feasible.
     
    Last edited: Aug 1, 2021
    PutridEx, sendspace and m0nsky like this.
  2. m0nsky

    m0nsky

    Joined:
    Dec 9, 2015
    Posts:
    257
    This is the same issue I'm currently running into with car paints / clear coats. It seems like there is simply no way to make them work when you're using ray tracing.

    They now rely on reflection probes, which don't work with ray traced lighting.
     
  3. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    I made some WiP previews from exterior. Really difficult scene...I think I throw my self to deep water a bit far than usually. At least I will see what are limitations for exterior in off line rendering.
    SSAA_20210801_23540754_1080p.jpg SSAA_20210801_23545006_1080p.jpg SSAA_20210801_23531768_1080p.jpg SSAA_20210801_23532769_1080p.jpg SSAA_20210801_23533836_1080p.jpg
     
    sqallpl and sendspace like this.
  4. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    m0nsky I have question:
    How I can exclude LEM object from GI but still keep it in reflection surfaces?
    Here screenshot where background cylinder (this city image) gives me reflection effect on glass inside room but I do not want GI from this object. I tried all know by me tricks but it did not work .....
    Capture.PNG
     
  5. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    I found solution ....
    I am not sure is bug or it must work in this way:
    City background Excluded from GI but still something wrong:
    CaptureA.PNG

    Same setup except slightly moving bar for Smoothness Fade Start (correct effect)
    CaptureB.PNG

    It is very annoying that we do not have "easy exclusion flags". Would be much easier if we have in each surface options for excludes like:
    - Unseen by Camera
    - Unseen by GI
    - Unseen by reflection
    - cast shadow on/off
    Everything in one place!
     
  6. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    867
    Isn't this what "layer mask" is for? IT's currently set to everything.
     
  7. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    sacb0y yes excluded layer mask
     
  8. auzaiffe

    auzaiffe

    Unity Technologies

    Joined:
    Sep 4, 2018
    Posts:
    255
    Last edited: Aug 5, 2021
  9. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    867
    Oh that sounds promising!

    Ah i see, might be related to the above then.
     
  10. m0nsky

    m0nsky

    Joined:
    Dec 9, 2015
    Posts:
    257
    I've been trying out the PR, and thanks to the configurable ray miss & last bounce fallback hierarchy you're able to use full ray tracing to realistically light interiors inside an outdoor scene with HDRI, without any light leaking.


    Before PR #5303


    Configuring the fallback hierarchy


    After PR #5303

    However, the current setup for RTR only works if you use lights, not with emissive meshes.


    Various metal materials inside the room, lit by a light + emissive meshes


    The same setup, lit only by emissive meshes

    I thought about this for a bit and I don't think there's a way this could work. (unless it would ray trace the GI in the reflections, which is way too heavy), so I'll stick to lights for now. :D
     
    Last edited: Aug 5, 2021
  11. Lex4art

    Lex4art

    Joined:
    Nov 17, 2012
    Posts:
    445
    It will be nice to have denoised path traced reflections as option to replace ray traced ones, and already some people in twitter showing early attempts to write purely path traced renderer + denoiser. Seems to be possible, but how fast all this stuff in real tasks... well, at least multi-chip AMDs GPU architecture are rumored to be coming next year and this may lead to very fast expansion in GPU power like this happened with CPUs - if same leap from 4 cores to 16 in mass market in just 3 years will happen with multi-chip GPU architectures - maybe we will have path tracing on the market much sooner than predicted by Nvidia (2035), maybe someday AMD or someone else will try to put purely path traced hardware to the mass market because path tracing scales best for that multi chip architecture design...
     
    Last edited: Aug 7, 2021
    sendspace and m0nsky like this.
  12. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    867
    This comes back to the reflection probe issue then.
     
    m0nsky likes this.
  13. m0nsky

    m0nsky

    Joined:
    Dec 9, 2015
    Posts:
    257
    Edit
    I tried reverting PR #2755 but no luck. I will be playing with this some more, there must be a way to make this work. :D
     
    Last edited: Aug 6, 2021
  14. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    Guys if you will improve reflection quality that will be jackpot! I know is not easy task but at least would be nice to give up this ugly reflection fall back color and also environment direct reflection. Both are completely out of quality Ligue ....
     
  15. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    867
    To me the solution is simply a baked pathraced reflection probe.

    That would be the most performant solution, and should visually look pretty good.
     
    sendspace likes this.
  16. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    Rowlan, Elecman and m0nsky like this.
  17. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    #2
    2021-08-09_01h13.jpg 2021-08-09_01h05.jpg 2021-08-09_01h08.jpg 2021-08-09_01h09.jpg 2021-08-09_01h12.jpg
     
    Rowlan, Elecman and m0nsky like this.
  18. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
  19. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,248
    How far away are we from having trees work correctly on terrain? Currently I'm not getting correct shadows
    Also, other detaisl like grass etc on terrain. Is there a rough ETA?
     
  20. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    newguy123 yes feature completely not working in DXR yet....I also waiting for this (very difficult Arch Exterior system is without terrain module)
     
    newguy123 likes this.
  21. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    937
    Hi. Nice progress.
    Do you have some screenshots how these interior looks in realtime with dynamic camera?
    An realtime screesnhot from the the first gras render you sent some weeks before would be nice too?
     
  22. Yanus3D

    Yanus3D

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

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    So, before when you watch:
    - I use MSI Afterburner to reduce power of Ampere (no need full power and overheat - loosing nothing in speed of fps and practically is no big differences between 100% and 80% but temperature is very low and practically total silence from fan system)
    - For normal production (preview FullHD) I use One Bounce Light + HQ setings + SSAA
    - For final production (4k) I use Two Bounce Lights + HQ settings + standard Unity AA (no need ultra quality AA for 4K+ resolution)
    - you can notice differences in GI quality between 1 and 2 bounce lights (is huge) at 3:15 min.
    Video done in 4K:
     
    Rowlan, PutridEx, Elecman and 4 others like this.
  24. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    keeponshading likes this.
  25. Enigma229

    Enigma229

    Joined:
    Aug 6, 2019
    Posts:
    135
    How are you guys able to get good results without your machine coming to a screeching halt?

    I have a 2070 Super, 64GB memory and a three year old i7 processer and Unity just cries "uncle!" when I try to do ray tracing in HDRP.
     
    JamesArndt likes this.
  26. Lex4art

    Lex4art

    Joined:
    Nov 17, 2012
    Posts:
    445
    Trial and error to find a way to do stuff - in most cases it's about working with lightweight ray tracing preset while placing objects and tweaking materials and after that filming scene with heavy HQ presets.
     
    fuzzy3d likes this.
  27. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
  28. Enigma229

    Enigma229

    Joined:
    Aug 6, 2019
    Posts:
    135
    I figured some of you were using a better GPU.

    I just switched over to my home machine that has a 3070 and the performance is much better (my company thinks a 2070 Super is enough for my work :().
     
  29. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    Enigma229 the only GPU card for professional working right now is Ampere 3090...otherwise you can play games only.
    You need 10K CUDA Cores at least and 16+ Giga Vram.
     
  30. Enigma229

    Enigma229

    Joined:
    Aug 6, 2019
    Posts:
    135
    Professionals with deep pockets as GPU prices are currently insane.
     
  31. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    937
    old, but gold.
    realtime raytracing

    Screenshot_20190410-235931.png
     
    newguy123, Yanus3D and Lex4art like this.
  32. auzaiffe

    auzaiffe

    Unity Technologies

    Joined:
    Sep 4, 2018
    Posts:
    255
  33. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,248
    Nice, but what does that mean in plain english?
    Could you explain it another way please?
     
  34. auzaiffe

    auzaiffe

    Unity Technologies

    Joined:
    Sep 4, 2018
    Posts:
    255
    it means that if you want to can optimize out the mesh culling pass for ray tracing acceleration structure which can be fairly large for large scenes.
     
  35. m0nsky

    m0nsky

    Joined:
    Dec 9, 2015
    Posts:
    257
    Your RTX graphics card is capable of "realtime ray tracing". This basically means it can do hardware accelerated BVH traversal (shooting rays) in a specified geometry structure (the "acceleration structure") on the GPU.

    For this to work with Unity, the GPU needs a copy of all geometry in the scene. On the CPU side, we create an empty acceleration structure, then find all Mesh Renderers in the scene, and add them to this acceleration structure, and then send the acceleration structure we just made to the GPU.

    After that, we can write shaders and tell the GPU to trace rays through the acceleration structure we created.

    If an object moves in your scene, or a new object gets added to your scene, we need to rebuild the acceleration structure on the GPU, to keep it up to date with what you see in the scene.

    Out of the box, HDRP does all of this for you, automatically. However, there could be cases where you'd want to have this in your own control, for example, when you'd like to apply your own caching, culling, updating or mesh simplification logic.

    The PR adds the ability for users to manually specify an acceleration structure, instead of building it automatically. As soon as you set the "Build Mode" (in the Ray Tracing Settings volume component) to "Manual", it will no longer build the acceleration structure for you. Instead, it will use the acceleration structure assigned to the HDCamera. (public RayTracingAccelerationStructure rayTracingAccelerationStructure)
     
  36. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,248
    Nope, doesnt make it any clearer LOL
     
  37. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,248
    Thanks, that makes more sense
    In most cases for offline film rendering, I would assume its best if everything is done automatic for me, correct?
     
    m0nsky likes this.
  38. m0nsky

    m0nsky

    Joined:
    Dec 9, 2015
    Posts:
    257
    Yes, always use the automatic mode. :)
     
    newguy123 likes this.
  39. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    937
    Last edited: Oct 6, 2021
  40. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    937
    Does anyone has problems to build in 2021.2.0b14?

    Two forks of my project directly crash after hitting the build button.
    I did not have any problems all the editor versions before.
     
  41. chap-unity

    chap-unity

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    760
    Manual mode is only for advanced users that really knows what they're doing.
    For now, it hasn't landed anywhere, it's only available in the branch and still in WIP. When merged, it will be available in 13+ (latest 2022.1 alpha).
    For now it's not planned to be backported.
     
    Last edited: Oct 7, 2021
  42. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    I just tested HDRP version of KSW Water System in DXR. Of course reflection is standard SSR and plugin has not support for DXR but I wanted to see what is missing when DXR is activated:
     
    m0nsky, Rowlan, Lex4art and 3 others like this.
  43. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,248
    Looks great!
    Do the rocks get wet from the water, or there's another manual process involved?
     
  44. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    newguy123 I think wet surfacing is on the schedule:
    https://trello.com/b/BUa7pLdp/water-system

    Anyway I love this plugin! Is so physical and easy to manage. After using CrestOcean this plugin (KSW) is like paradise ;), incredible easy to setup , physical colors and behavior, one click button/bar sea waves behavior, real foam, streams, etc.
     
    keeponshading and Lex4art like this.
  45. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,200
    This looks awesome. If you make another video like this, would you mind adding a bit jitter (eg with Cinemachine's handheld setting) and zoom in/out (or just changing the fov to simulate zoom). This could look ultra realistic :)

    I'd do myself, but unfortunately the asset doesn't have a release sale and it's too pricey for just toying around when Unity works on their own water solution.
     
  46. Mauri

    Mauri

    Joined:
    Dec 9, 2010
    Posts:
    2,663
  47. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    Rowlan I will try post video with water flow effect and water interacting with objects ...this is amazing! :)
     
    Rowlan likes this.
  48. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    Mauri
    yes and finally we got HDRP version.
     
  49. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    937
    Thanks for the tip.
    Crazy high quaity atmospheric demo scenes and easy to useness.
     
  50. TerraUnity

    TerraUnity

    Joined:
    Aug 3, 2012
    Posts:
    1,247
    @Janusz_Biela This is amazing, thanks for bringing it up. @Rowlan Right from Unity office again... where can we find more info on Unity's water solution? Because it's been years... ;)