Presentation is loading. Please wait.

Presentation is loading. Please wait.

OPTICS III, IV: Global Illumination

Similar presentations


Presentation on theme: "OPTICS III, IV: Global Illumination"— Presentation transcript:

1 OPTICS III, IV: Global Illumination

2

3

4 How can we get the image below?
Until now we have only considered the incoming light from light sources. Have to account for incoming light from other surfaces to get the image shown above.

5 Continuous Lighting Equation
Explicitly write the angular dependence for L Make L and BRDF continuous functions of space Write BRDF as f

6 Continuous Lighting Equation
Now that L is a function defined over all space we need to clarify what its value means everywhere. On surfaces Lo defines the outgoing light and it will depend on the incoming light in a hemisphere on the surface centered at that point. For points not on surfaces i.e. points in “air” Lo accounts for participating media, e.g. dust particles, and it will depend on incoming light in a sphere centered at that point. If there is no participating media, i.e. a vacuum, then the solution for Lo in the volume is trivial and we need compute it only on surfaces.

7 Summary: Global Illumination
Previously we only considered lighting the points that are visible to the camera. In contrast, the continuous lighting equation is evaluated over all points in the scene, irrespective of whether they are visible to the camera or not. This is done to account for indirect lighting. It requires a lot more work to compute lighting everywhere as opposed to calculating it only at points visible to camera. Once this computation is performed one can place the camera anywhere in the scene and use the pre-computed value of L. i d w r w x

8 Same Treatment of Lights and Surfaces
Surfaces (interreflection) i d w r w x Reflected Light Add Emission Reflected Light (from surface) BRDF Cosine of Incident angle

9 The Challenge Reflected Light Emission Reflected Light BRDF Cosine of Incident angle UNKNOWN KNOWN UNKNOWN KNOWN KNOWN Computing reflected radiance requires knowing the incoming radiance from surfaces But determining incoming radiance requires knowing the reflected radiance from surfaces

10 Rendering Equation as an Integral Equation
Reflected Light Emission Reflected Light BRDF Cosine of Incident angle UNKNOWN KNOWN UNKNOWN KNOWN KNOWN Fredholm Integral Equation of the second kind (extensively studied numerically) with canonical form kernel of equation

11 Linear Operator Theory
Linear operators act on functions like matrices act on vectors or discrete representations M is a linear operator. f and h are functions of u Basic linearity relations hold a and b are scalars f and g are functions Examples include integration and differentiation

12 Linear Operator Equation
Light Transport Operator Can also be discretized to simple matrix equation or system of simultaneous linear equations (L, E are vectors, K is the light transport matrix)

13 Solving the Rendering Equation
Using Binomial Theorem Term n corresponds to n-1 bounces of light

14 Power series expansion
Above expansion is also called a power series expansion. This type of expansion is useful only when the higher order terms vanish. Since term n corresponds to n-1 bounces of light, and at each bounce there is some absorption/attenuation, the higher order terms start vanishing.

15 Solving the Rendering Equation
It is too difficult to find an analytic solution to the rendering equation, hence we have to use numerical methods. Approximations that compute different terms determine the accuracies of the rendering equation Two basic approaches are ray tracing and radiosity, or more formally, Monte Carlo and Finite Element Monte Carlo techniques sample light paths form statistical estimate, example, path tracing (more on this later the course) Finite Element methods discretize to matrix equation (we’ll pursue this here…)

16 Ray Tracing OpenGL Shading Emission directly from light sources
Direct Illumination on surfaces Global Illumination (one bounce indirect) [Mirrors, Refraction] OpenGL Shading (two bounce indirect) [caustics, etc]

17 Successive Approximation

18 Change of Variables Integral over angles sometimes inefficient. Write integral in terms of surface radiance only (change of variables)

19 Change of Variables Domain integral awkward. Introduce binary visibility function V

20 Radiosity and albedo Radiosity (B) is the power per unit surface area leaving the surface. Same units as irradiance but is the outgoing power instead of the incident power. The last equality holds if L is independent of angle. In a similar way we can define a “reflection coefficient” called the albedo (ρ) defined in terms of f as Again, the last equality holds if f is independent of angle, which is true for a purely diffuse surface.

