Realism in 3D Graphics: Principles and Advantages of Ray Tracing

In this blog post, we will focus on “Realism in 3D Graphics: Principles and Advantages of Ray Tracing.”

 

Computer Graphics and Rendering

Following the advent of computers, continuous research into input and output devices led to the invention of the monitor, and people have developed various graphic techniques to project images and shapes onto the screen. Starting with the representation of simple two-dimensional objects composed of points and lines, it is now possible to project complex three-dimensional objects onto a two-dimensional plane (the monitor), and the technology is becoming increasingly sophisticated. This technology ultimately boils down to the question of how a three-dimensional virtual space is projected onto a two-dimensional plane. Simply put, it involves placing objects and light sources in a virtual space that implements the laws of physics, capturing the scene with a virtual camera, and mapping the camera’s view onto the computer screen; this series of processes is called rendering.
The primary purpose of computer graphics is image projection. Therefore, the series of processes described above can be summarized as the task of projecting a three-dimensional virtual space onto a two-dimensional monitor plane by implementing and applying the necessary laws of physics. The most important laws of physics in this process are the reflection and refraction of light. As light travels through space and encounters an object, its color, brightness, and path change depending on the object’s properties. Fundamentally, white light—including sunlight—contains wavelengths across the entire visible spectrum, and its brightness is determined by the sum of the energies of its constituent wavelengths. Reflection changes the direction of light at an angle equal to the angle of incidence, while refraction determines the degree to which light bends based on the difference in density between the two media on either side of the surface. In both cases, some wavelengths are absorbed at the surface, reducing brightness, and an object can possess multiple properties simultaneously.

 

Rendering Methods and Limitations

Generally, a scene in 3D graphics corresponds to the process of calculating, within a virtual space, how light in reality is reflected and refracted by countless objects before reaching our eyes. In other words, after determining the number and direction of light rays emitted from a virtual light source, each ray is traced in a straight line, and the laws of reflection and refraction are applied to reflect or transmit the light at the object’s surface. The image is then constructed by synthesizing the light information that reaches the virtual camera’s lens position. While this method is intuitive, it has several drawbacks. First, since the light emitted from the light source must be divided and calculated by direction, dividing it into too few segments results in large errors, while dividing it into too many segments causes the computational load to increase dramatically. Additionally, the calculated light must reach the camera lens to be meaningful, so there is the problem that many calculations that do not reach the lens are wasted.
To obtain high-quality images, these issues must be resolved, but this is no easy task. The first problem appears solvable by using high-performance computers to subdivide the light source more finely; however, high-performance computers are not readily accessible to general users, and the computational load increases exponentially as the number of subdivisions or light sources grows. If reflections or refractions occur continuously, even a single light source can result in the need to calculate hundreds of outcomes. The second problem is more fundamental. Ultimately, there is no reason to perform calculations that will not be included in the final result. The larger the space relative to the camera’s field of view, the greater the amount of wasted computation. Consequently, the more accuracy this method seeks, the more its inefficiency becomes apparent.

 

The Principles and Advantages of Ray Tracing

After continuous research, ray tracing was developed as a solution to these problems. Instead of tracing light emitted from a light source in a forward direction, ray tracing collects information by tracing back from the camera. A ray is emitted from the virtual camera’s viewpoint toward a point on the lens corresponding to a pixel on the screen, and the intersection points between this ray and each model (3D object) are examined. Among these, the point closest to the viewpoint is identified; if the object possesses reflective, refractive, or translucent properties, the relevant physical laws are applied to generate a new reflected or refracted ray, which is then emitted.
This process is repeated until the closest point becomes the light source. When a ray reaches the light source, the color and brightness information of the light source is combined with the originally emitted ray by applying the physical laws used so far in reverse. The resulting combination of color and brightness becomes the information for that pixel. Although the calculation method varies depending on the object’s shape, ray tracing has the advantage of significantly reducing the computational load compared to traditional forward-rendering methods while maintaining high quality. It can also generate shadows by determining whether an object is present between the ray’s starting point and the light source, and it is capable of rendering translucent and mirrored surfaces.
This method has made it possible to render high-quality, high-resolution images relatively efficiently. Due to the nature of computers as machines, there are times when multiple methods must be employed to implement the same physical laws, and as technology advances, more sophisticated implementations become possible. As mentioned in the document, there are examples of images that apply advanced techniques, such as applying textures to object surfaces and utilizing various light sources. This demonstrates that even problems that initially seem difficult to solve can be addressed by using workarounds or alternative approaches when direct methods are not feasible.

 

About the author