How Ray Tracing Works

by Marshall Brain

Even if you don’t care one bit about the coding of a ray tracing engine, click on this article and look at the progression of pictures, which become stunning:

Building a Ray-Tracing 3D Renderer from Scratch Over a Weekend

In the article he shows his steps, starting from a single line of code and working up to a complete ray tracing engine. The code for the images is available, and the program is only about 800 lines long. It is amazing that so little code can create such rich and realistic images.

If you would like to understand the code, an article like this is helpful:

Ray Tracing: Graphics for the Masses

The article walks through the basic equations and includes links to other ray tracing packages.

The traditional problem with ray tracing has been the computation time, which can be hours or days per image (depending on the complexity of the image and the amount of detail desired). But as computers get faster, the idea of real-time ray tracing becomes imaginable. This video talks about one real-time implementation using three PS3 gaming consoles to provide the computation:

In this next video, the image is much simpler, but all of the computation is being done on a single GPU in real time:

From the description:

XRTRay is a simple real time ray tracer. There is nothing advanced about it. Just a simple basic ray tracer on the GPU rather than the CPU. This project was created to show people that real time ray tracing is possible. This was done on a home PC with a 2.2 Ghz AMD single processor and GeForce 6800 GT.

This project is long dead and I moved onto another project but if you are interested in picking this up, head over to: http://scyanidegaming.com.

In ten years, we will be able to buy game consoles that are 20 times more powerful than today’s PS3. At that point, games will be able to use real-time ray tracing with ease and they will look even more realistic than they do today.

Leave a Reply

You must be logged in to post a comment.