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

623 views

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

In: 24

24 Answers

Anonymous 0 Comments

When you sit in a dark room and light a match photons immediately fill the room bouncing of objects in that room in ways that allow your brain to make excellent guesses about their size shape and position. Your brain is really really good at this which is why [this illusion](https://upload.wikimedia.org/wikipedia/commons/thumb/b/be/Checker_shadow_illusion.svg/1920px-Checker_shadow_illusion.svg.png) works so well (the two squares A and B are the same color).

A computer needs to do something similar if your video game avatar lights a match in a dark room so I can put shadows and illuminate different parts of the room in ways your eyes will consider normal.

A distant wall should be dimmer than a close wall, shadows should be on the opposite side of the light source. And things like that.

To do this a computer needs to know how the position and shapes of the objects in the room interact. One way to do that is to draw many straight lines from a light source around the room. That’s called ray (straight line) tracing.

You are viewing 1 out of 24 answers, click here to view all answers.