Search Unity

Unity & Ray-Tracing

Discussion in 'General Discussion' started by Liminal-Ridges, Aug 16, 2018.

  1. Liminal-Ridges

    Liminal-Ridges

    Joined:
    Oct 21, 2015
    Posts:
    256
    Im not an expert in the graphic arts but i understand that ray-tracing is a rendering method. Will this method be embeded in Unity or is it up to the developer to write some kind of code for it? If the second where can i find a tutorial?
     
  2. Deeeds

    Deeeds

    Joined:
    Mar 15, 2018
    Posts:
    739
    It's years away. Forget about it. Focus on traditional rendering, it'll be around for another decade.
     
    Glader, Martin_H, Kiwasi and 2 others like this.
  3. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,157
    If you need to look up a tutorial for how to implement raytracing then you are absolutely out of your depth.
     
  4. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    The current hype is not about purely ray-traced scenes. Rather it is about a hybrid approach, where the traditional graphics rasterisation techniques are still used for many things, and the ray-tracing stuff provides certain things like area lights with nice shadows, nice reflections etc.

    When nvidia do their shiny presentations about this stuff, so far they have partnered with Epic using experimental stuff added to UE4. But Unity and many other companies are shown in the presentations slides as being partners too, so it is reasonable to expect that they will eventually have some ray-tracing based offerings too.

    But even the UE4 stuff is not ready for people to try right now. When pressed for timing estimates, people from Epic say things such as 'some code in github by the end of the year, with a view to adding it to a binary release at some stage of 2019.' And they might be referring to one ray-traced feature in particular (eg area lights) rather than everything that has been demonstrated so far.

    As far as Unity goes, the most likely future possibility is that some of these ray-traced techniques will eventually end up in the High Definition Render Pipeline. But since many traditional rasterised parts of that pipeline are still ongoing work and are not near to being finished, I think it would be foolish of me to predict any timescales. It is also quite possible that initially the focus will be on adding the GPU-accelerated raytracing graphics API stuff to the general Unity scriptable pipeline facility, which will mean that 3rd party graphics developers can start to work on their own implementations of particular techniques within Unity, using these developers own customised render pipelines. And it probably wont be long at all till some people start begging for this sort of thing, so there will be some 'developer demand' for it that Unity probably wont ignore for years and years.

    With all that being said, there are a range of other ways to do ray-tracing in Unity already, but without the GPU-accelerated stuff that nvidia like to show off, the associated DirectX ray-tracing API and other important parts of the puzzle like the AI de-noising feature, uses of this stuff that result in pretty graphics do not generally run at anything approaching realtime speeds, so are of limited interest.
     
  5. imaginaryhuman

    imaginaryhuman

    Joined:
    Mar 21, 2010
    Posts:
    5,834
    I don't think current graphics API's are really designed to deal with a ray-traced world. I mean, usually you issue drawing commands to render a mesh or whatever, in some sequence. In ray-tracing that's totally not how it works - you have all these models or math functions in memory and then trace rays, which can bounce around all over the place and need to lookup ALL the objects as it travels through the scene, so all the object data has to be in memory at once and not as 'drawing commands' but as modelling data. It's a very different approach to rendering. To do it on the GPU would require moving all of the model data and material data and all that onto the GPU, not as drawing commands as such but more like just holding the whole scene in memory all the time. Then there's basically one single screen-space drawing operation which just zaps the entire scene with rays, massively parallel.
     
    Kiwasi and schmosef like this.
  6. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    The directx raytracing blog post from earlier this year is a good starting point for explaining how these two worlds will be bridged during this hybrid era:

    https://blogs.msdn.microsoft.com/directx/2018/03/19/announcing-microsoft-directx-raytracing/

    To pluck just one specific part of it out that relates to what you were saying there:

     
  7. Liminal-Ridges

    Liminal-Ridges

    Joined:
    Oct 21, 2015
    Posts:
    256
    So about the RTX, what changes in unity?
     
  8. Deeeds

    Deeeds

    Joined:
    Mar 15, 2018
    Posts:
    739
    It will run faster, as is.
     
    Liminal-Ridges and bobisgod234 like this.
  9. Liminal-Ridges

    Liminal-Ridges

    Joined:
    Oct 21, 2015
    Posts:
    256
    What about tbe raytracing? It only matters if the developer has relevant code?
     
  10. Deeeds

    Deeeds

    Joined:
    Mar 15, 2018
    Posts:
    739
    Raytracing only matters IF you have all (or most) of the following:

    1. an understanding of raytracing's benefits and limitations
    2. suitable hardware (limited, and very expensive)
    3. an audience with suitable hardware (this is currently NOBODY!)
    4. knowledge of how to use raytracing effectively (this is almost nobody)
    5. facilities to use and publish raytracing content
    6. something to create that benefits from raytracing's few benefits

    As others have said, raytracing, as a game rendering technique, is in its infancy. Forget about it for this, and possibly the next generation of hardware, as they'll have a lot of work to do before they (Nvidia) get it to be a viable alternative to existing methods. That's probably 4 years of hardware releases (two generations) plus adoption rates that matter (at least another 2 years) and then consequential needs for this approach (uncertain extra time).

    Other than being a research fellow at Nvidia, there's not much point even considering real time raytracing at this point.
     
    zenGarden and Liminal-Ridges like this.
  11. ShilohGames

    ShilohGames

    Joined:
    Mar 24, 2014
    Posts:
    3,023
    I agree that there is no audience right now for RTX enabled games, but there will be soon. Nvidia's entire RTX 20xx lineup will support RTX. So even if the RTX 2080 ti is too expensive for most people, there will soon be less expensive cards to fill each price point. A lot of PC gamers will soon have hardware that supports RTX.

    As for something that benefits from hybrid raytracing like RTX, that would include games with shadows, lights, and reflections. Any 3D game with PBR is going to potentially benefit from supporting RTX. The demos shown today showed impressive visual improvements when using RTX.
     
    Liminal-Ridges likes this.
  12. Liminal-Ridges

    Liminal-Ridges

    Joined:
    Oct 21, 2015
    Posts:
    256
    Is it true that raytracing is "so good" that the results go beyond real and look fake? I colleague said this but didnt sit well in my head.
     
  13. IgnisIncendio

    IgnisIncendio

    Joined:
    Aug 16, 2017
    Posts:
    223
    I think it's because the demos went above and beyond to show off the reflections so it's so reflective that it doesn't seem real. Remember, ray tracing doesn't mean automatic photorealism. Good assets and photogrammetry is still more important.
     
    Liminal-Ridges likes this.
  14. ShilohGames

    ShilohGames

    Joined:
    Mar 24, 2014
    Posts:
    3,023
    Game developers could use the hybrid raytracing to give either a realistic look or a stylistic look. It would be a tool, similar to how post-processing features are tools for providing control over the look.
     
  15. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    See any dodgy film cgi.
     
    Ryiah likes this.
  16. Barlov

    Barlov

    Joined:
    Sep 5, 2018
    Posts:
    1
    Here is a vid that discusses implementation of Ray Tracing while showing examples using the as of yet unfinished BF5.
     
  17. MaxWitsch

    MaxWitsch

    Joined:
    Jul 6, 2015
    Posts:
    114
  18. Liminal-Ridges

    Liminal-Ridges

    Joined:
    Oct 21, 2015
    Posts:
    256
    Nice, but how do i use the feature? Or is it be default?
     
  19. JJJohan

    JJJohan

    Joined:
    Mar 18, 2016
    Posts:
    214
    I'm curious to see what happens in terms of APIs for enabling ray-tracing across hardware vendors - whether you'd have to have two separate implementations to support both nVidia RTX and AMD's eventual solution or if this is something that'll be handled by the underlying graphics API eventually (i.e. Vulkan/DirectX). It'd be a shame this goes in the way of GameWorks where half a game's audience doesn't support hardware accelerated features.
     
  20. MaxWitsch

    MaxWitsch

    Joined:
    Jul 6, 2015
    Posts:
    114
    DXR does not depend forever on NVidia's RTX architecture, or not at all, since it was developed for Microsoft's DirectX.
    AMD's "Radon Rays" has also no specific Hardware requirements as far as i know.

    I guess it was just a big Marketing Clue.

    Quote from the Microsoft Blog
    https://blogs.msdn.microsoft.com/directx/2018/03/19/announcing-microsoft-directx-raytracing/
     
    Last edited: Oct 2, 2018
  21. discofhc

    discofhc

    Joined:
    Dec 18, 2017
    Posts:
    47
    Hi guys!

    I saw a few branches on HD pipeline regardind Raytracing, with recent commits (today).

    There are any info on Unity plans for raytracing?

    Thanks!
     
  22. CloudyVR

    CloudyVR

    Joined:
    Mar 26, 2017
    Posts:
    715
    I just dropped big bucks on a couple 11G-P4-2281-KR GPUs. Would sure be a shame if Unity missed the opportunity to utilize them fully, especially for VR applications.. :(
     
    Last edited: Jan 11, 2019
  23. Liminal-Ridges

    Liminal-Ridges

    Joined:
    Oct 21, 2015
    Posts:
    256
    Nice. I have a 1060 6gb and wanted to sell it to get an 2060 that will support freesync but with the european bullshit ill have to search for it elsewere..
     
  24. konsic

    konsic

    Joined:
    Oct 19, 2015
    Posts:
    995
    OCASM likes this.
  25. discofhc

    discofhc

    Joined:
    Dec 18, 2017
    Posts:
    47
  26. Schubkraft

    Schubkraft

    Unity Technologies

    Joined:
    Dec 3, 2012
    Posts:
    1,073
    Ryiah likes this.
  27. discofhc

    discofhc

    Joined:
    Dec 18, 2017
    Posts:
    47
    Quoting another thread about raytracing:

    Really hope we can have more news... but this is happening :)
     
  28. konsic

    konsic

    Joined:
    Oct 19, 2015
    Posts:
    995
    I would rather want UE4's distance field indirect shadows than RTX in Unity.