DOC PREVIEW
UCSD CSE 167 - Global Illumination

This preview shows page 1-2-23-24 out of 24 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 24 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 24 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 24 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 24 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 24 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Global IlluminationCSE167: Computer GraphicsInstructor: Steve RotenbergUCSD, Fall 2005Classic Ray TracingThe ‘classic’ ray tracing algorithm shoots one primary ray per pixelIf the ray hits a colored surface, then a shadow ray is shot towards each light source to test for shadows, and determine if the light can contribute to the illumination of the surfaceIf the ray hits a shiny reflective surface, a secondary ray is spawned in the reflection direction and recursively traced through the sceneIf a ray hits a transparent surface, then a reflection and a transmission (refraction) ray are spawned and recursively traced through the sceneTo prevent infinite loops, the recursion depth is usually capped to some reasonable number of bounces (less than 10 usually works)In this way, we may end up with an average of fewer than 20 or so rays per pixel in scenes with only a few lights and a few reflective or refractive surfacesScenes with many lights and many inter-reflecting surfaces will require more raysImages rendered with the classic ray tracing algorithm can contain shadows, exact inter-reflections and refractions, and multiple lights, but may tend to have a rather ‘sharp’ appearance, due to the limitation to perfectly polished surfaces and point light sourcesClassic Ray Tracingetc.Distribution Ray TracingDistribution ray tracing extends the classic ray tracing algorithm by shooting several rays in situations where the classic algorithm shoots only one (or two)For example, if we shoot several primary rays for a single pixel, we can achieve image antialiasingWe can model area light sources, and achieve soft edge shadows by shooting several shadow rays distributed across the light surfaceWe can model blurry reflections and refractions by spawning several rays distributed around the reflection/refraction directionWe can also model camera focus blur by distributing our rays across a virtual camera apertureAs if that weren’t enough, we can also render motion blur by distributing our primary rays in timeDistribution ray tracing is a powerful extension to classic ray tracing that clearly showed that the central concept of ray tracing was a useful paradigm for high quality renderingHowever, it is, of course, much more expensive, as the average number of rays per pixel can jump to hundreds, or even thousands…Distribution Ray Tracingetc.etc.Ray TracingThe classic and distribution ray tracing algorithms are clearly important steps in the direction of photoreal renderingHowever, they are not truly physically correct as they still are leaving out some components of the illuminationIn particular, they don’t fully sample the hemisphere of possible directions for incoming light reflected off of other surfacesThis leaves out important lighting features such as color bleeding also known as diffuse inter-reflection (for example, if we have a white light source and a diffuse green wall next to a diffuse white wall, the white wall will appear greenish near the green wall, due to green light diffusely reflected off of the green wall)It also leaves out complex specular effects like focused beams of light known as caustics (like the wavy lines of light seen at the bottom of a swimming pool)Hemispherical SamplingWe can modify the distribution ray tracing algorithm to shoot a bunch of rays scattered about the hemisphere to capture additional incoming lightWith some careful tuning, we can make this operate in a physically plausible wayHowever, we would need to shoot a lot of rays to adequately sample the entire hemisphere, and each of those rays would have to spawn lots of other rays when they hit surfaces10 rays is definitely not enough to sample a hemisphere, but let’s just assume for now that we will use 10 samples for each hemisphereIf we have 2 lights and we supersample the pixel with 16 samples and allow 5 bounces where each bounce shoots 10 rays, we end up with potentially 16*(2+1)*105 = 4,800,000 rays traced to color a single pixelThis makes this approach pretty impracticalThe good news is that there are better options…Path TracingIn 1985, James Kajiya proposed the Monte Carlo path tracing algorithm, also known as MCPT or simply path tracingThe path tracing algorithm fixes many of the exponential ray problems we get with distribution ray tracingIt assumes that as long as we are taking enough samples of the pixel in total, we shouldn’t have to spawn many rays at each bounceInstead, we can even get away with spawning a single ray for each bounce, where the ray is randomly scattered somewhere across the hemisphereFor example, to render a single pixel, we may start by shooting 16 primary rays to achieve our pixel antialiasingFor each of those samples, we might only spawn off, say 10 new rays, scattered in random directionsFrom then on, any additional bounces will spawn off only 1 new ray, thus creating a path. In this example, we would be tracing a total of 16*10 paths per pixelWe will still end up shooting more than 160 rays, however, as each path may have several bounces and will also spawn off shadow rays at each bounceTherefore, if we allow 5 bounces and 2 lights, as in the last example, we will have a total of (2+1)*(5+1) = 18 rays per path, for a total of 8*160=1280 rays per pixel, which is a lot, but far more reasonable than the previous examplePath TracingBRDFsIn a previous lecture, we briefly introduced the concept of a BRDF, or bidirectional reflectance distribution functionThe BRDF is a function that describes how light is scattered (reflected) off of a surfaceThe BRDF can model the macroscopic behavior of microscopic surface features such as roughness, different pigments, fine scale structure, and moreThe BRDF can provide everything necessary to determine how much light from an incident beam coming from any direction will scatter off in any other directionDifferent BRDFs have been designed to model the complex light scattering patterns from a wide range of materials including brushed metals, human skin, car paint, glass, CDs, and moreBRDFs can also be measured from real world materials using specialized equipmentBRDF FormulationThe wavelength dependent BRDF at a point is a 5D functionBRDF = fr(θi,φi,θr,φr,λ)Often, instead of thinking of it as a 5D scalar function of λ, we can think of it as a 4D function that returns a colorBRDF =


View Full Document

UCSD CSE 167 - Global Illumination

Documents in this Course
Lighting

Lighting

38 pages

Review

Review

59 pages

Surfaces

Surfaces

22 pages

Review

Review

110 pages

Midterm

Midterm

4 pages

Lighting

Lighting

38 pages

Lighting

Lighting

71 pages

Review

Review

110 pages

Lighting

Lighting

71 pages

Load more
Download Global Illumination
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Global Illumination and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Global Illumination 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?