Download presentation
Presentation is loading. Please wait.
Published byWarren McDaniel Modified over 9 years ago
1
DPL11/27/2015 CS 551/651: Radiosity David Luebke cs551dl@cs.virginia.eduhttp://www.cs.virginia.edu/~cs551dl
2
DPL11/27/2015 Administrivia Hand in Assignment 1 (again) Hand in Assignment 1 (again) Questions about Assignment 2? Questions about Assignment 2? Read Chapter 11 Read Chapter 11
3
DPL11/27/2015 Radiosity Introduction First lighting model: Phong First lighting model: Phong –Still used in interactive graphics –Major shortcoming: local illumination! Two post-Phong approaches: Two post-Phong approaches: –Ray tracing –Radiosity
4
DPL11/27/2015 Radiosity Introduction Ray tracing: ad hoc approach to simulating optics Ray tracing: ad hoc approach to simulating optics –Deals well with specular reflection –Trouble with diffuse illumination Radiosity: theoretically rigorous simulation of light transfer Radiosity: theoretically rigorous simulation of light transfer –Very realistic images –But makes simplifying assumption: only diffuse interaction!
5
DPL11/27/2015 Radiosity Introduction Ray-tracing: Ray-tracing: –Computes a view-dependent solution –End result: a picture Radiosity: Radiosity: –Models only diffuse interaction, so can compute a view-independent solution –End result: a 3-D model
6
DPL11/27/2015 Radiosity Basic idea: represent surfaces in environment as many discrete patches Basic idea: represent surfaces in environment as many discrete patches A patch, or element, is a polygon over which light intensity is constant A patch, or element, is a polygon over which light intensity is constant
7
DPL11/27/2015 Radiosity Model light transfer between patches as a system of linear equations Model light transfer between patches as a system of linear equations Solving this system gives the intensity at each patch Solving this system gives the intensity at each patch Solve for R, G, B intensities and get color at each patch Solve for R, G, B intensities and get color at each patch Render patches as colored polygons in OpenGL. Voila! Render patches as colored polygons in OpenGL. Voila!
8
DPL11/27/2015 Fundamentals Theoretical foundation: heat transfer Theoretical foundation: heat transfer Need system of equations that describes surface interreflections Need system of equations that describes surface interreflections Simplifying assumptions: Simplifying assumptions: –Environment is closed –All surfaces are Lambertian reflectors
9
DPL11/27/2015 Definitions Lambertian surfaces are “perfectly diffuse”; they reflect incident light in all directions equally Lambertian surfaces are “perfectly diffuse”; they reflect incident light in all directions equally –Q: Do Lambertian surfaces really exist? The radiosity of a surface is the rate at which energy leaves the surface The radiosity of a surface is the rate at which energy leaves the surface
10
DPL11/27/2015 Radiosity Radiosity = rate at which the surface emits energy + rate at which the surface reflects Radiosity = rate at which the surface emits energy + rate at which the surface reflects energy –Notice: previous methods distinguish light sources from surfaces –In radiosity all surfaces can emit light –Thus: all emitters inherently have area
11
DPL11/27/2015 Radiosity Break environment up into a finite number n of discrete patches Break environment up into a finite number n of discrete patches –Patches are opaque Lambertian surfaces of finite size –Patches emit and reflect light uniformly over their entire surface Q: What’s wrong with this model? Q: What’s wrong with this model? Q: What can we do about it? Q: What can we do about it?
12
DPL11/27/2015 Radiosity Then for each surface i: Then for each surface i: B i = E i + i B j F ji (A j / A i ) where B i, B j = radiosity of patch i, j A i, A j = area of patch i, j E i = energy/area/time emitted by i i = reflectivity of patch i F ji = Form factor from j to i
13
DPL11/27/2015 Form Factors Form factor: fraction of energy leaving the entirety of patch i that arrives at patch j, accounting for: Form factor: fraction of energy leaving the entirety of patch i that arrives at patch j, accounting for: –The shape of both patches –The relative orientation of both patches –Occlusion by other patches
14
DPL11/27/2015 Form Factors Some examples… Some examples… Form factor: nearly 100%
15
DPL11/27/2015 Form Factors Some examples… Some examples… Form factor: roughly 50%
16
DPL11/27/2015 Form Factors Some examples… Some examples… Form factor: roughly 10%
17
DPL11/27/2015 Form Factors Some examples… Some examples… Form factor: roughly 5%
18
DPL11/27/2015 Form Factors Some examples… Some examples… Form factor: roughly 30%
19
DPL11/27/2015 Form Factors Some examples… Some examples… Form factor: roughly 2%
20
DPL11/27/2015 Form Factors In diffuse environments, form factors obey a simple reciprocity relationship: In diffuse environments, form factors obey a simple reciprocity relationship: A i F ij = A i F ji Which simplifies our equation: B i = E i + i B j F ij Which simplifies our equation: B i = E i + i B j F ij Rearranging to: B i - i B j F ij = E i Rearranging to: B i - i B j F ij = E i
21
DPL11/27/2015 Form Factors So…light exchange between all patches becomes a matrix: So…light exchange between all patches becomes a matrix: 1 - 1 F 11 - 1 F 12 … - 1 F 1n B 1 E 1 - 2 F 21 1 - 2 F 22 … - 2 F 2n B 2 E 2.. …... - p n F n1 - n F n2 …1 - n F nn B n E n Q: What do the various terms mean? Q: What do the various terms mean?
22
DPL11/27/2015 Form Factors 1 - 1 F 11 - 1 F 12 … - 1 F 1n B 1 E 1 - 2 F 21 1 - 2 F 22 … - 2 F 2n B 2 E 2.. …... - p n F n1 - n F n2 … 1 - n F nn B n E n Note: E i values zero except at emitters Note: E i values zero except at emitters Note: F ii is zero for convex or planar patches Note: F ii is zero for convex or planar patches Note: sum of form factors in any row = 1 (Why?) Note: sum of form factors in any row = 1 (Why?) Note: nequations, n unknowns! Note: n equations, n unknowns!
23
DPL11/27/2015 Radiosity Now “just” need to solve the matrix! Now “just” need to solve the matrix! –W&W: matrix is “diagonally dominant” –Thus Guass-Siedel must converge End result: radiosities for all patches End result: radiosities for all patches Solve RGB radiosities separately, color each patch, and render! Solve RGB radiosities separately, color each patch, and render! Caveat: actually, color vertices, not patches (see F&vD p 795) Caveat: actually, color vertices, not patches (see F&vD p 795)
24
DPL11/27/2015 Radiosity Q: How many form factors must be computed? Q: How many form factors must be computed? A: O(n 2 ) A: O(n 2 ) Q: What primarily limits the accuracy of the solution? Q: What primarily limits the accuracy of the solution? A: The number of patches A: The number of patches
25
DPL11/27/2015 Radiosity Where we go from here: Where we go from here: –Evaluating form factors –Progressive radiosity: viewing an approximate solution early –Hierarchical radiosity: increasing patch resolution on an as-needed basis
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.