Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Official Unity Experimental HDRP DXR

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

  1. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    3,767
    Apologies for spam, but I had to do a quick & dirty proof of concept about how it looks like in movement. A pinball might be a really good showcase for rtx when you add lots of flashing lights & reflections. I'll most certainly follow that when the preview build arrives in October :)

     
  2. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    Even though it isnt ready yet, I like to watch some of the progress towards this.

    I see there were several things in 19.3 alpha 10:

    Graphics: Add Ray Tracing Shader object, API, importer, and documentation
    Graphics: added API for raytracing acceleration structure

    I dont know why features like these sometimes show up in fixes section of release notes instead of improvements!

    Anyway even though it does not work yet, I like to try with 7.x branch of HDRP anyway, just to see some small parts that work. I really like the DXR stuff in the HDRPWizard that helps get all the settings right to enable Raytracing.

    Will DXR-specific stuff be staying in experimental namespace for 19.3? I ask because I got errors with RayTracingAccelerationStructure in HDRaytracingManager.cs unless I added using UnityEngine.Experimental.Rendering to that file.

    Anyway thats the end of my talking about this for now, because there are other major things still missing from released 2019.3 alphas that mean there is no point me trying to get any further (eg missing CommandBuffer stuff at the moment).

    Thanks as always to all those involved in this endeavour!
     
    Last edited: Aug 2, 2019
    Rowlan and newguy123 like this.
  3. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    3,767
    I tried something different using the Giger asset. I have to admit it adds the certain something which makes it look better compared to non DXR view.

    giger 5.jpg
    giger 6.jpg
    giger 8.jpg
    The difference would be better visible with a slideable separator where you can compare the before and after images. It's most notable at the bottom and makes the scene look "correcter".
     
  4. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    3,767
  5. INedelcu

    INedelcu

    Unity Technologies

    Joined:
    Jul 14, 2015
    Posts:
    154
    The complete low level support has been merged into 2019.3 a11! Since it will be an experimental/preview release in 2019.3 at least, you have to use UnityEngine.Experimental.Rendering namespace when dealing with the ray tracing classes like RayTracingShader or RayTracingAccelerationStructure in C#.
     
    Elecman, SKoptev, Ryiah and 4 others like this.
  6. superjayman

    superjayman

    Joined:
    May 31, 2013
    Posts:
    185
    Why is RTX not supported for the Standard-Pipeline and only HDRP?

    When and will RTX support be added to Standard-Pipeline?
     
  7. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    I dont think there are any plans at all to make it work with the standard pipeline.

    I could be wrong, but this has always been my understanding of the situation. The old built in standard renderer will stay around for ages, but it wont get shiny new features like this.
     
    Gametyme and Ryiah like this.
  8. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    935
    That s cool because his art benefits from from tiny sharp reflections at the right place.)

    He raytraced it in bis head and brought it canvas with an airbrush with his unbelievable free hand technique without paper masks. The highlights he scratched in with a scalpell or with an rubber by removing paint. So it s often the white canvas.

    I started with Airbrush too before first Amiga and SGI arrived. But never got it managed in my head nor without masking like this guy.


    Gigers_Alien_flnQkAw.jpg

    hr-giger-e1497024024844.jpg



    Here the first human raytracer when it comes to light distribution and correct color toning depending on light distribution. Think he pretty could think in linear colorspace.
    There are some strange findings in the video.
    Most impressive is the color toning from wall paint from left window to complete right . They are correct tonings and the color has varriation over the complete color palette to visualize perfect light distribution in the room. Worth a look.
    His output around 1668 is much more correct than PLM today by delivering similar speed.

    There is also some kind of lightfield averaging and light caching.
    He needed several months to finish.
    Think around 8 for this one. So by moving sun and seasons the painting shows pretty correct a day snapshot but he slightly changed some shadows or reflections e.g in the mirror for composition purposes.

    Worth a look.

    http://www.openculture.com/2013/08/...ohannes-vermeer-narrated-by-meryl-streep.html

    And here Tim who spent several years of his life to find an plausibl explanation through rerendering, rebuilding and repainting the complete thing.
    https://boingboing.net/2014/06/10/vermeers-paintings-might-be.html

    vermeer-ladyatvirginalswithgentleman.jpg

    Hope i went not so far off. Both early raytracing. PBR style. )
     
    Last edited: Jul 26, 2019
    id0 and Rowlan like this.
  9. supron

    supron

    Joined:
    Aug 24, 2013
    Posts:
    67
    Do you have plans to expose RTX API without HDRP? I see the potential for developers to write cross-platform path tracers or runtime light mappers.
     
    Cynicat likes this.
  10. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    I had quite a lot of fun with alpha11 yesterday. I was just messing around seeing what stuff from various different HDRP branches I could get working with it. Some HDRP RTX/DXR stuff does work if I fiddle around a bit. I've seen raytraced AO working, reflections working, some indirect lighting working in HDRP debug output (I didnt get it to contribute to main output yet) and I even got the pathtracing from branch HDRP/staging_pt working with this alpha (by paying attention to console errors and then hacking a couple of XR files from that branch to get rid of errors).

    I dont think this is the right time for lots of people to be trying to get the HDRP stuff working with main 2019.3 alphas, since its still in development and the old custom editor build/project template thing from earlier this year provides a more 'complete' early implementation, albeit not the same as the one that will be in main HDRP. But some parts are certainly there if the adventurous want to fiddle around with it, or for people that are going to write their own raytracing stuff.

    Cheers :)

    edit - oops I kept saying beta when I meant to say alpha.
     
    Last edited: Aug 2, 2019
    Rowlan likes this.
  11. m0nsky

    m0nsky

    Joined:
    Dec 9, 2015
    Posts:
    248
    I've also spent a few hours playing with it. Managed to get raytraced ao & reflections to work in the scene view, however, they seem to break in play mode. (weird offsets, etc)

    Raytraced shadows/gi/recursive rendering don't seem to be doing anything at the moment.

    Can't wait to see where this is going, I use the experimental DXR editor pretty much every day, cool stuff.
     
    Last edited: Aug 2, 2019
    elbows likes this.
  12. konsic

    konsic

    Joined:
    Oct 19, 2015
    Posts:
    995
  13. sendspace

    sendspace

    Joined:
    Jul 24, 2016
    Posts:
    40
    Hello all.
    can any one tell me how a gtx 1660 / 1660 ti is working with dxr ? cuz am upgrading from 1050 ti soon.
     
  14. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    3,767
    I can tell you that the 1080 ti works with it. But performance is horrible. Better upgrade to a dedicated card if you want to step into dxr.
     
    sendspace likes this.
  15. sendspace

    sendspace

    Joined:
    Jul 24, 2016
    Posts:
    40
    Have u seen any test with rtx 2060 ? cuz this card is about same price as 1660 ti
     
  16. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    3,767
    What you see above from me is from a laptop with a 2060 mobile. I guess the desktop version is a tad faster. I considered it slow nontheless. But please keep in mind that Unity only released an experimental version so far. I rather suggest that you start DXR earliest in October when Unity releases the first alphas/betas.
     
    sendspace likes this.
  17. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    @sendspace If you by any means can afford 2060 Super, go for it, it's way better card than 2060 or 1660 TI and it has decent perf all around, including DXR.
     
  18. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    928
    Hi general information.

    A DXR preview version for HDRP is available in 7.0.1 package with 2019.3a12. You can use HDRP Wizard to help to setup it. DXR API is experimental.
    A more stable version will be available in 2019.3a13 or a14.
    It is still recommended to way for beta version and package 7.1.1 for DXR.
    There is currently no plan to support any raytracing effect in standard pipeline. However HDRP is built on top of a core API that is accessible in standard pipeline. So you can still do your own raytrace work their. Still better to copy code from HDRP as a start or as example about how to use the undocumented raytrace API.
     
    Elecman, sisermann, OCASM and 6 others like this.
  19. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    3,767
    Do you have an approximate ETA on this? :)
     
    SKoptev and freenomon like this.
  20. andrzej_cadp

    andrzej_cadp

    Joined:
    Jan 27, 2017
    Posts:
    18
    Does DXR API work on GTX 10XX series cards? Nvidia released drivers with DXR support for older cards, but SystemInfo.supportsRayTracing returns false on GTX 1070.
     
  21. freenomon

    freenomon

    Joined:
    Mar 21, 2019
    Posts:
    35

    when will we be able to download the 2019.3a12 with DXR support in it?
     
    SKoptev likes this.
  22. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    789
    Yes, it works.
    I've tested it on the Experimental build and I use a GTX 1080
     
    OCASM likes this.
  23. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    Rowlan likes this.
  24. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    928
    HDRP from package 7.0.1 include DXR features (like the lastest master branch). (i.e DXR is develop in the mainline of HDRP now)
     
    DragonmoN, SKoptev, Rowlan and 2 others like this.
  25. unity_RuwGDfd2lVx01A

    unity_RuwGDfd2lVx01A

    Joined:
    Oct 25, 2017
    Posts:
    23
    I'm using 2019.3.0a12 with HDRP 7.0.1 and I am getting this error:

    This happens when I try to add global illumination to my HDRPDefaultSettings. For context, I'm using DX12 on a gtx 1080 ti with a project created with the HDRP template.

    EDIT: Okay screen space reflections are disabled too and the SSR option is greyed out. This is probably a bigger issue than just raytracing...
     
  26. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    Did you use the HDRP wizard to switch on all the right settings for DXR?
     
  27. unity_RuwGDfd2lVx01A

    unity_RuwGDfd2lVx01A

    Joined:
    Oct 25, 2017
    Posts:
    23
    HAHA! Wow that was easy! It fixed it, thanks!
     
    elbows likes this.
  28. superjayman

    superjayman

    Joined:
    May 31, 2013
    Posts:
    185
    Unity why can't we have this working in the Standard Pipeline??? Take a look at Unreal Engines Implementation!
     
  29. unity_RuwGDfd2lVx01A

    unity_RuwGDfd2lVx01A

    Joined:
    Oct 25, 2017
    Posts:
    23
    Okay, so I'm having an issue with the global illumination option. I have a ray-tracing volume or whatever with everything defaulted and enabled, and I also have global illumination enabled in my scene. My fps drastically tanks from 200~ to 30 when I enable global illumination, but no visual change appears...

    Any help is greatly appreciated!!

    EDIT: I should also add that ray-traced AO seems to be the only option that visually changes the scene. Everything else just tanks frame-rate without visual results. I also have the latest Nvidia drivers for my 1080 ti (431.60).
     
    Last edited: Aug 18, 2019
  30. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    You talk about this experimental DXR editor now or the 2019.3 alphas with 7.x HDRP? if latter, it's not really working at all at this point yet.
     
    unity_RuwGDfd2lVx01A and Lex4art like this.
  31. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Because the standard pipeline is basically what UE3 would be.... not UE4, it's a different engine. Epic would not be supporting their old engine either.................
     
    m4d, OCASM and Rowlan like this.
  32. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,444
    At least there is no continuity between ue3 and ue4 so there is no confusion?

    Here we go unreal vs unity implementation is the point godwin of this forum.
     
  33. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Then it's up to us to explain why, and I did.
     
    neoshaman likes this.
  34. Binary42

    Binary42

    Joined:
    Aug 15, 2013
    Posts:
    207
    Hi, im struggling to get the ray tracing working with 2019.3.0a12 and 7.0.1 . I did the Wizard (does VR really need to be enabled?), created a Raytracing Environment in the SampleScene and set every option i could find to ray trace. But shadows still wont use raytracing and objects with their materials render pass set to Raytracing become invisible. Any tipps?
     
  35. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    I dont know anyone who has got that working, and I'm not sure if its supposed to work for us yet. I look at the sort of DXR development that has gone on in recent days on github, and it makes me think that more stuff is already working for them, but perhaps thats because they have newer editor alphas than us.

    The same sort of experience happens regardless of whether using HDRP 7.0.1 or one of the much newer branches on github.
     
  36. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    You dont have to touch the VR section to use the DXR section of the wizard. And in later version of HDRP they have changed the wizard interface, so there are 3 tabs instead, one for HDRP, one for HDRP+VR, one for HDRP+DXR
     
  37. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    To give one example, there has been work to start to make different raytracing features with with VR. And some of this stuff is stuff that nobody in this thread has said they were able to get working yet in non-VR scenario (eg shadows).

    Hopefully its clear why I am posting these thoughts. Its because I'm not sure whether these things arent working for us because of editor version we have, or because we are missing a step, or because the code in various recent dev branches (and master) on github isnt working in these regards yet.

    I've confused myself by messing with too many different things and versions, but if I remember properly I can see signs of AO sort of working, and I have got reflections working in a test scene. But shadows are proving elusive, even when all the right options for them seem to be switched on. Same for other features I havent explicitly mentioned here, I dont see much sign of them working and I ran out of things to try other than to wait, and to ask.
     
  38. Binary42

    Binary42

    Joined:
    Aug 15, 2013
    Posts:
    207
  39. OCASM

    OCASM

    Joined:
    Jan 12, 2011
    Posts:
    326
  40. unity_RuwGDfd2lVx01A

    unity_RuwGDfd2lVx01A

    Joined:
    Oct 25, 2017
    Posts:
    23
  41. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    Binary42 and OCASM like this.
  42. unity_RuwGDfd2lVx01A

    unity_RuwGDfd2lVx01A

    Joined:
    Oct 25, 2017
    Posts:
    23
    Can confirm "SHADEROPTIONS_RAYTRACING" fixes it. But 2019.3a12 crashes when I hit play :confused: ... Guess I'll just wait for 2019.3b1 lol
     
    OCASM likes this.
  43. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    789
    It doesn't crash for me.
    I'm running it on a 1080 and not an RTX card
     
  44. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    Does that toggle really fix things for you? I stumbled to this yesterday as well and tried it but I still couldn't make raytraced reflections to do anything right (just get black materials with it enabled), and main scene still goes to green and pink on my end when you run it :D

    I guess I'll try in a new test project and see if it helps.
     
    Last edited: Aug 22, 2019
  45. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
  46. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    I got something happening now when trying this on brand new project (a12, latest staging and that hlsl RT define set to 1). It still doesn't work properly but at least the reflections do reflect things outside the scene now.
     
  47. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    There's something funky about the RT reflections exposure levels, had to dial exposure a lot to actually see the reflections are there:


    Same with just SSR and exposure at more sane level:


    But if I dial down directional light intensity to 10 (old Unity setup), I can ditch the exposure control and get this with RT reflections:


    EDIT: This is now fixed on HDRP/staging. Thanks for the quick fix :)
     
    Last edited: Aug 23, 2019
    elbows likes this.
  48. OnlyVR

    OnlyVR

    Joined:
    Oct 5, 2015
    Posts:
    55
    Where can I find ShaderConfig.hlsl ? It doesn't exists in my project folder/subfolders and \Program Files\Unity 2019.3.0a12\Editor\

    I installed 2019.3a12 that contains 7.0.1 . I did the Wizard, added the Raytracing Environment, but it contains the set of check box only. How can I download/add the Raytracing Sample Scene from the DXR experimental version?
     
  49. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    @OnlyVR like the message said, it's in the high-definition-config package, you have to manually modify the existing package (move it from library/package cache to your packages -folder and edit that file there).
     
    elbows likes this.
  50. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    I love watching the fixes and improvements happen.

    There is a pull request for directional light shadow fixes today, which hasnt gone through yet at the time of me writing this. And another one from a few days ago with UI improvements. An alpha cutoff fix was merged last week too.