Getting computers to do things they were never supposed to do has become an art form over the years. There’s an entire long-running community—the demoscene—dedicated to pushing the boundaries of what’s possible, and it has produced all manner of wizardry, from full-color graphics on the Commodore VIC-20 to wild high-speed animations on the ZX Spectrum.
One of the most impressive achievements of late has been successfully implementing real-time raytracing on devices that lack dedicated raytracing hardware. In this vein, a video surfaced recently of what appears to be full real-time raytracing running on the Sega Saturn, Sega’s largely forgotten PS1-era console. The video is the work of XL2, described by one YouTube commenter as “the Saturn Lordâ€, and it’s one of the most impressive pieces of technical sorcery the internet has seen in a long time.
But wait, what is raytracing, and why’s it so difficult to implement? In the most basic sense, it’s one of the ways by which a computer can work out how objects in a three-dimensional scene are lit. In real life, light bounces around a scene, with different surfaces and materials absorbing, reflecting and/or scattering different amounts of light. Raytracing works by simulating this process, with the renderer tracing the path of a number of rays emitted by the scene’s camera through a given number of bounces to see if they intersect a light source. (In real life, of course, the rays go from light source to camera, but in a renderer it’s more efficient to trace them in the opposite direction.)
This is more accurate than other methods of lighting and thus provides more realistic results, but the trade-off is that it’s also extremely computationally intensive. Modern graphics cards come with specialized hardware designed specifically to handle the computational load, and even then, running something like Cyberpunk 2077 with maxed-out graphics settings and full raytracing enabled is a flex that’ll run you thousands of dollars.
The Saturn dates back to the era when any sort of hardware acceleration—let alone dedicated raytracing hardware—was very much a novelty: the appearance of the 3dfx Voodoo, generally considered to be the first PC graphics card, was still two years away when the Saturn hit the market in late 1994. This made the Saturn an impressive machine, because it did come equipped with a very early form of hardware acceleration: two dedicated graphics chips, one of which rendered polygons while the other handled scene backgrounds.
These chips allowed for the release of 3D titles like Virtua Fighter, whose rudimentary flat-shaded models appear primitive today but looked pretty awesome back in the mid-‘90s. But it’s a big leap from those flat-shaded polygons to the dynamic shadows and lighting of XL2’s demo.
This is all a long way of saying that this video is extremely impressive. It comes with a brief explanation of how XL2 got the demo working: they describe the use of binary space partitioning, a method of dividing the space in a scene recursively to work out which objects are visible and which are hidden behind others. (This technique was famously used by id Software’s John Carmack to implement collision detection in the Quake engine.) They also allude to potential improvements, including combining static light sources with the dynamic lights of the demo and improving the effects of indirect lighting.
Such things would have been thought impossible for a machine like the Saturn—but it never ceases to amaze how much performance enterprising developers can wring out of ancient hardware.
Original Source: https://gizmodo.com/is-can-it-do-raytracing-the-new-can-it-run-doom-2000716851
Original Source: https://gizmodo.com/is-can-it-do-raytracing-the-new-can-it-run-doom-2000716851
Disclaimer: This article is a reblogged/syndicated piece from a third-party news source. Content is provided for informational purposes only. For the most up-to-date and complete information, please visit the original source. Digital Ground Media does not claim ownership of third-party content and is not responsible for its accuracy or completeness.
