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
    My tests done one month ago.
     

    Attached Files:

    Rowlan, OCASM, keeponshading and 11 others like this.
  2. auzaiffe

    auzaiffe

    Unity Technologies

    Joined:
    Sep 4, 2018
    Posts:
    255
    Looks great!
     
  3. Lex4art

    Lex4art

    Joined:
    Nov 17, 2012
    Posts:
    445
    I've stumbled upon list of upcoming changes to 9.x HDRP package... wow, there are so much needed improvements/features for DXR and path tracing:
    https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@9.0/changelog/CHANGELOG.htm

    - Added the possibility to have ray traced colored and semi-transparent shadows on directional lights.
    - Added of Screen Space Reflections for Transparent materials *if ray traced reflections will work there too it will be awesome!*
    - Added support for fog in Recursive rendering, ray traced reflections and ray traced indirect diffuse.
    - Added support for Smoothness Fade start work when enabling ray traced reflections.
    - Added an initial implementation of ray traced sub surface scattering
    - Added an alpha blend option for recursive rendering
    - Added support for stack lit *shader* for ray tracing effects.
    - Added support for hair for ray tracing effects.
     
    Last edited: Jun 4, 2020
    copperrobot, OCASM, sendspace and 2 others like this.
  4. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    some new renders. rendersStudio_RTX_2019_20200608_01323705_2560p.jpg rendersStudio_RTX_2019_20200608_01364909_2560p.jpg rendersStudio_RTX_2019_20200608_01445683_2560p.jpg
     
    Rowlan, OCASM, wetcircuit and 3 others like this.
  5. unit_dev123

    unit_dev123

    Joined:
    Feb 10, 2020
    Posts:
    989
    top row stuff. well done.
     
  6. auzaiffe

    auzaiffe

    Unity Technologies

    Joined:
    Sep 4, 2018
    Posts:
    255
    @Lex4art Yes, we added suport for ray traced reflections on transparent object. Mainly for glass and water usage so that you can keep all the other effects on the opaque objects that are behind/
     
    OCASM and Lex4art like this.
  7. Lex4art

    Lex4art

    Joined:
    Nov 17, 2012
    Posts:
    445
    Yeah, I did attempt to use recursive rendering materials for flat glass but it's nightmare in terms of visual problems (no RT reflections/GI/SSAO on objects behind, black color after 50 meters depth limit reached behind glass and so on) and performance is suffering too... it's just not right tool for this kind of task.
     
  8. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    Great!
     
  9. GeniusKoala

    GeniusKoala

    Joined:
    Oct 13, 2017
    Posts:
    97
    Hi guys!

    I started using raytracing on my RTX2060 GPU and it works pretty well! So far I enabled "Path Tracing" on a Volume to get better lighting. I see there is a loading bar at the bottom of the Game view (as well there is one for the Scene view too).

    My questions are :

    1) Does anyone else need to click the Game view and move the mouse to get the "loading bar" progressing? If I don't do it, the image is not calculated and stays noisy (the little light grey one).

    upload_2020-6-11_11-16-7.png
    2) The "Global Illumination" on the Volume does not do anything different if I disable it. Only "Path Tracing" does changes.

    upload_2020-6-11_11-28-22.png


    3) How can I use the Unity Recorder (a track in a Timeline) to let my computer calculate the denoising for each frame and export each one as a PNG? Currently it just bypass the computation of the denoising and export noisy images.

    4) Maybe not the appropriate topic but about the recorder in the timeline, is there a way to record without playing the scene in the Editor? (like an offline recording). I don't need to have the scene playing while recording.

    Thanks for reading!
     
  10. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    Hi GeniusKoala

    1. Not working yet. You must move object scene to refresh GI PT system.

    2. Strange that here is working: total volume or just one module.
    3. That`s the biggest issue now. Right now impossible. I work with one developer of camera recording https://assetstore.unity.com/packages/tools/video/video-capture-pro-155663 to do it by frame delay system. Plugin offers offline render and this module works perfect in Interpolated system but developer promised me to add delay option for each frame in offline system render. Right now forget Path Tracing and use only Interpolated system.
    4.Read point 3. Plugin offers offline render.

    This is video done by this plugin in 4K:
    this is no RTX (standard HDRP)
    Render time if I remember 20 min. For somebody this time looks horrible but I used SSAA Anti Aliasing filter (also professional plugin which work perfect with RTX, I keep contact also with developer for more future RTX support) to get perfect AA and also I render it in 60 fps.
    Video Capture offers also HAVC codec so no problems for 4K and 8K animation.
    I use also Video Capture Pro for screenshots (you can all my renders above done by this)

    Please conciser that I do not do any commercial advertisement here...just wanted share my knowledge.
     
    Rowlan, newguy123 and Raul_T like this.
  11. GeniusKoala

    GeniusKoala

    Joined:
    Oct 13, 2017
    Posts:
    97
    Thanks for the information Janusz_Biela !

    I guess my choice may be to code a custom Recorder in Unity. I guess for Sherman they could record images without doing Play in the Editor? That would be awesome if I could do it. I can already preview my scene in the Timeline. I just wonder if there are API to access RT GI computation events so that I could trigger a record at the end for each frame.

    What do you mean by the "Interpolated system"? Is there other ways than the Path Tracing to enable Ray Tracing? It's the only feature that enables anything in my scenes so I'm a bit lost... I want the most advanced techniques for rendering. I'll develop tools if needed. At least I'll try :)

    Is there a better choice for AA with Raytracing? I'm currently using the default SMAA.
     
  12. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    Actually I wrote wrong: there is no Interpolated GI in Unity...it looks like interpolated.
    RTX Unity offers now only one systems of GI: pure Path Tracing.
    You can choose typical PT or (which I use) kind of limited with samples and denoiser. I do not know how its work generally ...I am specialist of pure Interpolated system.
    here is a example of Global Illumination Interpolated system called Photon Mapping (CPU):


    Default SMAA is very bad.
    Thats why I use MadGoat SSAA plugin. Developer told me that his plugin of SSAA activate hardware features from RTX cards which cause even less noise levels! Do not know technical information about that and I can not confirm it.
    Here is example:
    RTX without denoiser at all
    img_denoise_OFF.jpg


    RTX with denoiser and same level of SSAA:
    img_denoise_ON_balanced.jpg
     
    Raul_T likes this.
  13. Raul_T

    Raul_T

    Joined:
    Jan 10, 2015
    Posts:
    363
    Adding to this, the denoised image result of our SSAA implementation is not RTX hardware related, its hardware accelerated in the sense that it runs on the gpu (any gpu), but its just regular temporal accumulation that gets enabled when DXR is detected in scene.

    Edit: also the image pixels get interpolated (bilinear/bicubic) by downsampling when using SSAA so that also helps with noise.
     
  14. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    Thanks Raul for clarification!
    Just to clarify: I do not use up-sampling in SSAA ...simple default settings in your plugin.
    Quality is still very good without x2 and x4.
     
  15. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    I made basic animation in offline mode 4K. Pretty extreme situation because I spent whole Vram of GPU memory from my 2080Ti
     
  16. copperrobot

    copperrobot

    Joined:
    May 22, 2013
    Posts:
    69
    Trying to get the 9.x release working from the GIT. I don't appear to be doing the right thing...

    I get the following errors:



    I have all the 9.x packages installed. This is using the latest 2019.3.
     
  17. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
  18. copperrobot

    copperrobot

    Joined:
    May 22, 2013
    Posts:
    69
    Yes, but it won't get past the initial import of the asset in order to work.

    This is using the 9.x Release channel of the Git.



    I have now got it down to the following:

     
  19. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    copperrobot I think I will do tutorial how to activate it. Information how to deal with that and how activate on the web/Youtube is misleading a bit.This is pretty easy. It is kind of "Brute Force" manual activation done by my poor knowledge but works 100% :D

    img_001.jpg
     
  20. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    Personally I activate RTX by Wizard module in empty scene and I add my models and textures and configs. But some people want test something existing without digging how to do....
     
  21. Lex4art

    Lex4art

    Joined:
    Nov 17, 2012
    Posts:
    445
    Note that according to the guide from github page for Unity 2019.3 only 7.x.x version should be used, 9.x.x is for 2020.2.
    • Unity 2019.1 is compatible with SRP version 5.x
    • Unity 2019.2 is compatible with SRP version 6.x
    • Unity 2019.3 is compatible with SRP version 7.x
    • Unity 2020.1 is compatible with SRP version 8.x
    Anyway, this week I first time did install those experimental packages correctly (meh, you need to install those in right order using console errors in expanded mode as guide... no word about that on github page manual) but no luck with Unity 2020.2a13 and those builds (staging/9.x.x master/10.x.x) - the best thing I've got is screen space GI was working in one of those (but with the price of non-screen space GI, it was not possible to make it work). Preview is preview XD.
     
    newguy123 likes this.
  22. copperrobot

    copperrobot

    Joined:
    May 22, 2013
    Posts:
    69
    Yeah, the 9.x version I'm using is in 2020.2a13 also. Was hoping it might be able to deal with 9 as I'm eager to test out newer features, but for now I guess waiting a bit longer is in order.
     
  23. copperrobot

    copperrobot

    Joined:
    May 22, 2013
    Posts:
    69
    To clarify, I've been able to get DXR functioning in older versions, but not the newer versions.
     
  24. unit_dev123

    unit_dev123

    Joined:
    Feb 10, 2020
    Posts:
    989
    Version 9.x is amazing when u get it working.
     
  25. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    Not to waste users time I made easy straight way to Unity and RTX. I just backup whole project. This is simple as can be:
    1. Install latest official Unity 2019 LTS:
    img_002.jpg
    2. Download my whole project: https://we.tl/t-i8nD4UYYIu (for those who want test it, ask me in PM for password)
    3. Unpack this whenever you want
    4. In Unity HUB use ADD button to show folder RTX:
    img_001.jpg 5. Start the project!

    It can not be simpler :)
    If you want activate it by yourself from the scratch simple follow Unity instructions from web.
     
    Last edited: Jun 12, 2020
    wetcircuit likes this.
  26. copperrobot

    copperrobot

    Joined:
    May 22, 2013
    Posts:
    69
    "It can not be simpler :)
    If you want activate it by yourself from the scratch simple follow Unity instructions from web."

    It's not getting any kind of RTX, but specifically 9.x or even 10.x which are available on the git.

    For now I'd just be happy to have Emissive working with GI. Does with Path tracing, but path tracing is also not quite there yet...
     
    Last edited: Jun 14, 2020
  27. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    This what I wrote above how to run scene with RTX features is for people who has little knowledge about UNITY generally and want see how it works.
    If you want do from scratch: is other way.
     
  28. copperrobot

    copperrobot

    Joined:
    May 22, 2013
    Posts:
    69
    How did you manage to do so?
     
  29. m0nsky

    m0nsky

    Joined:
    Dec 9, 2015
    Posts:
    257
    I can confirm most of the recent issues have again been solved in HDRP/staging. ;) However I found another denoiser issue. It's producing exactly the same artifacts as Case 1247650, but this time it's coming from the global illumination (performance) denoiser.

    Edit 1:
    -snip-

    Edit 2:
    Also found an issue related to ray traced reflection exposure, will try to reproduce in a test scene and submit a bug report tomorrow.

    Edit 3:
    Someone in another thread mentioned ReSTIR, could potentially be interesting?

    News post
    https://news.developer.nvidia.com/rendering-millions-of-dynamics-lights-in-realtime/

    Publication (paper + additional video/files)
    https://research.nvidia.com/publication/2020-07_Spatiotemporal-reservoir-resampling

     
    Last edited: Jul 8, 2020
  30. Yanus3D

    Yanus3D

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

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    I build now my surface base (nodes) and finally after 2 months I start test interiors!
    Full GI without BAKE. Around 20 fps.
    InteriorSSAA_20200622_11374167_1080p.jpg InteriorSSAA_20200622_11380831_1080p.jpg InteriorSSAA_20200622_11393020_1080p.jpg InteriorSSAA_20200622_11394492_1080p.jpg InteriorSSAA_20200622_11403771_1080p.jpg
     
  32. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    934
    Hi,
    Very short comment:
    - 9.x-preview will not be officially supported but is a package that can run on 2020.1.
    - 10.x will be the official supported package that work with 2020.2
    9.x-preview have most of the feature that 10.x have, but there is few one that are incompatible with 2020.1 and the package will not be maintain / tested unlike 10.x. It have been made so users can still experiment most of new feature on 2020.1.

    There is an upcoming change for 10.x (so for 2020.2) which will remove the need of using local shader config package to enable raytracing. i.e less pain in the ass to benefit from it. Only enabling it in HDRP asset will be required.
     
  33. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,248
    That is looking awesome!

    But 20fps, thats seriously slow considering there's hardly anything in the scene
     
    sendspace likes this.
  34. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,248
    How can I try out 10.x NOW with 2020.2?

    Do I just LTS the git link? (since I dont think its available as download as a package yet inside 2020.2 right?)
    What is the git link for 10.x

    ......and then can somebody help a newbie out and tell me how to get it into my project when I've downloaded the git package please!
     
  35. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    Ah ...you do not understand my happiness: I am happy with 1 fps!!! I am render man CPU Lightwave 3D, when one frame in FullHD takes 5-20 min! RTX system is not for gaming :D

    If you are not familiar with Real Global Illumination: 20 fps with basic scene interior, full post process, SSAA anti aliasing, DoF is ....CRAZY AMAZING speed!
    I predict that normal FullHD Interior render will take around 0.1 - 5 sec/frame ...which is total mind blow!
     
    Last edited: Jun 22, 2020
    gdbbv and elbows like this.
  36. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    Check my early post when I put link with ready RTX UNITY folder (no need knowledge - is for parameters playing purposes). Password via PM on request.
     
  37. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    So for better compatibility and more features you suggest use 2020? (for me even better...)
     
  38. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,295
    In which version will we get vegetation support? 2020.1 is out of question now according to your post. My main points are
    • grass
    • speed tree 8
    And when will decal projection be layer based? There's no point in having a DXR scene when the decals are projected on the player himself.
     
    Last edited: Jun 23, 2020
    Raul_T likes this.
  39. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    So far we have two big issues with DXR in Unity:
    - transparency materials can not be in Raytracing mode and in the same time pass view from behind (like windows glass)
    - Environment GI (Sky, HDRi) is broken or not working properly

    Hope this will be fixed soon.
    Solution for first is use standard transparency material + spherical reflection probe.
    For second problem I suggest to use Area Light in Windows and standard background (so not at all HDRi or Sky) SSAA_20200623_15450237_1080p.jpg SSAA_20200623_15453412_1080p.jpg SSAA_20200623_15461707_1080p.jpg
     
  40. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    934
    >So for better compatibility and more features you suggest use 2020? (for me even better...)

    2020.1 add the support for skinned mesh for raytracing
    In 9.x-preview or 10.x (none of the package are out yet - 9.x-preview out is too old - but will soon - still they are accessible through Graphics git hub repository - branch 9.x.x/release / master branch ) you have several quality and performance improvement, as well as a better fallback workflow for transparent.

    There is Transparent reflection only mode which allow to have a windows that reflect with raytacing but still use raster for what is behind + we added support of regular alpha blended object in some raytrace effects which should solve your first issue:
    >transparency materials can not be in Raytracing mode and in the same time pass view from behind (like windows glass)

    >- Environment GI (Sky, HDRi) is broken or not working properly
    can you elaborate?

    >In which version will we get vegetation support? 2020.1 is out of question now according to your post. My main points >are >grass >speed tree 8

    DXR don't support vertex animation for now. Only skinned / morph target animation starting with 2020.1. We don't have ETA for vertex animation.

    SpeedTree is not correctly supported in HDRP, so not for DXR either. It is on the roadmap but no ETA for now.

    >And when will decal projection be layer based? There's no point in having a DXR scene when the decals are projected >on the player himself.

    DXR don't support decal for now. It is on the roadmap but no ETA, this is significant work (require to move opaque decal to cluster decal version, DBuffer approach that we used isn't compatible with DXR).

    Decal layers is on the roadmap, In progress. But it is highly possible that we miss the deadline of 2020.2, so it could be for 21.1. But as said above, decal don''t work with DXR anyway.
     
    newguy123, Lex4art and Rowlan like this.
  41. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    SebLagarde I will try show you "problem" soon.
    Briefly: looks for me like low sample resolution.
    Generally sampling from environment lights is the most difficult part of GI and can be solved by two things: LightPortals or better sampling. Better GI sampling for Environment is kind pain to solve and is horrible difficult.
    I would suggest writing down LighPortals - easy solution.
     
  42. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    934
    >Better GI sampling for Environment is kind pain to solve and is horrible difficult.

    This is call multiple importance sampling and we have already start work on it. But no ETA.
     
  43. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    SebLagarde or maybe I will wait for
    Yes! Without importance...forget good GI from environment - now using enviroment in UNITY is pointless (I use Area Light instead).
    I our CPU Engine Kray for Lightwave 3D we have perfect sampling for Physky. We have the best and fastest engine available on market with Photon Mapping and real bounce lights up to 1000. But this development took over 15 years....
    Environment sampling was always problem, especially with balancing noise in QMC phase.
     
  44. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    This is so far what I got from DXR. A lot of problems with GI ...but is not that bad on this development stage.
    I dusted this cute scene to see what I can get from UNITY.
    Here is my very old render from Kray and Lightwave 3D:
    white_room_10 min_Kray.jpg

    Here my UNITY version:

    SSAA_20200625_02272331_1080p.jpg SSAA_20200625_02292810_1080p.jpg SSAA_20200625_02315350_1080p.jpg SSAA_20200625_02352454_1080p.jpg
     
    m0nsky and Rowlan like this.
  45. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    Here correct images:
    Interior_03.png Interior_01.png Interior_02.png
     
    Rowlan likes this.
  46. Yanus3D

    Yanus3D

    Joined:
    May 6, 2019
    Posts:
    490
    HQ offline render FullHD/60fps:
     
    newguy123 and INedelcu like this.
  47. Passeridae

    Passeridae

    Joined:
    Jun 16, 2019
    Posts:
    395
    Does anyone has an issue with SSS when enabling it makes albedo of your materials completely black?



    Also, if I change my camera view to ISO it does almost the same thing.
     
  48. auzaiffe

    auzaiffe

    Unity Technologies

    Joined:
    Sep 4, 2018
    Posts:
    255
    Hi passeridaepc,

    Isometric projection is not fully supported in HDRP and does not work properly with ray tracing effects.

    Maybe you've hit a bug. What is the light source in your scene?

    Best,
     
  49. auzaiffe

    auzaiffe

    Unity Technologies

    Joined:
    Sep 4, 2018
    Posts:
    255
    Ray tracing mode is really for complex transparent objects. For glass you should probably be using ray traced reflections on transparent objects.

    For sky contribution, the problem is probably that you are getting the convoluted sky lighting in your GI/reflections and that is not something you are looking for. You should place a reflection probe that has roughly the righ intensity for additional bounces and make your ambient probe black.

    If you think there is an issue, can you fill a bug with a test scene that show the issue so that we can look at it?

    Thanks
     
  50. copperrobot

    copperrobot

    Joined:
    May 22, 2013
    Posts:
    69
    Is there a way to test more recent features in 9.x and 10.x? I've been trying to use with 2020.2, but so far not had any luck.