Ray Tracing

Ray Tracing is a method of rendering shadows and light in a scene by tracing the path of a ray backward in a 3D world. In its simplest implementation, it works by tracing a single ray per pixel. It calculates what polygon the ray would hit first, and then calculate all the additional light sources and any other additional rays. Compared to other commonly used methods, such as rasterization, it produces a much more lifelike image. Even though at one point it was used for movies and TV shows, with Nvidia’s introduction of their RTX series graphics card we now have a form of real-time ray tracing available in our computers.

How does Ray Tracing work?

Ray Tracing is basically an algorithm. Just like the human eye would process light, reflections and shadows, the algorithm considers where the light would hit, and calculates what happens next. If one were to have enough computational power at their disposal, they would be able to render CG images that are extremely difficult to distinguish from real life.

How is Ray Tracing implemented?

First, the algorithm needs an image made of pixels. A primary ray is shot into the scene for each pixel, the direction for which is calculated by tracing a line from the viewing point to the pixel’s center. Once the primary ray’s direction is set, the algorithm checks to see if the ray intersects with any of the objects in the scene. If that happens, a shadow ray is shot from the intersection point to the light, which results in a shadow on the object. By doing this for each pixel in the image, the final result is a very realistic 2D representation of a 3D scene.

Advantages of Ray Tracing (Ray Tracing vs Rasterization)

The main advantage of ray tracing is how elegant and smooth it is. The algorithm only needs a single, primitive object to do its job. If you were to do this with a regular rasterization algorithm, which is the case with computer games nowadays, you would need a lot of hard work to get the same results. To the consumer, the advantage of ray tracing is in the level of realism you would get from the shadows and reflections.

Disadvantages of Ray Tracing

The disadvantages of Ray Tracing are its speed and the performance hit in games if it’s used in real time. A game with Ray Tracing on requires a lot more power to render scenes, as a result, you may suffer a significant drop in FPS (Frames Per Second) compared to when Ray Tracing is turned off.

« Back to Definition Index
About Us

Our goal is to help people expand their knowledge of the various forms of technology including PCs, laptops, and much more so that they may have the best possible experience when computing.

Disclosure: We may earn a small commission at no additional cost to you via the product links on this site

Recent Posts

Follow Us