Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Unity Experimental HDRP DXR

Discussion in 'Graphics Experimental Previews' started by SebLagarde, Apr 4, 2019.

  1. DavoMyan

    DavoMyan

    Joined:
    Jan 5, 2017
    Posts:
    15
    Would this work with the RTX 2060 mobile version of the laptop Lenovo Legion Y540(releasing soon)?
     
  2. kblood

    kblood

    Joined:
    Jun 20, 2012
    Posts:
    76
    I finally was able to download it using LFS for the GIT and all that. But now Unity crashes when I try to go to the game tab or run it. It did also crash while it was trying to compile scripts and such, forcing me to reset the whole computer as it just froze for more than 10 minutes.

    Already spent like 4-5 hours I think trying to get this far, so I think I will give up for now and wait for this to be a bit more stable.
     
  3. buFFalo94

    buFFalo94

    Joined:
    Sep 14, 2015
    Posts:
    190
    OMG this is just insane. Look how gorgeous this shot is!
     
  4. MAK11

    MAK11

    Joined:
    Nov 24, 2017
    Posts:
    11
    It's a real life picture.
     
    ROBYER1 and alexandre-fiset like this.
  5. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    460
    Lex4art and elbows like this.
  6. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,399
    That was the conclusion I immediately reached when I first saw it. I wonder for how many years more it will still be possible to spot the difference so readily, the future will be a tad confusing when it comes to reality vs fake.
     
  7. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    460
    HDRP is build on top of SRP. Mean that you can used DXR API with SRP.
     
  8. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    460
    Hi, here is a technical list of feature supported by this experimental version:



    Techniques using DXR:

    • Ambient occlusion

    • Rough Reflection (including lighting in reflection)

    • Texture rectangle light with shadow

    • Primary-ray rendering multi-hit smooth transparent and opaque

    All techniques but primary ray for realtime raytracing rely on having access to depth and normal buffer which is also used for denoising. In HDRP we have these buffers in both forward and deferred mode.

    The technique of area light shadow that we use require a GBuffer, mean our forward material aren’t compatible with it (StackLit, Fabric…)


    Current state:

    • General:
      • Random number generation for coherent spatially and temporally effect (i.e compatible with TAA)

      • Most effects use a temporal accumulation on the non denoised previous frames (require history buffer for each effect) and then apply a simple denoiser (separable bilateral blur).

      • Simple firefly clamping

      • We handle correctly single and double sided object
    • Material:
      • Alpha cutoff support for all effects. Currently we handle alpha cutoff like transparent object in DXR and use a threshold

      • Lit and Unlit shader are support
        • It doesn’t cover 100% of lit shader features however
      • Lit and HD Unlit master node are supported

      • We use an approximation with a single ray for the mipmapping of texture (There is no ddx, ddy with raytracing to get mipmap and ray differential is too costly - Need to forbid node in shader graph using ddx/ddy).

      • Transparent support IOR, absorption etc… with Primary-ray (no support for blending mode)
    • Lighting
      • Ambient Occlusion: We replace SSAO pass by DXR AO pass

      • Material have instance mask flag to separate between category
        • AO and shadow: Transparent objects are ignored
      • Texture rectangular area lights with shadow. Use Eric Heitz’s Paper (Combining Analytic Direct Illumination and Stochastic Shadows). These are screen space shadow map. We currently have an array (limited at 4 currently) of screen space shadow for area light with an index to fetch it in the lightloop. This technique require access to full GBuffer, only one raytraced sample is required. This allows us to estimate the lighting with and without the visibility term. Two screen space textures produced are then denoised with same algorithm (we currently use a gaussian bilateral filter).
        • Note: This technique is close to the reference but is not perfect, there is still artifact. However in term of performance it is fast. The other technique that consist of just producing a shadow map with visibility sample and denoise with NVidia technique give wrong result (still acceptable) but can be use in case we are in forward.

        • Only Lit shader is supported - Limitation of the technique
      • Reflection: We replace SSR pass by DXR reflection pass
        • Reflection is perform with secondary ray shoot from depth + normal buffer. Lighting is perform with the regular code and use HDRP light loop. Punctual shadow (directional, spot, point) rely on shadow map and use the shadow map atlas as well as the area light technique described above. Lightprobe, LPPV and Lightmap are supported. Rough reflection is supported with full screen and with a quarter resolution mode for performance with temporal smoothing (SEED temporal denoiser)

        • We use a spatial partitioning structure to store local light that we query for intersection position for reflection effect

        • Currently each objects setup in AS evaluates its lightprobe (In addition to lightprobe being evaluated in frustum for regular rasterization (need a cache system))
      • Support Light Layers


        Limitation
        • Caution: Node in Shader Graph with DDX/DDY instruction fail with DXR
          • Checkerboard
          • No support for Terrain which rely on DDX/DDY
        • Multi GPU isn’t supported in Unity for now.
        • Transparent don’t work with technique mention above that require depth and normal buffer. Currently Transparent need to be handled with rasterization unless we render them with Primary-ray.
        • Transparent blend mode. With DXR transparent are hard to support. Transparent blending mode aren’t sent to the shader, so currently we can’t make distinction between additive and alpha blending. Currently we will only do alpha blending all the time.
        • No support for vertex deformation (skinning, morph target, vertex animation)
        • No support for visual effect graph
     
    Last edited: Apr 11, 2019
    OCASM, keeponshading, konsic and 4 others like this.
  9. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    460
    Note: we have upload a new release that is working now and move some file to limit the problem of windows 260 max character filename. Also updated the documentation.
     
    keeponshading likes this.
  10. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,324
    @SebLagarde

    Hi. Will these DXR features work with meshes rendered with DrawMeshInstanced and DrawMeshInstancedIndirect or is there some extra step to add these instances to the DXR hierarchy?

    I guess frustrum culling on manually drawn instances with the API should be disabled in order to have meshes behind the camera also to reflect from.

    Lennart
     
  11. m0nsky

    m0nsky

    Joined:
    Dec 9, 2015
    Posts:
    24
    Hi Seb,

    Any ETA or temporary workaround for making test builds?
    Thanks for everything so far.





    Edit

    Found another way to record in full screen, so nevermind.

     
    Last edited: Apr 12, 2019
  12. zombieguy

    zombieguy

    Joined:
    Mar 4, 2015
    Posts:
    10
    @SebLagarde with the latest Nvidia drivers, it now runs on my GTX 1080 without any issues which is cool, but like others my CPU usage is through the roof, in the profiler there seems to be thread locking causing a delay, are there weird threading issues with ray tracing, and is there anyway to lower the CPU overhead right now?
     
  13. GWStudio

    GWStudio

    Joined:
    Sep 27, 2016
    Posts:
    97
    Does DXR HDRP tracing support non RTX GPUs i have gtx 970 ??!!
     
  14. zombieguy

    zombieguy

    Joined:
    Mar 4, 2015
    Posts:
    10
    The latest Nvidia driver added support for non-RTX cards for DXR, however, this only applies to Pascal cards as far as I'm aware (so the 1000 series).
     
    GWStudio likes this.
  15. GWStudio

    GWStudio

    Joined:
    Sep 27, 2016
    Posts:
    97
    Thank u so I should upgrade my graphic card :mad:
     
  16. OnlyVR

    OnlyVR

    Joined:
    Oct 5, 2015
    Posts:
    53
    It works on my GTX 1080! Thank you!
    Of cause it is slow - 5-10 FPS in full screen but it very nice anyway.
     
  17. auzaiffe

    auzaiffe

    Unity Technologies

    Joined:
    Sep 4, 2018
    Posts:
    4
    I'd be curious to know the parameter values that you used in the raytracing environement for this shot. Would you be able to share that?
     
  18. wenzy

    wenzy

    Joined:
    Nov 17, 2015
    Posts:
    10
    Hi,SebLagarde.I have already downloaded the new released version.But still get this problem
    https://github.com/Unity-Technologies/Unity-Experimental-DXR/issues/9

    You mention that Multi GPU is not support yet.I use the rtx2080-maxq laptop and it has two gpus(another is Intel(R)UHD Graphics 630).Will it be affected?I keep an eye on RTX and want to do some experiment but always not success.Do u have a specific date that rtx will be integrated in the stable Unity version?Looking foward to use it
     
  19. m0nsky

    m0nsky

    Joined:
    Dec 9, 2015
    Posts:
    24
    Here you go.

     
  20. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    386
    Last edited: Apr 12, 2019
  21. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    982
    This looks interesting, I'm following this!
     
  22. LIVENDA_LABS

    LIVENDA_LABS

    Joined:
    Sep 23, 2013
    Posts:
    227
    How can we write our own Raytrace functions so we can implement custom rendering?
     
  23. Lex4art

    Lex4art

    Joined:
    Nov 17, 2012
    Posts:
    178
    Bug report - ray tracing stops working if there is a mesh in the scene with more than one material on it, console spammed by this error:
    Code (CSharp):
    1. IndexOutOfRangeException: Index was outside the bounds of the array.
    2. UnityEngine.Experimental.Rendering.HDPipeline.HDRaytracingManager.BuildSubSceneStructure (UnityEngine.Experimental.Rendering.HDPipeline.HDRaytracingManager+HDRayTracingSubScene& subScene) (at SRP/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRaytracingManager.cs:544)
    3. UnityEngine.Experimental.Rendering.HDPipeline.HDRaytracingManager.CheckSubScenes () (at SRP/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRaytracingManager.cs:199)
    4. UnityEngine.Experimental.Rendering.HDPipeline.HDRenderPipeline.Render (UnityEngine.Rendering.ScriptableRenderContext renderContext, UnityEngine.Camera[] cameras) (at SRP/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs:977)
    5. UnityEngine.Rendering.RenderPipeline.InternalRender (UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Camera[] cameras) (at C:/buildslave/unity/build/Runtime/Export/RenderPipeline/RenderPipeline.cs:43)
    6. UnityEngine.Rendering.RenderPipelineManager.DoRenderLoop_Internal (UnityEngine.Rendering.RenderPipelineAsset pipe, UnityEngine.Camera[] cameras, System.IntPtr loopPtr, Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle safety) (at C:/buildslave/unity/build/Runtime/Export/RenderPipeline/RenderPipelineManager.cs:55)
    7. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    8.  
    9.  
    mesh with more than one material.png
     
    Last edited: Apr 14, 2019
  24. itsjustdel

    itsjustdel

    Joined:
    Feb 9, 2018
    Posts:
    3
    Looking very nice! Over 60fps on my 1070 too. Looking forward to standalone working.
     
  25. SonKim

    SonKim

    Joined:
    Sep 14, 2012
    Posts:
    8
    How do you guys make a perfect chrome material(mirror like)? I tried using HDRPLit with a opaque setting but ray tracing is not allow, maybe I turn off some other settings that wont let me do ray tracing(everything is turn on with the RayTracing Environment setting).

    Basically I'm trying to make a reflection material and get reflections showing on that object.
     
    Last edited: Apr 14, 2019
  26. m0nsky

    m0nsky

    Joined:
    Dec 9, 2015
    Posts:
    24
    Turning up the smoothness should give you mirror-like reflections.



     
    Last edited: Apr 14, 2019
  27. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,399
    I think there was a small bug in the code. Take a look at this github commit for a fix, which may or may not have anything to do with the issue you experienced. I've not yet tried transplanting this to the version that comes with the experimental Unity editor, but its only a small change:

    https://github.com/Unity-Technologi...mmit/1423ac0f1e4a4eba651644999d5e97d9c346cad6
     
    SonKim likes this.
  28. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,399
    Had a quick chance to try applying that fix to project version of HDRP. Seems to work (gets rid of console error message when selecting RayTracing for an opaque material). Didnt have any time to actually do anything with it though.

    (Relates to the post #12 earlier in this thread, where type had to be set to transparent to make it work)
     
  29. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    386
    You could add the Measured Material Library Asset to the project and drag all materials over to DXR office scene by opening both scenes.
    There are a lots of amazing materials like glas, car paint, leather, chrome..... to get started.

    https://assetstore.unity.com/packages/2d/textures-materials/unity-measured-materials-library-138814
     
    Last edited: Apr 15, 2019
    SonKim likes this.
  30. ArnoldCarterWong

    ArnoldCarterWong

    Joined:
    Sep 26, 2017
    Posts:
    20


    Did a quick test
     
    forbidd3n3ra, OCASM, Lex4art and 5 others like this.
  31. SonKim

    SonKim

    Joined:
    Sep 14, 2012
    Posts:
    8

    Nice work! I'm fairly new to Unity and this being a early alpha isn't a good combo for trying to create a interior archviz :) Also the editor performance kind of drop for some unknown reason making difficult to nagivate around.

    I was trying to recreate my UE4.22 DXR archviz scene in Unity. Lighting with a HDRI through the door was kinda tough in Unity(probably due to a lack of knowledge on my part), not the setup but the controls, increasing the skylight a ton didn't increase the light going thru the door..

     
  32. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    386
    You could have a look on Archviz Vol 6. There is an HDRP 4.6 version on request which uses Bakery. The scene bakes around 30 min to this quality

    https://assetstore.unity.com/packages/3d/environments/urban/archvizpro-interior-vol-6-120489

    and needs now big fakery. Only environment IBL.
    Enabling here the Raytracing Reflections and Shadows will improve quality further.
     
  33. ArnoldCarterWong

    ArnoldCarterWong

    Joined:
    Sep 26, 2017
    Posts:
    20
    I think the current version has some bugs, or they just happen on my PC. Like I can't switch the baked GI method while I am in DX12 because the editor would keep crashing. And with baked GI, some mixed lights simply disappeared. So the only thing I can use at the moment is the realtime GI. Custom LUT also doesn't work even the file format is correct. For Archviz usage I think the older version with HDRP is better for production at the moment.
     
  34. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    572
    This is an older version of HDRP, it just has support for raytracing. If you just want to use HDRP then I would reccomend using one of the released versions. 2019.1 f1 or 2019.2b11 are the two versions you can use that supports an up to date version of HDRP. You can find those here - https://unity3d.com/unity/beta/2019.1
     
  35. ArnoldCarterWong

    ArnoldCarterWong

    Joined:
    Sep 26, 2017
    Posts:
    20
    I tried 2019.2a9 with 6.6 preview from github, the GI seems fine. Wondering if it is a bug of this DXR preview build
     
  36. Jesper-Mortensen

    Jesper-Mortensen

    Unity Technologies

    Joined:
    Mar 15, 2013
    Posts:
    201
    Cynicat and hippocoder like this.
  37. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    572
    For the DXR my editor also crashes if I try to bake lightmaps. Since it's an experimental build for DXR I don't worry about it since it's fine in the other release versions of the editor.

    Also in 2019.2, you get the Optix Denoiser or Intel's Open Image Denoiser for GPU lightmapping so that should also help you out with bake time.
     
  38. fuzzy3d

    fuzzy3d

    Joined:
    Jun 17, 2009
    Posts:
    74
    +1 lightmapping crash
    And build error:
    upload_2019-4-15_18-12-46.png
    Windows player support installed here:
    upload_2019-4-15_18-19-5.png
     

    Attached Files:

  39. AydinDeveloper

    AydinDeveloper

    Joined:
    Sep 8, 2017
    Posts:
    3

    yes it works with GTX 1080 ti. but there is no endless mirror effect.

    upload_2019-4-16_0-45-58.png
     
  40. sendspace

    sendspace

    Joined:
    Jul 24, 2016
    Posts:
    27
    AydinDeveloper

    will you please tell me what vram usage you have on that scene or other simple ones ?
     
  41. AydinDeveloper

    AydinDeveloper

    Joined:
    Sep 8, 2017
    Posts:
    3
    gtx 1080ti, 1080p resolution, only dxr reflection. The above scene is between 120 and 300 fps.
     
  42. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    572
    The statistics FPS counter isn't really reliable. You can enable the HDRP FPS counter in the debug menu by pressing

    Ctrl + Backspace then press End or Page Down (this seems to vary for different PC. On my laptop it's page down and Desktop its End)

    When you see the FPS counter and Frame Time use Shift to pin them to the screen and arrow keys to navigate the menu. That FPS and frame time will be more accurate than the Statistics window

    Looks like this
    upload_2019-4-15_23-56-39.png
     
    id0 and keeponshading like this.
  43. PixelPup

    PixelPup

    Joined:
    Mar 6, 2018
    Posts:
    18
    Trying this scene out on my new RTX Titan and I am getting tons of errors. Continuous errors for "Platform does not support Raytracing Shaders" Not sure where to start on this one, anyone else seen this?
     
  44. LIVENDA_LABS

    LIVENDA_LABS

    Joined:
    Sep 23, 2013
    Posts:
    227
    Check your windows version, must be 1809 (or developer mode in 1803) and make sure you are using the correct Unity version
     
    PixelPup likes this.
  45. sendspace

    sendspace

    Joined:
    Jul 24, 2016
    Posts:
    27
    AydinDeveloper

    i was talking about video memory, how much video memory that scene uses ?
     
  46. Quatum1000

    Quatum1000

    Joined:
    Oct 5, 2014
    Posts:
    739
    This ray trace rendering is great for sure!

    But as much more I see images of the ray trace environments as more boring it becomes. What is so interesting so see anything that looks like the real world?! Anytime everyone will use this stuff and every game will look the same and everyone can popup some real looking environment 3d viz in some minutes.

    So bigger companies build large open environments with a story behind. Nearly every pc and consol game since 2015 can be approached over 1000m. Unity has so much great new and nice stuff beforehand, but acting inside of a broom chamber floating 7 digits precision area, shaders and transforms, vector math, 32bit serialization. Should I list some more?

    The responsible developers and visionaries seem to be completely losing sight of their solid technical achievements, but delight in visuals, activate money and manpower for a demo crew and other art stuff technics, and then tan themselves in the sun of glory.
     
  47. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    460
    Player isn't currently working in this version. We are working on it. Thanks
     
    Lars-Steenhoff and fuzzy3d like this.
  48. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    982
    True, but this also gives artists more room to breathe as working with lighting and environments would be much easier and more realistic. Artists and developers would still do their thing but the looks will be more enhanced, hower artist should not rely on good rendering to make their stuff look good or hide their bad skills behind it.
     
  49. ArnoldCarterWong

    ArnoldCarterWong

    Joined:
    Sep 26, 2017
    Posts:
    20
    Will the shader compile bug in Win10 post oct 2018 build be fixed in the next preview build? The current solution here is to install an extra Windows to try the DXR build
     
  50. AydinDeveloper

    AydinDeveloper

    Joined:
    Sep 8, 2017
    Posts:
    3
    really "FPS counter really not reliable.". Thanks for the Ctrl + Backspace method. 1080ti, 1080p only the performance of the dxr reflection is fine. If we consider it to be the first version, it will work much more optimized in the future. The skinned mesh does not support the renderer and the performance is dramatically decreasing according to the complexity of the scene. ssr does not lose performance depending on how many objects are on the scene. dxr reflection can not be calculated like ssr?

    Translated by google translate.


    upload_2019-4-18_14-48-24.png