21 Radiosity Equation Assume a purely diffuse surface, with f(x) = kd(x)
Assume all surfaces look the same from all directions (again, this only works for purely diffuse surfaces). Then we can drop dependence on incoming/outgoing angles, and integrate over all incoming/outgoing angles to get an equation in terms of B andρ

22 Discretization and Form Factors
Take the world and divide it into discrete patches. Write an equation per patch by looking at the incoming radiosity from all other patches. F is the form factor. It is dimensionless and is the fraction of energy leaving the entirety of patch j (multiply by area of j to get total energy) that arrives anywhere in the entirety of patch i (divide by area of i to get energy per unit area or radiosity).

23 The Form Factor The form factor is defined as the fraction of energy leaving one surface that reaches another surface. It is purely geometric relationship, independent of viewpoint or surface attributes. Between geometric areas, the form factor equals: (point to point form factor) = differential area of surface i, j = vector between the two areas = Angle between normal to i and r = Angle between normal to j and r The overall form factor between i and j is found by integrating:

24 Nusselt’s Anolog Nusselt developed a geometric analog of the differential form factor, to aid in form factor calculations. The “Nusselt analog” is shown here in two and three dimensions. In both diagrams, the form factor equals the projected area divided by the area of the base, or (A/B) The "Nusselt analog" involves placing a hemispherical projection body, with unit radius, at a point on a surface. The second surface is spherically projected onto the projection body, then cylindrically projected onto the base of the hemisphere. The form factor is, then, the area projected on the base of the hemisphere divided by the area of the base.

25 The Hemicube Approximation
The contribution of each cell on the surface of the hemicube to the form factor value is precomputed. This is the form factor for each cell. The polygon is projected onto the hemicube. The form factors for the covered cells are summed to get the approximation to the true form factor.

26

27 System of simultaneous equations
Expanding the summation we get the following system of equations

28 Full Matrix Radiosity The “full matrix” radiosity solution for purely diffuse lighting requires form factors between each surface to be calculated, and the following equation to be solved: is the reflectivity of surface i, is the form factor from surface i to surface j, is the radiosity of surface i, and is the emission of surface i.

29 Solving a system iteratively
Consider the system having solution i.e. We can obviously invert the matrix and solve for x and y. But this becomes more and more expensive as the system grows in size. Need some method that iteratively goes closer and closer to the correct answer so that we can stop early if necessary.

30 Solving a system iteratively
The idea here is to start with a guess for the solution and try to improve it iteratively. Gauss Jacobi Gauss Seidel Start with an initial guess of We show the results for 20 iterations with both methods.

31 Solving a system iteratively
Iteration Gauss Jacobi Gauss Seidel x y 1 2 4 5 3 1.5 2.5 3.75 4.25 2.125 3.9375 1.875 6 4.0625 7 8 9 10 11 12 13 14 15 16 17 18 19 20

32 Solving a system iteratively - warm start
Iteration Gauss Jacobi Gauss Seidal x y 1 2 3 2.5 4 3.75 2.125 3.9375 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

33 PROGRESSIVE SOLUTION The above image show increasing levels of global diffuse illumination. From left to right: 1 bounce, 2 bounces, 4 bounces.

34 Progressive Radiosity Variations
“Gathering” updates one surface by collecting light energy from all surfaces. “Shooting” updates all surfaces by distributing light energy from one surface. “Sorting and shooting” chooses the surface with the greatest unshot light energy and distributes its light energy to surfaces in the environment. “Sorting and shooting with ambient” starts with some guess for initial lighting (ambient) and does sorting and shooting from there on.

35

36 Progressive Radiosity Variations

37 Specular Highlights View independent, global ambient and diffuse illumination computed with radiosity pre-process View dependent, global specular illumination computed using that component of the Phong model Combining the strengths of radiosity (global illumination) and Phong model (direct illumination) achieves more accurate and efficient solution to the problem of light transport.


Download ppt "OPTICS III, IV: Global Illumination"

Similar presentations


Ads by Google