Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

Official Unity Experimental HDRP DXR

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

  1. m0nsky

    m0nsky

    Joined:
    Dec 9, 2015
    Posts:
    263
    Since we're talking about path tracing, from a physically correct standpoint, it sounds impossible and wrong. (the reason you can see it, is because it is participating)

    What are you trying to achieve?
     
  2. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    This is the standard system in architecture rendering when you have flags for the different behavior of surfaces/objects. In this case, it is typical when you have a physical sky + Sun as a light source for the scene and a cylinder background with texture (for example photo city view) for the view behind windows.
    Because you do not want to influence the scene with other extra lights from outside you must exclude it (in this case cylindrical object) from GI. The second reason is that background simulation (this is fake) need to be overexposed (for view purposes) which makes the whole situation even worse with GI.
    Of course background (fake solution) must contain also the flag "cast shadow".
    here are examples of flags:


    Ashampoo_Snap_Thursday, 23 February 2023_16h22m5s.png

    There are many combinations of those for many purposes.
    In case I need to Disable those flags:
    - Unseen by Rays (yes, the object cannot be visible in reflection - sounds strange but In many situations is better not to see it)
    - Unseen by Radiosity (exclude from GI)
    - Cast Shadows, Self Shadow, Receive Shadow (exclude from casting shadows)
    You notice that Unseen By Camera is Enabled (otherwise the object will be invisible)

    In Unity, I can simulate practically all of them - DXR
    In Pathtracing no.
     
  3. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    (WiP)
    DXR, UHD 15 fps:
    Vernissage_020.jpg Vernissage_025.jpg Vernissage_017.jpg Vernissage_018.jpg Vernissage_019.jpg
     
    Last edited: Feb 24, 2023
  4. Yanus3D

    Yanus3D

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

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    Update with Path Tracing Interior_027.jpg Interior_028.jpg Interior_029.jpg Interior_030.jpg Vernissage_026.jpg :
     
  6. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,281
  7. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    newguy123
    My destination resolution is WQHD always.
    Is difficult to see real fps when Path Tracing - is around 5 fps for WQHD
    Denoiser Intel + AOVs (I always use Intel also here in Lightwave) because is better than Optix

    About Denoiser,
    This needs to be upgraded with the Blending option:
    Ashampoo_Snap_Saturday, 25 February 2023_11h44m39s.png

    We have this in our Lightwave Kray Engine. The reason for that is to reduce the aggressiveness of denoise engine, fewer artifacts, less clean images (is not good to have a perfect clean still image)
    This idea is quite difficult to do technically but a good coder can manage it.
     
  8. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,281
    so you're denoising with Lightwave, not Unity?
     
  9. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    No, I just show what we have there if we talk about blending Denoise and what I would like to have in Unity.
     
  10. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,281
    Nice!

    How many Pathtracing samples did you use with the above images?
     
  11. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    I think 2000 Rays (2-4 min), generally this is too high value and now starts the problem: If I reduce the number of rays I get too many artifacts. That's why I mentioned before, the BLENDING option will allow going lower with good quality.
     
  12. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    Got new PC (i9 6 Ghz+DDR5 6 Ghz+M2 7200 Mbit/sec+4090)
    here is the FPS score in WQHD (DXR, high-quality mode):
    img_001.png
    other tests:
    - Windows 11 starts 3 sec
    - Average Unity Project start 4-5 sec
    - Compiling Unity Project (from Turbo Backup or manual backup) 20-40 sec (before with Dual Xenon 5-10 min)
    - Windows 11 Installation around 50 sec
    - Lightwave 3D 2015 Installation around 7 sec (before was like 3-4 min with Dual Xeon v3)
    - Delete the whole Unity Project folder around 5 sec (before 3-5 min)
    AMAZING ;)
     
  13. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,281
    Which flavour 4090 did you get?
     
  14. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
  15. supaworst

    supaworst

    Joined:
    Mar 26, 2012
    Posts:
    45
    Hello everybody,

    sorry for the disruptive post but i'd like to understand if there is a known issue with RT global illumination or other RT effects and transparent materials.

    I'm trying to use ray traced global illumination but it seems to be broken with transparent materials since they display totally black if there isn't any light near them (in my setup i have a lot of lights placed in the boundaries of a very high ceiling, think about it like a big warehouse lighted by some artificial lights coming from the ceiling).

    If i switch any of the materials of any of the objects placed on the ground from lit opaque to lit transparent they become totally dark.

    Is anybody aware of this behaviour? I prefer to ask here before sending a useless bug report.

    I'm using unity 2022.1.20 with HDRP 13.1.8 paired with a RTX 2080 GPU

    Thanks in advance to anyone that will reply!
     
  16. Lex4art

    Lex4art

    Joined:
    Nov 17, 2012
    Posts:
    455
    Ray tracing effects working separately from each other so in reflections there is no ray-traced GI and you see only direct lighting without any bounce lighting; in RT refraction there is no RT GI and no RT reflections; and so on.

    Someday ray tracing will be replaced with path tracing (it does all GI/reflection/shadows/refraction unified way so all those lighting effects done via same ray using much more computational resources), but for now this is it. You can bake lightmapped lighting + lightprobes and than switch to ray tracing - in RT reflections there will be lightmapped GI visible, but often this is not an option due static nature of baked lighting.
     
    Last edited: Mar 23, 2023
  17. supaworst

    supaworst

    Joined:
    Mar 26, 2012
    Posts:
    45
    @Lex4art Thanks a lot for your reply, i was thinking that with RTX i would solved all the baking tasks but i was wrong. Anyway, i think that's could be the right occasion to test out the new lightprobes volume component
     
  18. Lex4art

    Lex4art

    Joined:
    Nov 17, 2012
    Posts:
    455
    Btw, Cyberpunk 2077 "overdrive" update with path tracing will be released next month (11th April):

    However there is some kind of mix between RTX Direct Illumination and path tracing - will see soon what does this mix brings on the table :) and how much of path tracing was left in it.
     
    Last edited: Mar 30, 2023
    Jomoko89 likes this.
  19. blueivy

    blueivy

    Joined:
    Mar 4, 2013
    Posts:
    637
    I’m excited to see RTX DI in a shipped title. Just seeing actual area light with shadows will do wonders for the image.
     
  20. impheris

    impheris

    Joined:
    Dec 30, 2009
    Posts:
    1,747
    basically they are counting on dlss3 XD
     
  21. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    m0nsky
    I have two tech questions (I am a noob as hell):

    1. When I switch to Path Tracing mode, is Unity supposed to disable any Anti-Aliasing itself or do I have to do it manually (In my case, uncheck DLSS leaving no AA at all)?

    2. When I use DXR system I see a smudge screen effect when I move the camera or object (Thats ok, it is a very demand process as we know) But when I disable the Volume Container with DXR, still Physical lights (For example Direct Sun Light) smudge (Raytracing Shadow and denoiser are ENABLED still of course). Is that Normal? or is there any option in unity that reduce this effect?

    Thanks!
     
  22. m0nsky

    m0nsky

    Joined:
    Dec 9, 2015
    Posts:
    263
    1. If you enable path tracing, DLSS will be disabled. You can see this in the NVIDIA device debug view (Window -> Analysis -> Rendering Debugger -> Rendering)

    2. It's normal, it's caused by temporal accumulation (DLSS, TAA, Denoisers). There are many ways to improve it, but I don't think it's planned currently. If you want a temporary workaround, you can try disabling the denoiser and increasing the sample count.
     
    Lex4art likes this.
  23. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    Does this means is Enabled? :
    | img_002.png
     
  24. m0nsky

    m0nsky

    Joined:
    Dec 9, 2015
    Posts:
    263
    What version of Unity/HDRP is that? I think it is loaded but not doing anything (input resolution matches the output resolution and slot id 0)
     
  25. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    It's lagging so DLSS is ON
    2022.2.13f1
     
  26. Jomoko89

    Jomoko89

    Joined:
    Apr 5, 2013
    Posts:
    1

    I really wanted to love HDRP DXR. I spent a year making a game that uses DXR only to learn that the ray tracing effects are all done separately and thus my game will not be presented in a way I'm happy with. I will be waiting for a path tracing update to DXR until then. for now please enjoy some screenshots of my first person base building game.

    And some of my first experiments with DXR:


     
    Yanus3D, Lex4art and blueivy like this.
  27. Lex4art

    Lex4art

    Joined:
    Nov 17, 2012
    Posts:
    455
    Played in Cyberpunk 2077 v1.62 with mentioned path tracing implementation - it's working! With severe limitations and artifacts on moving objects/or when objects lit only with GI second and up bounces, distant-based simplifications, transparent surfaces like water and glass are not included but it is working, solving main issue of GI not present in reflections and vice versa. And it's working even on my laptop RTX 3070 (desktop equivalent in performance is RTX 2080) - in 1920x1080 with DLSS balanced I've got around 40 fps.

    Some visual issues clearly comes from the fact that this game was not created with path tracing from the start so many rasterization hacks mess the effect here and there, but it's so much better to have this limited path tracing than nothing XD:
    20230416135923_1.jpg 20230416155346_1.jpg 20230414230242_1.jpg 20230414225213_1.jpg 20230415194143_1.jpg
     
    Last edited: Apr 16, 2023
    sacb0y, chap-unity, blueivy and 2 others like this.
  28. impheris

    impheris

    Joined:
    Dec 30, 2009
    Posts:
    1,747
    yeah is cool, but, sorry, what is your point?
     
  29. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    Hi
    First test from my special script for offline animation system
    features:
    - camera queue
    - any resolution render - of course, this depends on your GPU VRam
    - can render any heavy/extreme scenes with a huge amount of physical lights (off-line system)
    - timeline can have all cameras without any connections (simple list) - composition is done in After Effect
    - start rendering without setting destination resolution (this is set in the script so your Play Mode can be set as free aspect)
    - render in the background (you can hide or move Unity and use other software at the same time)
    - automatic back to Editor (You can start rendering from Editor in Wire mode and you will be back there - this prevents burning GPU when the sequence is finished and you are away)
    - preventing all glitches from Unity DXR like Edge smoothing, Random Explosion Brightness from Physical Lights
    - many others

    Please remember this is an offline render system - Performance is last on the list from my expectations

     
  30. lacenwolk

    lacenwolk

    Joined:
    Nov 28, 2023
    Posts:
    2
    Hi, is hdrp working with ray tracing and ecs?
     
  31. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    lacenwolk I do not know...I am only an offline RenderMan guy ;)
     
  32. chap-unity

    chap-unity

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    808
    HDRP indeed offer a set of ray traced features. I suggest you read documentation to learn more about them.
    As for ECS compatibility, I algo suggest you read the documentation about hybrid renderer as well.
    There's plenty of examples on youtube about ECS + HDRP :)
     
  33. Weidz_

    Weidz_

    Joined:
    Feb 15, 2018
    Posts:
    41
    Path Tracing renders totally black on my builds but works fine in editor, any idea ? Tested latest 2022f and 2023b