Hacker News new | ask | show | jobs
by Jasper_ 2606 days ago
There's also the huge issue of computing the material shading once you've intersected the triangles. Rasterization has the convenient property that all pixels in the draw are coherent with the same material. That isn't true with raytracing, especially diffuse materials where the rays scatter everywhere. So your texture lookups are much more random compared to rasterization. This is why Disney's Hyperion added "ray sorting", to bring back some memory coherency to the problem. The current approaches to real-time raytracing, like NVIDIA's RTX, do not have ray sorting.

The benchmarks on scenes I have seen have shown that triangle intersection is only 5-10% of the time spent, with shading and texture bandwidth being the rest. So I'm skeptical that accelerated geometry tests will solve the raytracing problem.

1 comments

Not quite the full picture...

Yes, rays bouncing off diffuse/glossy surfaces (incoherent rays) do mean texture accesses are much more random, but at the same time it means you can approximate them very easily, by loading much lower mipmap levels, or even switching to a "constant" overall colour after a certain number of bounces.

Whilst Hyperion does utilise ray sorting due to this, it was also due to Disney's insistence on using PTex for their texture mapping (instead of using UVs), which itself requires highly coherent texturing points to be performant.

Other CG/VFX companies are using pathtracing without ray sorting with Arnold, and many others are using Renderman RIS which does a limited amount of Ray batch sorting, but that pretty much tails off after 2/3 bounces, and you're left with ray/shading batches of 1, so Renderman's implementation of ray / shading point sorting is much more limited.

Whilst it is true that in some cases, ray / primitive / BVH intersection proportion of overall render time is as low as 5-10%, it's more normally in the 15-40% range, but this obviously depends on scene complexity and shading complexity. And this is for high-end VFX with highly complex materials: For interactive rendering where you could bake down a lot of materials to single maps (or even primvar mesh vertex attributes like Manuka does), the shading overhead would be a lot less.