28.06.2014 Views

Realtime Ray Tracing and Interactive Global Illumination - Scientific ...

Realtime Ray Tracing and Interactive Global Illumination - Scientific ...

Realtime Ray Tracing and Interactive Global Illumination - Scientific ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

8 Chapter 2: An Introduction to <strong>Ray</strong> <strong>Tracing</strong><br />

Already at this level, the term “ray tracing” actually covers three different<br />

problems that have to be solved: Finding the closest intersection to the origin,<br />

finding any intersection along the ray, <strong>and</strong> finding all intersections along it.<br />

Finding only the closest intersection is the most fundamental operation in<br />

any ray tracer. It usually requires to find the closest intersecting primitive P<br />

<strong>and</strong> its distance t hit . Additionally, most ray tracers also determine additional<br />

parameters that are later-on used for shading the ray, such as local surface<br />

properties or the surface normal.<br />

A slightly simpler problem is to determine whether there is any primitive<br />

that intersects the ray. This is actually the same as checking for visibility<br />

between the two points O <strong>and</strong> O + t max D. As such, this operation is often<br />

termed “visibility test” or “occlusion test”. Obviously, checking for any intersection<br />

is a slightly simpler problem than finding the closest intersection.<br />

Thus, there are algorithms that are more efficient for this special case than<br />

for the general ray shooting case. As checking for occlusion is a very common<br />

operation in a ray tracer, most ray tracers have specially optimized routines<br />

for this task. Most obviously, “normal” rays might have to perform multiple<br />

intersection tests in order to determine which of these intersections in the<br />

closest one, whereas intersection testing for shadow rays can be terminated<br />

as soon as the first successful intersection test has been performed. Except<br />

for this obvious optimization, there are also several optimizations <strong>and</strong> heuristics<br />

for accelerating shadow rays, such as Shadow Caching, Shadow Maps,<br />

Adaptive Shadow Testing, Local <strong>Illumination</strong> Environments, <strong>and</strong> others (see<br />

Section 3.2).<br />

The third sub-problem in ray tracing is finding all intersections with a<br />

given ray. This is required by some advanced lighting algorithms (such as<br />

e.g. [Sbert97]). Except for these special algorithms, however, this special<br />

problem is not very common, <strong>and</strong> few ray tracers have special optimizations<br />

for this task (though they obviously exist, see e.g. [Havran01]).<br />

2.1.1 Scene Description<br />

The “scene” to be rendered consists of a list of “geometric primitives”, which<br />

are usually simple geometric shapes such as as polygons, spheres, cones, etc.<br />

However, ray tracing primitives may also be as complex objects as parametric<br />

patches (e.g. Bezier- or NURBS patches), subdivision surfaces, ISO-surfaces,<br />

as well as algebraic or implicit surfaces. <strong>Ray</strong> tracing can even accurately<br />

h<strong>and</strong>le such complex constructions as CSG 2 , fractals, <strong>and</strong> recursively <strong>and</strong><br />

procedurally defined objects. In fact, any kind of object can be used as a ray<br />

2 CSG = Constructive Solid Geometry

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!