Search Unity

  1. How has 2019.2 and the beta been for you so far? Give us feedback in this thread.
    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:
    14,037
    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:
    92
    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,312
    From which century you are? :confused: Win7...
     
  11. Duende

    Duende

    Joined:
    Oct 11, 2014
    Posts:
    92
    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,197
    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:
    1,042
    elbows likes this.
  15. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,197
  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:
    117
    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:
    117
    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,197
    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:
    488
    Did you sign into your account with the Hub?
     
  23. PhoenixAdvanced

    PhoenixAdvanced

    Joined:
    Sep 30, 2016
    Posts:
    117
    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:
      29
    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:
    153
    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:
    117
    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:
    153
    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:
    425
    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?
     
    sqallpl and newguy123 like this.
  31. PhilSA

    PhilSA

    Joined:
    Jul 11, 2013
    Posts:
    1,059
    Tried this just now and I'm running into problems:


    The "DXR" project template does not appear, and if I choose "3D" and click "Create", I get the error you see at the bottom of the window ("The application path does not exist")

    I downloaded the 1.0.1 release on github
     
  32. Lex4art

    Lex4art

    Joined:
    Nov 17, 2012
    Posts:
    153
    PhilSA - you need to run Unity.exe first from that folder with 1.0.1 github release. After that weird action the magic happens - DXR will be added to the list of projects presets. Unusual way, got stuck there too...
     
    Last edited: Jun 27, 2019
    PhilSA likes this.
  33. rizu

    rizu

    Joined:
    Oct 8, 2013
    Posts:
    1,042
    Make sure you actually clone it with git lfs or with git client that supports lfs, do not try to use github websites download option as it'll not load everything.
     
  34. Lex4art

    Lex4art

    Joined:
    Nov 17, 2012
    Posts:
    153
    Any news on the ray tracing progress? Feels kinda abandoned...
     
  35. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    4,156
    They had a talk at digital dragon this years, video is on youtube, slide are obtainable through google. See enlighten depreciation thread for link.
     
    Lex4art likes this.
  36. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    488
    It's still being developed. You can see the progress on Github. There are a few branches taha all have DXR work being done so I can't really link to one specific branch but you see new ones pop up and old ones get merged into other branches. https://github.com/Unity-Technologies/ScriptableRenderPipeline/branches
     
    Lex4art likes this.
  37. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    142
    Hi guys

    Not sure what I'm missing here, but I'm getting a bunch of errors. I'm using latest NVidia driver 431.36
    My Secondary card is a 1080 Ti (no monitors connected), and my primary card is a GTX 670 with 2 monitors connected

    I suspect I'm getting the issues since Unity is using my 670 instead of my 1080 Ti, but thought I'd double check here before I reconnect hardware...

    upload_2019-7-13_12-54-3.png

    The "Interior" Scene runs, but seems like the switches are reversed. On is off and off is on (or RTX is not working at all since UNity is using my wrong card)
     
  38. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    425
    Hi, as we mentioned at GDC, we will provide a preview version of DXR in the main line with Unity 19.3
     
    Cascho01 and Lex4art like this.
  39. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    142
    Errrr ok, but can we continue to see new developments in the experimental version before then, or will we only see an update with 2019.3?

    Also,can I get an answer to my question on my previous post please.....
     
  40. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,197
    I'm not a Unity insider but I never expected to see lots of updates to the experimental version, I expected to see DXR stuff being worked on in various HDRP branches that would eventually work with versions of the 2019.3 editor that we have access to. And thats exactly whats been happening, as best I can tell from keeping an eye on github.

    It would be good to know which version of the 2019.3 alpha or beta we will be able to actually try that stuff with, but in the meantime I am content to see work on it happening on the pipeline side of things, even though I cannot try that myself yet.
     
  41. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    425
    We are not doing any other development on this experimental version. And the preview version we will deliver in 19.3 will not be compatible. The experimental version was just a sandbox to allow to play with raytracing.

    >I suspect I'm getting the issues since Unity is using my 670 instead of my 1080 Ti,
    That's would be my guess as well. I have no workaround to provide currently other than switching off gpu card
     
  42. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    142
    Are we talking about the 2019.3 beta here, or the official 2019.3 release?
     
  43. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    425
    19.3 beta version around October should be able to run preview version of HDRP DXR.
     
    Cascho01, elbows, newguy123 and 2 others like this.
  44. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    142
    So about 3 months give or take. Looking forward to it, I hope it's going to blow our socks off! (Seeing that our peers are already way ahead of us with their Unreal DXR workflows and their realistic AEC Unreal presentations)

    Pixyz and now also Reflect is cool and all that, but as far as upmarket realty presentations and marketing goes, where we are most concerned about realistic results, to really compete in the AEC sector with those "other guys", we need a solution to easily convert data (including materials and lighting) from other DCC packages (like 3ds Max and V-Ray) to Unity. People coming from an Archviz background already have tons of gigs of assets in 3ds Max and VRay format. They want to easily convert and bring those into Unity without having to mess with any recreation of materials or lights in Unity.
     
    Last edited: Jul 16, 2019 at 9:00 PM