Студопедия
Случайная страница | ТОМ-1 | ТОМ-2 | ТОМ-3
АрхитектураБиологияГеографияДругоеИностранные языки
ИнформатикаИсторияКультураЛитератураМатематика
МедицинаМеханикаОбразованиеОхрана трудаПедагогика
ПолитикаПравоПрограммированиеПсихологияРелигия
СоциологияСпортСтроительствоФизикаФилософия
ФинансыХимияЭкологияЭкономикаЭлектроника

Practical guide to path tracing



PRACTICAL GUIDE TO PATH TRACING

 

CHAPTER 1: THE PHYSICS OF LIGHT

 

There are roughly one hundred thousands single frames that make up an animated motion picture. Hundreds of artists will work their fingers to the bone to bring just one image to the screen. Right now we wanna show with you how one of those images is made. Sounds simple, right? Just one frame? Well, think again.

First, we’d like to clear all imagery from the screen, like a blank sheet of paper. The frame is empty. There’s nothing to work from until it is made. Let’s start with a frame where the image lays.

Just imagine this frame as a window in your home, but cleaner. Outside you see the hills on the horizon, you see the water in the river, the rocks, and the trees, and you see the sun above. We all know the sun has lightnings radiating from it. They travel down, down, down until they hit objects here on earth. Like this rock here, making it visible. The rock does not absorb all of that light ray. It actually interacts with it. And this type of interaction depends on what that rock is made of and what its surface texture looks like, that determines where that light goes next. The rock surface may be smooth and reflective like a brand new shiny car which will cause that sun ray to bounce off of it, casting light on the back side of this tree. But the light doesn’t stop there, folks. It may bounce off the bark surface and head into the leaves, causing them to light up a little bit too. Then bounce again and again. Like a billiard ball in a pool table, until that single ray of sunlight has finally lost all of its energy.

We begin to notice that the sun does not light all of our trees and rocks directly. But rather through indirect paths like this one. Most of our shaded paths are not black darkness, but mostly visible because light found its way in there.

That was just an example of what happens with a single ray of light. Just imagine this for every ray of the sun. There must be millions, billions, bizillions! There are infinite paths that light can take, illuminating everything we see. That is a lot of light bouncing around.

 

CHAPTER 2: COMPUTER AND OBJECT LIGHTNING

 

That’s how physics works in a real world. But what about animated movies? Let’s look at how the computer does it.

Imagine the window as your computer monitor looking out onto a virtual scene. All objects in the scene or world are 3D models. They are represented here as wire frame objects. This is how they appear to the computer. It is our job to paint them with texture. Let’s take a closer look at that rock underneath the tree.

When creating the scene we’re able to art direct this rock surface and therefore how the light will bounce off of it. Will this stone be smooth like a pebble which would cause the light hitting it to bounce back cleanly and uniformly, or should we make the stone surface jag and jumble, creating more unpredictable behavior on how the light might bounce? This is all known as surface appearance. Every object in the scene has its own art directed surface that dictates how it interacts with light.

 

CHAPTER 3: TEXTURING OUR OBJECTS

 

But that does not determine how the object itself will look. If this rock is smooth as it is smooth rock made out of marble or maybe granite. We can art direct this rock and pick which one we want. We can be creative. How we have a beautiful granite rock living under our tree with a smooth reflective surface.

 

CHAPTER 4: METHODS FOR CALCULATING LIGHT

 

The process for building this image inside this computer is called rendering. The computer has to make a calculation for every ray we see, adding up to millions and billions of calculations in a scene. These calculations take time and can often demand more of them what the computer is capable of. So how do we get around this issue and keep the ray come down to just what we need, or what is computable? In our scene every time a light ray bounces from object to object, the computer needs to calculate its new trajectory, its direction. Some rays may hit that rock first, others go into the river, some travel into the sky where we’ll never have a chance to see them. So what’s the point of calculating those rays when they’ll never be in frame? In order to produce a more efficient render we use a method called path tracing. This method reverses the process and considers only the light paths that are visible to the camera. Path tracing involves emitting rays from the camera, tracing them back to the objects in the scene and then back to the light source. That way every single relevant ray of light is accounting for without wasting time tracing paths of light we’ll never see. Wow!



 

CHAPTER 5: EFFICIENT RAY RENDERING

 

I know what you’re thinking: ‘How can we be even more efficient, Mr. Narrator?’ Well, in order to answer that we need to understand how the computer works. Every time we tell our computer to create a camera ray, it has to do a calculation, a task. For example, we ask it to travel outward from the camera and hit that rock. That’s one. The rock surface appearance then tells that ray how it’s supposed to act. The rock is reflective so our computer will now begin a new calculation, plotting our ray’s next direction. That’s two. It will encounter another object (three), then another (four), eventually tracing its way back to the light source.

The way our computer processes this task is using a, well, processor. It takes each ray or surface hit and calculates it for us. And it’s made do it millions, or even billions of times for every image we make. You can see the computer has a lot of work to do.

 

 


Дата добавления: 2015-11-04; просмотров: 23 | Нарушение авторских прав




<== предыдущая лекция | следующая лекция ==>
Соревнование KANT Trail | 

mybiblioteka.su - 2015-2024 год. (0.006 сек.)