Sign in with
Sign up | Sign in

A Hybrid Rendering Engine?

When Will Ray Tracing Replace Rasterization?
By

If you've read this far into this article, you may think that ray tracing is still far from being ready to replace rasterization, but that in the meantime it might be a good idea to mix the two techniques. And at first look, they do seem to be complementary. It's easy to imagine rasterizing triangles to determine visibility, taking advantage of the excellent performance that the technique offers, and use ray tracing only on certain surfaces to add realism where it's necessary, such as adding shadow or achieving exact reflections or transparency. After all, that's the approach Pixar used to make Cars. The geometric models are rendered with REYES and the rays can be cast on demand to simulate certain effects.

For Cars, Pixar used a hybrid rendering engine combining REYES for visibility and on-demand ray tracing for reflections and AOFor Cars, Pixar used a hybrid rendering engine combining REYES for visibility and on-demand ray tracing for reflections and AO

Unfortunately, though it sounds very promising, the hybrid solution is not easy to apply. As we've seen, one of the main disadvantages of ray tracing has to do with the data structure needed to organize objects in such a way as to limit the number of tests for ray/object intersection. Using a hybrid rendering model instead of pure ray tracing doesn't change that. The data structure will still have to be put in place, with all the disadvantages that implies. For example, we might consider ray tracing the static data and rendering dynamic data using rasterization. But with that scenario, we lose all the advantages of ray tracing. Since the dynamic data does not exist for the ray tracer, it'll be impossible to make objects cast a shadow or to see their reflections.

What's more, in terms of performance, the biggest problem is with the memory accesses generated by the secondary rays, which are typically the rays we need to keep in our hybrid rendering engine. So, the performance gain won't be as great as one might think. Since most of the rendering time is dominated by calculating secondary rays, the gain from avoiding calculation of primary rays is negligible.

In other words, by attempting to combine the advantages of both methods, this solution could end up combining the disadvantages, while losing the elegance of ray tracing and the high performance of rasterization.

React To This Article