what is raytracing? I see this term a lot relating to video games and 3D animations

579 views

Thanks for the replies everyone, I think I get it now

In: 24

24 Answers

Anonymous 0 Comments

Ray-tracing is the simulation of light by actually shooting “light rays” around the scene and seeing what they hit, both from the camera and from actual light sources. Normally this is a pixel-by-pixel or photon-by-photon (a “particle of light”) process making it incredibly slow.

Newer video cards (nVidia’s “RTX” series, and some new stuff from AMD) support offloading of some lighting processing via a raytracing style of processing onto the graphics card. This produces incredibly lifelike lighting, very accurate mirror reflections, etc by having the graphics card do the work. A character’s shadow should not look like faked blobs of black any more.

The downside? It’s still kinda new, and not a lot of games are really making good use of it. And since not everyone has raytracing, games still need to run on hardware without as well.

Anonymous 0 Comments

It’s a technique used to generate the way light works in an image.

Imagine a computer drawing a bubble with a horse behind it. In the dumbest sense possible you’d see a horse with a white bubble in front of it, but that’s not how physics actually works. In real physics light from the sun will hit the horse, reflect, then travel through the bubble and get distorted like a lens and then come to you, the viewer.

Having a computer just make a white bubble in front of a horse is easy, but having a computer calculate the path of light from the sun, to the horse, distorted through the bubble, then to your eye is complicated and takes time and computer power.

So going back maybe 15 years ago, a video game which is being constantly “Drawn” by the system would be lazy and just make a white bubble in front of the horse. A Blockbuster Hollywood movie might get a supercomputer to do the fancy light-path version, but that would take hours and $$$$ to render.

In modern computers, they have gotten so powerful that they can do this real-life looking light-path tracing in real time, making video game graphics potentially look photo-realistic. This process is “ray tracing” (following light rays)

Anonymous 0 Comments

Ray-tracing is the simulation of light by actually shooting “light rays” around the scene and seeing what they hit, both from the camera and from actual light sources. Normally this is a pixel-by-pixel or photon-by-photon (a “particle of light”) process making it incredibly slow.

Newer video cards (nVidia’s “RTX” series, and some new stuff from AMD) support offloading of some lighting processing via a raytracing style of processing onto the graphics card. This produces incredibly lifelike lighting, very accurate mirror reflections, etc by having the graphics card do the work. A character’s shadow should not look like faked blobs of black any more.

The downside? It’s still kinda new, and not a lot of games are really making good use of it. And since not everyone has raytracing, games still need to run on hardware without as well.

Anonymous 0 Comments

Ray-tracing is the simulation of light by actually shooting “light rays” around the scene and seeing what they hit, both from the camera and from actual light sources. Normally this is a pixel-by-pixel or photon-by-photon (a “particle of light”) process making it incredibly slow.

Newer video cards (nVidia’s “RTX” series, and some new stuff from AMD) support offloading of some lighting processing via a raytracing style of processing onto the graphics card. This produces incredibly lifelike lighting, very accurate mirror reflections, etc by having the graphics card do the work. A character’s shadow should not look like faked blobs of black any more.

The downside? It’s still kinda new, and not a lot of games are really making good use of it. And since not everyone has raytracing, games still need to run on hardware without as well.

Anonymous 0 Comments

It’s a technique used to generate the way light works in an image.

Imagine a computer drawing a bubble with a horse behind it. In the dumbest sense possible you’d see a horse with a white bubble in front of it, but that’s not how physics actually works. In real physics light from the sun will hit the horse, reflect, then travel through the bubble and get distorted like a lens and then come to you, the viewer.

Having a computer just make a white bubble in front of a horse is easy, but having a computer calculate the path of light from the sun, to the horse, distorted through the bubble, then to your eye is complicated and takes time and computer power.

So going back maybe 15 years ago, a video game which is being constantly “Drawn” by the system would be lazy and just make a white bubble in front of the horse. A Blockbuster Hollywood movie might get a supercomputer to do the fancy light-path version, but that would take hours and $$$$ to render.

In modern computers, they have gotten so powerful that they can do this real-life looking light-path tracing in real time, making video game graphics potentially look photo-realistic. This process is “ray tracing” (following light rays)

Anonymous 0 Comments

It’s a technique used to generate the way light works in an image.

Imagine a computer drawing a bubble with a horse behind it. In the dumbest sense possible you’d see a horse with a white bubble in front of it, but that’s not how physics actually works. In real physics light from the sun will hit the horse, reflect, then travel through the bubble and get distorted like a lens and then come to you, the viewer.

Having a computer just make a white bubble in front of a horse is easy, but having a computer calculate the path of light from the sun, to the horse, distorted through the bubble, then to your eye is complicated and takes time and computer power.

So going back maybe 15 years ago, a video game which is being constantly “Drawn” by the system would be lazy and just make a white bubble in front of the horse. A Blockbuster Hollywood movie might get a supercomputer to do the fancy light-path version, but that would take hours and $$$$ to render.

In modern computers, they have gotten so powerful that they can do this real-life looking light-path tracing in real time, making video game graphics potentially look photo-realistic. This process is “ray tracing” (following light rays)

Anonymous 0 Comments

