Search Unity

  1. Unity 2019.1 is now released.
    Dismiss Notice

Unity Experimental HDRP DXR

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

  1. OnlyVR

    OnlyVR

    Joined:
    Oct 5, 2015
    Posts:
    49
    How to add Directional Light for ray tracing GI and shadows?
     
  2. Jesus

    Jesus

    Joined:
    Jul 12, 2010
    Posts:
    477
    No

    For SSR, it draws data from what is already rendered on-screen. All the '3d rendering' is done before SSR is activated, and SSR just does some math. So no matter what is on-screen, it's already been handled by the time SSR is run.

    With DXR, it will use things not on the screen, and it has to bounce each ray through an unknown area. That ray could hit anything, anywhere.

    Big optimizations will come when they find a way to minimize the unknown part.
    Maybe bounce 0 gets LOD0, bounce 1 gets LOD1, bounce 2 gets LOD2, etc.
     
  3. PixelPup

    PixelPup

    Joined:
    Mar 6, 2018
    Posts:
    18
    Totally solved it. I thought I was up to date but apparently I was not.
    Thanks
     
  4. CoilSpot

    CoilSpot

    Joined:
    Aug 28, 2017
    Posts:
    18
    Can I try ray tracing GI without RTX Card as below video?

     
  5. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    13,872
    Someone mentioned earlier that they were able to do it with a GeForce 10 series card with the latest NVIDIA driver.
     
  6. OnlyVR

    OnlyVR

    Joined:
    Oct 5, 2015
    Posts:
    49
    Yes, it works fine for me - GTX1080
     
    OCASM likes this.
  7. OnlyVR

    OnlyVR

    Joined:
    Oct 5, 2015
    Posts:
    49
    I've create the similar scene to test DXR on my GTX1080:
    UniryTestDXR.jpg
     
    OCASM, Total3D and ANFADEV like this.
  8. Duende

    Duende

    Joined:
    Oct 11, 2014
    Posts:
    91
    I am very excited about this, finally Unity is trying to implement real time GI. Cheer up!
     
  9. RZR_SRT

    RZR_SRT

    Joined:
    Dec 18, 2012
    Posts:
    2
    Sad.... Can't test it((( My hardware probably can run it, but- win7...
    By the way, does any body knows, can Vulkan run RTRT under Win7?
     
  10. eizenhorn

    eizenhorn

    Joined:
    Oct 17, 2016
    Posts:
    1,269
    From which century you are? :confused: Win7...
     
  11. Duende

    Duende

    Joined:
    Oct 11, 2014
    Posts:
    91
    I was using Windows XP until a few years ago. lol
    I have Win10 and I could not tested it either. My video card is a nvidia gtx 750 ti. I assumed that it is in a very experimental phase yet.
     
  12. cynex

    cynex

    Joined:
    May 5, 2015
    Posts:
    10
    Hey Guys, loving trying out the RTX / DXR stuff. Bought a 2080 card just for learning this stuff. I've noticed a few hiccups in the HDRP raytracing pipeline, and hopefully this helps you guys out. I'm sure you are aware for most of these but I wanted to see if and when they are planned to be resolved.



    Please note this test ONLY uses DXR reflections, all other RT features have been disabled.
    I first started this to try and create an infinity mirror.

    The first thing I came to notice is that there is a bug in scene view where everything goes black until you move the camera in view of the skybox, then return to your origin, you can make small edits but this issue persists quite frequently.

    Secondly I realized that currently infinity mirrors are impossible in unity (so far) as secondary bounces are not at all considered, and in fact reflect completely black. [ See edit ]

    The Standard HDRP Lit shader does work in some cases, in the default workflow it works fine for example. Add Triplanar mapping and the reflections show a solid color (also, why no local space triplanar mapping unity ? - this is much preferred to the world space method as it retains texture mapping co-ordinates relative to the object)

    If you add transparent objects using HDRP Lit in transparent mode, the reflection is just ignored entirely. The same goes if you use HDRP Lit Tessellation.

    Looking forward to trying the future releases, but I'm wondering when unity will get to a full integration ?

    [EDIT] Reading an above post, changing up the materials to use the raytracer and setting primary visibility on seems to do the trick for x number of reflections, super cool stuff. Some material issues occur though. will make another video tomorrow.
     
    Last edited: May 17, 2019
    Total3D likes this.
  13. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,169
    There seem to be 2 main things that are public knowledge and involve the future.

    From the docs:

    From the blog:

    https://blogs.unity3d.com/2019/04/26/ray-tracing-what-does-it-mean-to-you/

    From that I would say it is not safe to make any assumptions about how the current experimental version we have will differ from the actual preview package due later this year. The implementation could be very different indeed, or maybe it will just be an evolution of what we have already got.
     
  14. rizu

    rizu

    Joined:
    Oct 8, 2013
    Posts:
    999
    elbows likes this.
  15. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,169
  16. eturquin

    eturquin

    Unity Technologies

    Joined:
    May 17, 2019
    Posts:
    1
    Hi all,
    We've uploaded a 1.0.1 release, with which you should now be able to build a working Windows player.
     
  17. PhoenixAdvanced

    PhoenixAdvanced

    Joined:
    Sep 30, 2016
    Posts:
    111
    Hello,

    I am very interested in real time ray-tracing in unity. I can't try out this project yet because I don't currently have an RTX card, but I am just wondering would it be possible to use this to enable dynamic emissive textures?

    IE, a moving neon sign that casts light onto a piece of geometry that is also moving? Could this be done?

    Thanks!
     
  18. cynex

    cynex

    Joined:
    May 5, 2015
    Posts:
    10
    fyi : this is a DXR implementation which will also work on the 10 series nvidia cards, albeit I wouldn't ask for more than RT reflections to maintain a stable frame rate. But yes, I believe you could setup something like that.
     
  19. PhoenixAdvanced

    PhoenixAdvanced

    Joined:
    Sep 30, 2016
    Posts:
    111
    I only have a 980TI at the moment, so I'll need a new card in any case, I think!

    Thank you for your reply, I'm excited at the prospects of this!

    I assume it will require the use of the HDRP though, there won't be a version released for the standard render pipeline?
     
  20. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,169
    Yes that a pretty good assumption at this stage. Best not to assume much in terms of performance either, will take some time (and later preview version of Unity DXR rather than this early experiment) to work out what is really practical for different scenes and situations.

    You might want to check out HDRP anyway in meantime to see if any of its existing non-DXR features could help with your scenario. For example there are realtime textured area lights that could perhaps be used for your purpose. I havent done that much with them yet because most of what I do uses volumetric fog in HDRP and so I need to wait till this type of light is supported by the volumetric system.
     
  21. bx3776

    bx3776

    Joined:
    Nov 25, 2014
    Posts:
    4
    I downloaded this version but it doesn't work. My graphics card is RTX 2080, win10 version is upgraded to 1809, execute Unity.exe, prompt me to install unity hub. After the successful installation, when I created the project, I was prompted to have no license, I could not create the project and I could not start the Unity editor. What should I do? QQ图片20190522165216.png
     
  22. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    472
    Did you sign into your account with the Hub?
     
  23. PhoenixAdvanced

    PhoenixAdvanced

    Joined:
    Sep 30, 2016
    Posts:
    111
    Yeah, that's what I thought, thanks.

    I probably will look at HDRP pretty soon, but I was waiting for it to come out of preview. I'm sure there are lots of new features that might help with what I'm doing, but I don't even want to think about porting or converting my project until it's stable.
     
  24. SebastianWolter

    SebastianWolter

    Joined:
    Aug 10, 2015
    Posts:
    1
    Hello folks,

    Simple Setup:
    • 1 Cube in the Scene. RaytracingShader is Dispatched by Script and it should write to an RenderTexture.
    • RayOrigin = (0,0,0), RayDirection = (0,0,1)
    • RaytracingShader has Miss Function, RayGen Function and ClosestHit Function.
    Initial Output Color (before TraceRay) is red. Miss shader sets color to green, closesthit should set it to blue.

    The Miss Shader seems to be triggered correcly if the ray does not hit the cube.
    If the ray hits the cube, the miss shader is not triggered (correctly), but the closesthit shader is also not triggered.
    I have tried to set the material of the cube to HDRP Unlit (with Raytracing on). But the color stays red.

    Anything i am missing here?
     

    Attached Files:

    • DXR.zip
      File size:
      1.8 KB
      Views:
      12
    Last edited: May 23, 2019
    fherbst likes this.
  25. Jesus

    Jesus

    Joined:
    Jul 12, 2010
    Posts:
    477
    To expand on this, the implementation off ray-tracing in Unity DXR isn't really 'tricksy'. Not meaning this in a bad way by any means, but in that it's the normal, logical way to start getting a stable thing out in the wild for users. Especially with the ambient/softer lighting, there's a million and one tricks to improve performance and boost quality, similar to the way offline raytracing evolved throughout the 2000's.

    Think of it as the difference between 16-bit colour, vs 32-bit with dithering to stop colour banding. Same field, same job, but as things mature you start seeing solid gains that become 'normal'.

    As someone who uses HDRP, it's about where LWRP was this time last year, if you used that. Can probably do most if not almost all you ask or expect of it, but you'll run into some issue that's a WIP-style bug or something's going to have its framework changes in the future.
     
  26. Lex4art

    Lex4art

    Joined:
    Nov 17, 2012
    Posts:
    150
    I did a second attempt to port my free showcase map - updated Unity DXR build still has same problem with multi-material meshes (sometimes a couple of meshes with 2 or even 3 materials are working, but mostly not - ray tracing dies).
    Here is the link to this map in it's current state: https://drive.google.com/open?id=1TQXDtWOo5azisHAnrKboIRfJGyI2jSx1
    All meshes with multi-material setup are isolated in to the one group there:
    Real materials vol.0 multi-material meshes isolation.png

    Feel free to play with those models/materials ).
     
    Last edited: May 26, 2019
  27. PhoenixAdvanced

    PhoenixAdvanced

    Joined:
    Sep 30, 2016
    Posts:
    111
    Yeah, that's what I thought. I really don't want to play with it until it has been officially released.
     
  28. bx3776

    bx3776

    Joined:
    Nov 25, 2014
    Posts:
    4
    Yes, I do
     
  29. Lex4art

    Lex4art

    Joined:
    Nov 17, 2012
    Posts:
    150
    A suggestion (don't know if it's technically feasible) - add an checkbox to switch from "number of samples" way to the "adaptive" way, that will depends only on the budget (in milliseconds) for rays to cast. This way framerate won't suffer on more complex scene view angle/weaker hardware, only quality will drop (e.g. more noisy visuals) - this may be more valuable in terms of visual experience.
    DXR suggestion.png
     
  30. Migueljb

    Migueljb

    Joined:
    Feb 27, 2008
    Posts:
    411
    Is anyone trying outdoor environment nature scenes with say speed trees or anything to show off what unitys ray tracing can do for an outdoor nature scene?