Unveiling the Concepts Behind Ray Tracing

Unveiling the Concepts Behind Ray Tracing

Andrew Lv13

Unveiling the Concepts Behind Ray Tracing

Close

Games are more vivid than ever. This article explains how ray tracing makes the difference.

Disclaimer: This post includes affiliate links

If you click on a link and make a purchase, I may receive a commission at no extra cost to you.

What is Ray Tracing?

Ray tracing is a technique for rendering computer graphics that creates an image by tracing rays’ path through a scene. The rays can interact with objects in the scene, bouncing off them and gaining properties, such as color.

How Ray Tracing Works

Ray tracing emulates real-world lighting. The light we see is the result of photons emitted from energy sources, like the sun. Photons can bounce and scatter as they collide with objects. A mirror is all you need to see this in action. Light hitting a mirror creates a reflection.

Ray tracing simulates this. The number of rays traced is paltry compared to the real world, where millions of photons bounce across our field of view. Modern games trace somewhere between one and four rays per pixel. Still, that’s enough to simulate the real world.

Vending machines in the game Cyberpunk 2077

https://techidaily.com

CD Projekt Red

Tracing the path of a ray also lets it interact with the game world. A ray that bounces off a red object can be influenced by that color, casting a red glow nearby. Rays can scatter in different ways based on the properties a game’s artists give to objects, allowing realistic semi-reflective or rough surfaces.

Ray tracing is a significant step forward for 3D graphics. It creates a realistic image by simulating the path of rays as they move through a game.

This leads to lighting that can interact with the environment even when the environment isn’t visible to the player. Ray tracing doesn’t require purpose-built hardware to function, but it’s only practical on a video card or game console that can accelerate ray tracing because it’s very demanding.

https://techidaily.com

Ray Tracing vs. Rasterization

You may still be confused even if you understand this explanation. Reflections were present in past games, even those now several decades old. How is ray tracing different?

Past 3D games, and most modern games, use rasterization. Rasterization combines the elements of a 3D game world visible to the player into a 2D image. It only renders what should be visible to the player, as any performance used to generate what the player can’t see is wasted. However, this creates a problem.

Ray tracing in Battlefield 5

https://techidaily.com

Nvidia

Let’s return to the example of a mirror. The player’s environment and the player character aren’t visible to the player (in a first-person game, at least). With rasterization, there’s nothing for the mirror to reflect.

Of course, mirrors exist in modern games. They render the scene twice. One pass is from the player’s point of view, while another is from a different perspective. That doubles the performance needed to render a scene, however.

Screen space reflections, a technique in popular 3D game engines, use on-screen data to create a reflection. This technique is ideal for reflective surfaces at an angle to the player’s perspective, such as water. However, reflected objects disappear if the item reflected moves off-screen.

Ray tracing doesn’t share these problems because, unlike rasterization, it can trace outside the player’s perspective.

Also, in games that allow rays to interact with surfaces, ray tracing can display realistic color bleed and semi-reflective surfaces difficult for rasterization to handle.

What to Look For in a Gaming PC

What Hardware Does Ray Tracing Require?

Ray tracing isn’t a new idea. Computer scientists experimented with ray tracing in the early 1980s , creating static images with realistic lighting, reflections, and shadows. Unfortunately, they took hours to render.

A video game needs real-time ray tracing at 30 frames per second or higher. That’s only possible with a video card designed to accelerate ray tracing.

Nvidia RTX 3080 graphics card on a black background

https://techidaily.com

Nvidia

Nvidia’s RTX ray tracing relies on silicon called a Tensor Core. Tensor Cores are only found in RTX video cards. Nvidia’s GTX cards can render a game using ray tracing because, as said, ray tracing doesn’t require purpose-built silicon. However, performance is abysmal compared to RTX cards. And some games, like Minecraft with RTX ray tracing , require an RTX video card because of the specific way they enable ray tracing.

AMD cards that accelerate ray tracing don’t have specific branding and don’t have dedicated silicon. Instead, they use hardware tweaks and software updates for better results. It’s more difficult to identify AMD cards that accelerate ray tracing, so pay attention to the details.

Xbox Series X vs Xbox Series S: How to Pick the Console Right for You

Sony’s PlayStation 5 and Xbox Series X and S have graphics hardware from AMD that can accelerate ray tracing. It’s up to developers to enable, however, and many games don’t. A notable example is Cyberpunk 2077 , which supported RTX ray tracing on PC at launch but didn’t support ray tracing on next-gen consoles.

What Is an RTX Graphics Card?

Was this page helpful?

Thanks for letting us know!

Get the Latest Tech News Delivered Every Day

Subscribe

Tell us why!

Other Not enough details Hard to understand

Submit

Also read:

  • Title: Unveiling the Concepts Behind Ray Tracing
  • Author: Andrew
  • Created at : 2024-10-13 23:08:40
  • Updated at : 2024-10-19 02:56:36
  • Link: https://tech-renaissance.techidaily.com/unveiling-the-concepts-behind-ray-tracing/
  • License: This work is licensed under CC BY-NC-SA 4.0.