Search Unity

  1. Unity 2020 LTS & Unity 2021.1 have been released.
    Dismiss Notice

Unity Unity Experimental HDRP DXR

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

  1. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    608
    Got it to work. I had to change the default HDRP Pipeline to the new one I created.
     
    Grimreaper358 likes this.
  2. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    740
    Is it the active pipeline asset or do you have other assets that are active but don't have those settings activated?
     
  3. Janusz_Biela

    Janusz_Biela

    Joined:
    May 6, 2019
    Posts:
    212
    Compare Unity/Corona
    Apartament_Unity_Corona.jpg
     
  4. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    608
    1st one Corona and 2nd Unity?

    Stitching on the 1st one's left chair looks a bit odd... and the couch's cushions texture is tiling a bit....

    1st one looks a tad more vibrant and 2nd looks slightly desaturated (but onky when compared to the 1st). If you look at the 2nd one by itself, loosk pretty good!

    Well done!

    I dont know which pic is which, but I think I like the 2nd one more...
     
  5. Janusz_Biela

    Janusz_Biela

    Joined:
    May 6, 2019
    Posts:
    212
    OF course we have still some issues in Unity like glass quality or Direct Sun/background issue.
    But numbers tell everything what to choose:
    - corona can be 2h time render for this quality. Impossible to do animation (horrible render farm cost and waiting time)
    - Unity: under 1 sec.(animation can be done in home in 3-4 h !!)
    Generally in commercial work you do not need ultra quality images. More important is efficiency, pipeline and speed.
    image_2021-01-30_20-11-32.png
     
    GliderGuy and petersx like this.
  6. Janusz_Biela

    Janusz_Biela

    Joined:
    May 6, 2019
    Posts:
    212
    Some final renders:
    image_2021-02-01_00-20-20.png image_2021-02-01_00-24-30.png image_2021-02-01_00-27-00.png image_2021-02-01_00-38-30.png image_2021-02-01_00-44-25.png
     
  7. Janusz_Biela

    Janusz_Biela

    Joined:
    May 6, 2019
    Posts:
    212
  8. Janusz_Biela

    Janusz_Biela

    Joined:
    May 6, 2019
    Posts:
    212
    Here is one question: how about Direct Light and Background light GI issue? Is there some progress with this or...maybe I do something wrong in UNITY settings?
     
  9. auzaiffe

    auzaiffe

    Unity Technologies

    Joined:
    Sep 4, 2018
    Posts:
    63
    You need to precise your question. What do you refer to as "Background Light GI"?
     
  10. Janusz_Biela

    Janusz_Biela

    Joined:
    May 6, 2019
    Posts:
    212
    Sorry for not clear question. Here are examples:

    Directional Light
    Direct_Light.jpg
    Gradient Sky
    Gradien_Sky.jpg
     

    Attached Files:

  11. Janusz_Biela

    Janusz_Biela

    Joined:
    May 6, 2019
    Posts:
    212
    Now example of correct effect:

    Point Light (as Sun)
    Point_Light.jpg

    Area Light as fill light simulated Sky
    Area_Light.jpg
     
  12. auzaiffe

    auzaiffe

    Unity Technologies

    Joined:
    Sep 4, 2018
    Posts:
    63
    Use the "Directional Light FallBack" and "Extend shadow culling" Both available in the ray tracing settings volume. upload_2021-2-2_17-28-3.png
     
  13. Janusz_Biela

    Janusz_Biela

    Joined:
    May 6, 2019
    Posts:
    212
    auzaiffe this option doesn't work....since I remember. I ask because maybe I do something wrong. Unity latest beta.
    "Directional Light FallBack" only reduce brighness of GI.
     
  14. auzaiffe

    auzaiffe

    Unity Technologies

    Joined:
    Sep 4, 2018
    Posts:
    63
    "Directional Light FallBack" doesn't reduce the intensity of the GI. It avoids leaks due to the lack of some information in the directional light cascade shadow map.

    Either i don't understand what you are describing as a wrong behavior there must be something wrong in your setup.
     
  15. auzaiffe

    auzaiffe

    Unity Technologies

    Joined:
    Sep 4, 2018
    Posts:
    63
    If the problem is with the sky's lighting. You need to set your ambient probe to black if you do not provide an proper fallback for the indirect diffuse (light probe light map)
     
  16. Janusz_Biela

    Janusz_Biela

    Joined:
    May 6, 2019
    Posts:
    212
    I think I am here the only stupid one :p
    "You need to set your ambient probe to black" how/where?!
    ""Directional Light FallBack" doesn't reduce the intensity of the GI. It avoids leaks due to the lack of some information in the directional light cascade shadow map." how to make working correct Direct Light?
     
  17. Janusz_Biela

    Janusz_Biela

    Joined:
    May 6, 2019
    Posts:
    212
    Settings are basic (fresh DXR)...simple it doesn`t work this option.
     
  18. Janusz_Biela

    Janusz_Biela

    Joined:
    May 6, 2019
    Posts:
    212
    auzaiffe if you can post more screenshots or maybe basic scene (wetransfer) how to setup Directional Light and Background Sky correctly would be great. Still I cannot make it working properly.
    Also I found another "issue" with distance denoiser filter: when I go far with camera (Point Light):
    Point_light.jpg
     
  19. Janusz_Biela

    Janusz_Biela

    Joined:
    May 6, 2019
    Posts:
    212
    auzaiffe nevermind, I found "problem"...simple in Game Mode everything is ok! I do not know why in Scene Editor I have those issues.
     
  20. Janusz_Biela

    Janusz_Biela

    Joined:
    May 6, 2019
    Posts:
    212
    auzaiffe so I manage to get correct GI effect with Direct Light and Sky. Tell me now why I have differences between Scene Editor and Game?

    scene.jpg

    game.jpg
     
  21. Mark_29

    Mark_29

    Joined:
    Aug 11, 2014
    Posts:
    55
    @auzaiffe - Could you explain how to set your ambient probe to black please?
     
  22. Janusz_Biela

    Janusz_Biela

    Joined:
    May 6, 2019
    Posts:
    212
    So far I see two problems right now in Scene Editor:
    1. It looks like Game and scene editor are different. In Scene Editor sometimes is problem with Direct Light and SKY GI. I got sometimes working properly these two features in Scene Editor when I go to and back from Game (refreshing RTX problem?)
    2. Denoiser do not work in Scene Editor with distance:
    Denoiser.jpg

    Everything is ok in Game.
     
  23. Janusz_Biela

    Janusz_Biela

    Joined:
    May 6, 2019
    Posts:
    212
    Here is sample from my Scene Editor. No BAKE, no reflection probes, Ampere 3090.
     
    landonth, Lex4art, fuzzy3d and 2 others like this.
  24. BananaStem

    BananaStem

    Joined:
    Sep 21, 2017
    Posts:
    36
    I can't get anywhere close to results like this with raytracing, I don't know what kind of magic you're using but I could use a bit of that sprinkled on my archviz work.
     
  25. auzaiffe

    auzaiffe

    Unity Technologies

    Joined:
    Sep 4, 2018
    Posts:
    63
    upload_2021-2-9_12-7-18.png

    Maybe the clipping distances in your scene view are to be adjust? Not sure.
    upload_2021-2-9_12-8-54.png
    You can always report a bug if you think something unexpected is happening
     
    Mark_29 likes this.
  26. Janusz_Biela

    Janusz_Biela

    Joined:
    May 6, 2019
    Posts:
    212
    auzaiffe I will confirm you bugs with Direct Light, Sky and denoiser. Need more time (making new scene right now so I will investigate more deeper).
    So far everything works well in Game...is just something wrong in Scene Editor.
     
  27. auzaiffe

    auzaiffe

    Unity Technologies

    Joined:
    Sep 4, 2018
    Posts:
    63
    @Janusz_Biela the second part of my last message was for you
     
  28. Janusz_Biela

    Janusz_Biela

    Joined:
    May 6, 2019
    Posts:
    212
    auzaiffe will check everything. Thanks!
     
  29. auzaiffe

    auzaiffe

    Unity Technologies

    Joined:
    Sep 4, 2018
    Posts:
    63
    Multiple requests were made (mainly for performance reasons). We've decided to add a new control level for ray tracing acceleration structure on the HDRP side. This code is not available yet (its just pseudo-code), we are still working on it. But here is an overview of how it will look like.
    upload_2021-2-10_14-50-44.png

    For the on demand modes, a c# api will be available on the camera for you to force a rebuild.

    The manual mode implies that you will manage the RTAS yourself and assign it to the camera for rendering. We will provide a helper function for you to be able to have the same flags for the renderer than what HDRP would generate. Without duplicating internal code.
     
    Last edited: Feb 10, 2021
  30. Janusz_Biela

    Janusz_Biela

    Joined:
    May 6, 2019
    Posts:
    212
    Cool! I will test :p
     
  31. Mark_29

    Mark_29

    Joined:
    Aug 11, 2014
    Posts:
    55
    FYI for the developers (as it only happens with RTX):
    This seems to happen with the newest build of windows 10. Everything worked fine for all unity scenes (and versions) until I upgraded to windows 20H2

    This only happens with SLI enabled (Maximise 3D performance), newest windows build (20H2) and RTX enabled in unity (if RTX is switch of this does not happen). Drivers are all up to date and it doesn't matter which version of unity you are running)

    To note, nothing changed on the PC apart from the windows update

    I can post a video if it helps
    PC Details:
    • Processor AMD thread ripper 3970x
    • 2 x Titan RTX cards
    • Windows 10 20H2
     
    Last edited: Feb 13, 2021
  32. petersx

    petersx

    Joined:
    Mar 5, 2015
    Posts:
    232
    Hi,

    Is there is chance to get screenshot from path tracing editor/game window ?
     
  33. Janusz_Biela

    Janusz_Biela

    Joined:
    May 6, 2019
    Posts:
    212
    auzaiffe
    I found strange behavior of Direct Light which affect Area Light. It looks like by activating Direct Light Unity deactivate Area Light (it is in window).
    I do something wrong?
    btw I checked Point Light and this problem doesn't exist.

    FG.gif
     
  34. auzaiffe

    auzaiffe

    Unity Technologies

    Joined:
    Sep 4, 2018
    Posts:
    63
    You probably have 4 slots of screen space shadows declared in your HDRP asset, the directional takes 3 and the area light takes 2. The directional light has precedence over all other lights which means your area light ends using the shadow map instead of the ray traced shadow (probably).

    That said you are not showing anything from the editor or the light setup so am I just guessing.
     
  35. Janusz_Biela

    Janusz_Biela

    Joined:
    May 6, 2019
    Posts:
    212
    Thats corect!
    Thanks!:)
    ...I just started fresh tutorial project: that's why I got this suddenly while in my project is already more than 4.
     
  36. MassiveTchnologies

    MassiveTchnologies

    Joined:
    Jul 5, 2016
    Posts:
    67
    We noticed that frames with Path Tracing take far longer to converge when recording using multiframe rendering vs not using it...for example, the same scene takes 5 seconds to converge to 256 samples vs 25 seconds when multiframe rendering (PrepareNewSubFrame) is being called. Is that expected? I would assume rendering time for each sample should be the same since multiframe rendering is just accumulating frames?
     
  37. Janusz_Biela

    Janusz_Biela

    Joined:
    May 6, 2019
    Posts:
    212
    auzaiffe so far everything works perfect in latest beta. Will give you sign when I found something. :rolleyes:
     
    auzaiffe likes this.
  38. Janusz_Biela

    Janusz_Biela

    Joined:
    May 6, 2019
    Posts:
    212
    auzaiffe still I have problem with this reflections: can you explain again this static light sky or how to setup Sky+Sun not to have issue with reflection?
    Capture.PNG
     
  39. Janusz_Biela

    Janusz_Biela

    Joined:
    May 6, 2019
    Posts:
    212
    Is like metal surfaces gives me light because of Sky.
    When I disable background and use only Area Light everything is ok.
    Capture.PNG
     
  40. Janusz_Biela

    Janusz_Biela

    Joined:
    May 6, 2019
    Posts:
    212
    auzaiffe you can post bug to Unity team about background light sources. Sky, Background generate light leaks from high reflected surfaces. This problem is less (or not) visible due more complex scene when we have more light sources.
    Having only backdrop as only light source shows problem.
    On my preview render this problem is vanished by more light sources like Area Light and general brightness of scene.
    image_005_0000.png
     
    landonth likes this.
  41. Janusz_Biela

    Janusz_Biela

    Joined:
    May 6, 2019
    Posts:
    212
    Hi
    I collected last year of my developing pipe line for Lightwave 3D/Unity under this link! :
    free work potfolio
     
  42. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    1,861
    I tried raytracing in 2021.2.a06

    wolf 1.jpg
    wolf 2.jpg
    wolf 3.jpg
    wolf 4.jpg
    wolf 5.jpg
     
  43. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    7,545
    Raytraced GI seems buggy in 2021.2.a06, anyone else? Seems like something is wrong with the way it reads materials and indirect light explodes.

    Also trying Path Tracing, I like it, but why is it limited to 4096 samples?
     
  44. chap-unity

    chap-unity

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    183
    There has been a regression with RTGI quality mode that has been fixed a few weeks ago that was over-exposing everything but I think it should have been included in the fairly recent a6.
    Is this it or is it something different ?
     
  45. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    1,861
    It's still overexposing in 2021.2.a06
     
    ftejada, h2nr03 and newguy123 like this.
  46. sendspace

    sendspace

    Joined:
    Jul 24, 2016
    Posts:
    40
    hello guys
    i converted my car game to Unity 2021.1.0b12 and am seeing some shocking improvement in both raytracing and performance. thank you unity team <3
     
    fuzzy3d and newguy123 like this.
  47. Lex4art

    Lex4art

    Joined:
    Nov 17, 2012
    Posts:
    328
    List of changes in b12 is huge - seems that months of bugfixes & improvements have arrived all at once ).
     
    PutridEx, sendspace and newguy123 like this.
  48. wenzy

    wenzy

    Joined:
    Nov 17, 2015
    Posts:
    34
    Hi.

    Does someone ever make some instaned object in DXR ? I have made a customed GPU instancing shader modify from HDRP/Lit shader. After some experiments. I found it's not that similar to the "Normal object".Llike the instanced objects can't be reflected (The plane only reflect the cube and also can't reflect the cylinder themselves). They can receive the indirect light from other object。But didn't cast any indirect light by themselves and so the base color didn't affect each other. Not sure what's the reason and is it possible to avoid this?

    I have tested the newest version in Unity 2020 and Unity 2021.
    Also I have noticed there is a Ray Tracing Mode property in MeshRenderer. Not sure if there is a way to set the related property in the custom shader/material~
    tttttt.png

    Other gpu instancing experiment in DXR ( https://twitter.com/i/status/1373066781187706880 )
     
    Last edited: Mar 20, 2021
    sendspace likes this.
  49. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    697
    Hi. I have a problem which makes me crazy.

    I once added a SkinnedMesh Layer on 13 and used this for my charakter.
    No several versions later i am in Unity 2020.3.1 and all geometry who were given to the layer are gone from the scene and project. No object is on the Skinned Mesh Layer anymore.

    In recursive rendering overide i have all my glass material on the glass layer.
    But the glass layer and the skinned mesh layer is needed in the overiddes.

    When i deactivate my empty skinned mesh layer in the recursive rendering layer overides all glass layer objects become invisible.

    I also tried to rename or delete the empty skinned mesh layer.
    But this one is needed to render my glass layer materials recursively.

    It seems to be an crazy bug and i tried everything i could imagine.
    Did someone know what happens here or has an idea what i can try?
     
  50. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    697
    I also tried to redirect the skinned mesh layer, which is definately empty with this great tool

    https://github.com/YondernautsGames/LayerManager

    to my glass layer.

    No success.
    The Layer Mask from Recursive Rendering needs the empty layer to render my objects who are on the glass layer.

    Sorry for the crazy try to explain this.
    There seems to be something like zombie layer references in prefabs you cannot change anymore.
     
    Last edited: Mar 25, 2021
unityunity