Tutorials

▷ What is rasterization and what is its difference with ray tracing

Table of contents:

Anonim

After the imminent release of the new Nvidia RTX graphics cards. We wanted to write an article about what rasterization is and what is its difference with Ray Tracing. Ready to know everything you need to know about this technology? Let's start!

What is rasterization and Ray Tracing differences

Real-time PC graphics has long used a technique called "rasterization" to display three-dimensional objects on a two-dimensional screen. It is a quick technique and the results have become very good over the past few years, although it is not as good as ray tracing can do.

With the raster technique, the objects you see on the screen are created from a mesh of virtual triangles, or polygons, which create three-dimensional models of objects. In this virtual mesh, the corners of each triangle, known as vertices, intersect the vertices of other triangles of different sizes and shapes. Because of this, a lot of information is associated with each vertex, including its position in space, as well as information about color, texture, and its "normal", which is used to determine how an object's surface faces..

Computers then convert the triangles of the 3D models to pixels, or points on a 2D screen. Each pixel can be assigned an initial color value from the data stored at the vertices of the triangle. Additional pixel processing or "shading", which includes changing the pixel color based on how lights in the scene hit the pixel, and applying one or more textures to the pixel, combine to generate the final color applied to one pixel.

We summarize the best hardware guides that should interest you:

  • Best processors on the market Best motherboards on the market Best RAM memory on the market Best graphics cards on the market Best SSDs on the market

This is computationally intensive, as there may be millions of polygons used for all object models in a scene, and approximately 8 million pixels on a 4K screen. To all this we must add that each image that is displayed on a screen usually updates 30 to 90 times per second. Also, memory buffers, the temporary space set aside to speed things up, are used to render frames in advance before they are displayed on the screen.

A depth or "z-buffer" is also used to store pixel depth information to ensure that front objects at the xy location of a pixel's screen are displayed, and objects behind the most front object remain hidden. This is the reason why modern and graphically rich computer games rely on powerful GPUs, which are capable of many millions of calculations every second.

Ray Tracing works in a totally different way. In the real world, the 3D objects we see are illuminated by light sources, and the photons that make up the light can bounce from one object to another before reaching the viewer's eyes. Also, light can be blocked by some objects, creating shadows, or light can be reflected from one object to another, as when we see the images of one object reflected on the surface of another. We also have refractions, which cause a change in the speed and direction of light as it passes through transparent or semi-transparent objects, such as glass or water.

Ray Tracing reproduces these effects, it is a technique that was first described by Arthur Appel of IBM, in 1969. This technique traces the path of light that passes through each pixel on a 2D viewing surface and turns it into a 3D model of the scene. The next major breakthrough came a decade later in a 1979 paper titled "An Improved Lighting Model for Shaded Screens, " Turner Whitted, now a member of Nvidia Research, showed how to capture reflection, shadow, and refraction with the Ray Tracing.

With the Whitted technique, when lightning strikes an object in the scene, color and illumination information at the point of impact on the object's surface contribute to the pixel color and illumination level. If the beam bounces or travels across the surfaces of different objects before reaching the light source, the color and lighting information from all of those objects can contribute to the pixel's final color.

WE RECOMMEND YOUHow to install Ubuntu Tweak in Ubuntu 16.04

Another pair of documents in the 1980s laid the rest of the intellectual foundation for the computer graphics revolution, which overturned the way movies are made. In 1984 Robert Cook, Thomas Porter and Loren Carpenter of Lucasfilm detailed how Ray Tracing could incorporate various common cinematographic techniques such as motion blur, depth of field, half-light, translucency and blurred reflections that, until then, only they could be created with cameras. Two years later, the work of CalTech professor Jim Kajiya, "The Rendering Equation, " completed the work of mapping the way computer graphics were generated to physics to better represent the way light scatters. in a scene.

Combining all this research with modern GPUs, the results are computer-generated images that capture shadows, reflections, and refractions in ways that can be indistinguishable from real-world photos or videos. That realism is why Ray Tracing has come to conquer modern cinema. The following image generated by Enrico Cerica using OctaneRender, shows a distortion of glass strokes in the lamp, diffuse lighting in the window and frosted glass in the lantern on the floor reflected in the frame image.

Ray Tracing is an extremely power-demanding technique, which is why filmmakers rely on large numbers of servers or farms to create their scenes in a process that can take days, even weeks, to generate complex special effects. Undoubtedly, many factors contribute to the overall quality of graphics and ray tracing performance. In fact, because ray tracing is so computationally intense, it is often used to represent those areas or objects in a scene that benefit the most from the visual quality and realism of the technique, while the rest of the scene it is processed using rasterization.

What did you think of our article on what rasterization is? Did you find it interesting? We look forward to your comments!

Tutorials

Editor's choice

Back to top button