Hacker News new | ask | show | jobs
by GuB-42 1625 days ago
Ray tracing is extremely costly for real time rendering and is almost never used unless there is some trickery. We have some limited amount of it now, especially since the Nvidia RTX series of GPUs, but rasterization is still king.

Among the trickery being used is raycasting, used in early 3D games like Doom, which is a kind of 2D ray tracing that works by column instead of by pixel. Real time ray tracing techniques, in particular signed distance field raymarching is a staple of the demoscene, this is made possible by using mathematically defined objects.

For prerendered graphics (ex: Pixar movies), the dominant technique is path tracing, it is a randomized variant of ray tracing that produces a noisy image that is progressively refined. It is even more costly than raytracing, but is much better at global illumination.

1 comments

An interesting caveat is that ray tracing has a high up-front cost, but rendering time is less sensitive to scene complexity than traditional polygon rasterization. Beyond a certain level of scene complexity, ray tracing can be faster, it's just that games are generally limited by what can fit in memory of a modern graphics card.

Regarding Pixar, they actually avoided ray tracing until they decided they really did need accurate reflections for the movie Cars. The reason is that traditional rendering is memory parallel: you can render a scene that won't fit in memory on a single computer by spreading the scene across a cluster. With ray tracing, the memory access patterns aren't predictable, so you have to have the whole scene fit in memory on every compute node. This doesn't matter for games because games don't divide the graphics computation across multiple machines.