5 ms·
Khronos Group Releases Vulkan Ray Tracing
- einpoklum 7y agoObligatory... Vulkan Ray Tracing: https://is.gd/DMIKVs https://is.gd/DMIKVs
- deleted 7y ago[deleted]
- capableweb 7y agoIf you're interested in some more details: https://devblogs.nvidia.com/vulkan-raytracing/ https://devblogs.nvidia.com/vulkan-raytracing/ Do note that the following is part of the article and it's from 2018, not sure about it's accuracy anymore: "As denoted by the ‘NVX’ prefix, this API is not yet final and could undergo some minor changes before the final release."
- chrisseaton 7y agoCan anyone give me any intuitive understanding of how ray tracing can be adapted into a conventional rasteriser workflow? Doesn't ray tracing need a persistent, whole-world scene graph? Rays can end up anywhere, no matter where the camera is pointing, isn't that right? I thought the whole scene wasn't on the GPU? I thought the CPU streamed polygons to be drawn based on what was likely to be visible, but it can't stream the entire world every draw can it?
- garmaine 7y agoThe data for each scene hasn't been streamed to the GPU in a long time, not since the first few generations of GeForce cards. "Vertex buffers" store the geometry in the GPU's RAM, so it's there. The game engine just swaps out buffers as things come in and out of view. I have the same questions as you regarding how this works with respect to offloading the the scene graph data structures though.
- Qu3tzal 7y agoLooks like the GPU stores collections of triangles then used to perform the ray computations. https://devblogs.nvidia.com/practical-real-time-ray-tracing-rtx/ https://devblogs.nvidia.com/practical-real-time-ray-tracing-...
- mmozeiko 7y agoTo shoot rays in scene you create acceleration structure (internal to driver/GPU hardware). Input to this structure are vertex & index buffers & model transform matrix. Geometry is specified as triangles or AABB. You can update this structure later by providing new transform matrix. There are different flags that control performance/memory usage - fast tracing or updates vs less memory usage. See following links: * https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdBuildAccelerationStructureNV.html https://www.khronos.org/registry/vulkan/specs/1.2-extensions... * https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkGeometryNV.html https://www.khronos.org/registry/vulkan/specs/1.2-extensions...
- garmaine 7y agoBut efficient ray casting requires a scene graph structure--an octree, or a bsd-tree, etc. Are the details of that just handled by the driver?
- mmozeiko 7y agoYes. Driver/GPU handles that. It "just works". You just manage things on high level - what can be moved in world, what cannot and group the updates together.
- magicalhippo 7y ago> Rays can end up anywhere, no matter where the camera is pointing, isn't that right? Only indirect or secondary rays. Primary rays (the ones from the camera) can only hit things that are visible to the camera. Also, ray-tracing trivially allows for breaking up the rendering in multiple steps. You could for example have a pre-made acceleration structure for the static part of the world, a less efficient but fast-building one for dynamic objects in the world, cast against either and see which intersection has the shortest distance. This could be done in parallel, and you can be more clever about it too depending on circumstances. Not saying that's what people do, I've been out of the game for too long, but at least it's an option.
- chrisseaton 7y ago> can only hit things that are visible to the camera Isn't the whole point of ray tracing things like refraction? Otherwise why not just rasterise?
- correct_horse 7y agoI think you're generally correct, but that games studios and animators don't care much about refraction specifically (although it does make for cool tech demos). They care more about reflection and lighting in general (spotlights such as windows, true area lights - no point lights disguised as area lights using emmisive textures)
- BubRoss 7y agoRay tracing can be used for different camera projections, sharp reflections, sharp refractions, sharp shadows and other things like physics. (Also it's rasterize)
- pavlov 7y ago“...rasterize” — that’s American, rasterise is correct in UK and countries that follow their English spelling.
- chrisseaton 7y ago
- w0utert 7y agoOn top of what other people wrote, I think a common misconception is that raytracing is only useful to determine the final shaded color of a pixel on the screen. In its current form, things like RTX are still way too slow to do this at any appreciable quality level. You can use raytracing passes at very different resolutions, quality settings, geometry detail levels etc though, and combine them with the 'regular' render pipeline later. For example to calculate environment maps for reflections, shadow maps, or even things completely unrelated to drawing (hit tests, sound reflection etc). Suppose I want to have a nice reflection in a pool of water for example, you can already get a very good looking effect by raytracing a low-resolution environment map from the water pools' perspective, which wouldn't need any tracing of secondary rays etc, and use it in your water shader. There's uncountable ways something like this could be useful (not all of which can be accelerated very well though, I guess) For doing the more traditional raytracing at any resolution you will always need an acceleration structure like a BVH though, but building/updating that is part of these kinds of hardware extensions.
- jagger27 7y agoNice to see Intel, AMD, and Nvidia working together on an open standard. Do Apple's in-house GPUs have Vulkan support or would something like this have to go through a Vulkan-on-Metal translation layer instead?
- enos_feedler 7y agoLooking more and more like Apple will never touch Vulkan directly. They are heavily invested in cross-device performance graphics using Metal. The more the API situation evolves, I can see Google, Microsoft and Sony going all in all Vulkan for performance graphics. Only if MS is willing to part ways with D3D12 For cross platform I could see WebGPU + WebAssembly being the choice, where it abstracts both Metal and Vulkan.
- pdelbarba 7y agoHonestly I feel like D3D12's days are numbered. Tons of engines and devs are moving to Vulkan and while Vulkan has tons of tutorials and documentation, D12 has NOTHING. If you want to just go out and make a D12 game, you basically need to join up with one of the existing DirectX shops that has all the knowledge siloed within.
- enos_feedler 7y agoInteresting. I haven't been following the games industry for a while. Thanks for the insights! Given Microsoft's move towards more open ecosystems, I can definitely see it happening. Especially launching Android devices at year's end where I am sure cross-device gaming (TV + Mobile) will become important. I know Android is increasingly focused on Vulkan
- pjmlp 7y agoThat is not we are seeing from GDC talks and LunarG surveys. Vulkan is a PC thing, without any impact on consoles, even on the Swift, NVN is what gets mostly used unless it is a PC port. Also the subject of this thread, Ray Tracing, was developed by Microsoft and NVidia together and took two years to reach Vulkan. How long will Vulkan now take to adopt shader meshes?