Ray tracing is a way of producing the lighting for a virtual scene in for example a video game. Usually cameras capture all the light that got sent out by the sun and bounced off of all the objects in a scene. Because virtually lighting a sceene this way would be way too inefficient ray tracing is basically doing the reverse – send out “light beams” from the camera and illuminate everything they hit withing a few bounces.
Theres [this really cool exploratory programming video](https://www.youtube.com/watch?v=Qz0KTGYJtUk) thats quite easy to understand and follow imho if you want to dive a little deeper

Anonymous 0 Comments

Ray tracing is a way of producing the lighting for a virtual scene in for example a video game. Usually cameras capture all the light that got sent out by the sun and bounced off of all the objects in a scene. Because virtually lighting a sceene this way would be way too inefficient ray tracing is basically doing the reverse – send out “light beams” from the camera and illuminate everything they hit withing a few bounces.
Theres [this really cool exploratory programming video](https://www.youtube.com/watch?v=Qz0KTGYJtUk) thats quite easy to understand and follow imho if you want to dive a little deeper

Anonymous 0 Comments

Ray tracing is a way of producing the lighting for a virtual scene in for example a video game. Usually cameras capture all the light that got sent out by the sun and bounced off of all the objects in a scene. Because virtually lighting a sceene this way would be way too inefficient ray tracing is basically doing the reverse – send out “light beams” from the camera and illuminate everything they hit withing a few bounces.
Theres [this really cool exploratory programming video](https://www.youtube.com/watch?v=Qz0KTGYJtUk) thats quite easy to understand and follow imho if you want to dive a little deeper

Anonymous 0 Comments

Historically, games and other 3D animations used a technique called rasterisation to draw objects. Rasterisation takes the polygons that make up a 3D object and works out how they look from the camera’s perspective, and how they fit into the pixel grid your screen uses to display images. It can then colour each pixel in based on whatever texture is applied to that part of the polygon.

What it struggles with, however, is lighting. Lighting in game engines has historically been essentially a series of elaborate “cheats”. Some of them are fairly straightforward – you can work out how well-lit a surface should be by knowing its colour, and its angle relative to the screen, and the distance to the various light sources around, and how bright and what colour those lights are, and so on, and you put all of that into an algorithm and it spits out a colour for that pixel in a fairly straightforward way.

Other effects are trickier, though. Shadows, for example, are pretty hard, which is why old games didn’t have real shadows, just a dark blob underneath the character. For shadows, the usual method is to take each light source in the area and project lines from that light source to each point on the object, to create a 3D volume. Anything inside that volume the computer then knows to render in shadow. One of the first games to use this technique was Doom 3, and they were severely limited by the number of light sources they could use in each area. Modern computers are powerful enough that shadows are no longer a major performance bottleneck, but 3D artists have put all that extra power to good use. Doom 3’s shadows were pretty much solid black with sharp edges, but modern shadows have had a lot of work put into them to make them have softer edges, or contact hardening, where the shadow gets softer as you move further from the object, or for them to react more realistically with other light sources in the scene.

Reflections are also a major issue. The typical way to render reflections is just to duplicate the entire room you’re in on the other side on the mirror. This is very expensive, and unlike shadows, hasn’t become much easier over time, which is why, unlike shadows, you’re more likely to see proper mirrors in old games, where the rooms are simple boxes and rendering a duplicate is very cheap, than in modern games, where rooms are complicated and detailed and rendering an entire duplicate one just to fill in a mirror would be impractical. That’s why you sometimes find “mirrors” in modern games that don’t have proper reflections at all, just a blurry, indistinct image that *implies* reflection more than actually depicting it.

There’s also ambient occlusion, which is where nooks and crannies on an object or in an environment get darker, because direct light is less able to reach them, and they’re more illuminated by diffuse reflections off nearby objects. That’s also essentially a cheat, where the surface is made darker based on how close other surfaces are to it.

Ray-tracing is an approach that circumvents all of these issues, by simply directly simulating the path of light itself for all the pixels on the screen. The rays can pick up the colour information of surfaces they bounce off or light sources they encounter, get dimmer with each bounce off darker surfaces, and perfectly reflect off shiny surfaces. It’s extremely expensive to set up, but the benefit is that once you do, you essentially get proper realistic lighting with minimal extra effort, no cheats required. Shadows? Well, if a ray bounces off a surface and then hits an object instead of the light behind it, that surface will just naturally look darker. Reflections? A ray bouncing off a mirror will hit an object in the room, so it’ll look like the object is behind the mirror, just like a real reflection would, and there’s no need to make a duplicate room just for a single mirror. Ambient occlusion? Any ray that enters a nook on an object will have to bounce around a few times to get out, and so that part of the object will look darker. Ray-tracing produces more natural feeling lighting than all the fancy tricks of the rasterisation era combined.

Historically, this technique has been far too expensive to use for video games (though it’s seen use in pre-rendered animation like movies for a long time), but over the last five years, new graphics cards have been released that are designed to handle ray-tracing in a real-time rendering setting like a videogame. High end games are frequently releasing now with support for ray-tracing, for those with the money to afford the new hardware. The old-fashioned tricks persist, though, for those of us who can’t afford it, or for games that don’t benefit artistically from realistic lighting, or games on platforms that don’t support ray-tracing.