DEV Community

harleybl
harleybl

Posted on

A Ray Tracing Anecdote

Overview

I was reading an article about the next generation of Playstation and Xbox consoles. Each of them will support real-time Ray tracing. Wikipedia defines Ray Tracing as "a rendering technique for generating an image by tracing the path of light as pixels in an image plane and simulating the effects of its encounters with virtual objects."

In 3D computer graphics, ray tracing is a technique for modeling light transport for use in a wide variety of rendering algorithms for generating digital images.

.
I am excited to see this development because I believe it will bring a significant improvement in the visual quality of the games and VR experiences of the near future.

Here is an excellent example of the difference in visual quality using Minecraft. The Ray-traced version on the left:
Minecraft regular vs. Ray Tracing

You can watch the full video here: https://www.youtube.com/watch?v=nXoLY9lF-NI

Back to the Past

However, this story isn't about the near future, and it starts in the distant past. Gather 'round the campfire kids, because Grandpa is off his meds and is about to spin a yarn about life back in the late 90s.

The year was 1998, and I was hired out of college to write graphics software for a financial news television station. My group was responsible for writing the software that rendered the scrolling ticker, news stories, and graphs on the television screen.

The head of the whole division had recently seen Toy Story and remarked that he wanted intraday 3D graphs to be of the same quality. My boss decided that this would be a good project for me as the new guy since it was off the critical path of the main software the group was responsible for producing. I rolled up my sleeves and got to work.

The "Architecture"

What ensued was a Rube-Goldberg machine of epic proportions to act as a prototype to create these 3D intraday graphs. Here was how the application worked:

  1. A PERL script would read an XML configuration file that contained the graph definition
  2. The Perl script requested the market data from an API and write that to a text file.
  3. It would then launch Maya, load up a template scene with some Mel scripting language that knew how to read the market data file, and create the 3d models for the graph and place them in the correct part of the scene.
  4. The script would send the scene file to a rendering farm running Renderman nodes to render the frames of the scene to a configured shared directory.
  5. Once Renderman generated all the frames, the script would launch another program to combine the frames into an AVI file for display on television.

I also created a front end in Perl and Tck/TL to edit the configuration and so an operator could monitor the progress of the application.

The render farm consisted of every spare Silicon Graphics machine I could find and install Renderman on with the temporary license the company had given us to test the software. I used additional capacity on all the DEV and UAT machines, which gave me a modest farm of 10-15 machines.

The work-horse of the render farm was the SGI Indigo 2 in all it's glory here:
Rendering machine

The main problem with this setup was the time it took to render. My small farm was able to deliver 10-15 seconds of footage in 15-20 minutes. This was not fast enough for doing intraday financial graphs. I demonstrated the final product to the department head, and he was impressed with the final product. He asked what it would take to bring the render time down. I did some calculations and estimated that we would need about $100,000 just in Renderman licenses, and probably another $100,000 in hardware to get the time down to five minutes. Needless to say, that was the end of the project.

Conclusion

This holiday season, you'll be able to buy a game console for ~$400 that will do 60 times a second what took minutes and considerably more money to do in minutes, 20+ years ago.

Top comments (0)