Radiosity Radiosity Cornell box with color bleeding [Goral et al 84] Computer Graphics (Spring 2008) Computer Graphics (Spring 2008) COMS 4160, Lecture 23: Radiosity http://www.cs.columbia.edu/~cs4160 Photograph of a sculpture. Advantages and Disadvantages Advantages and Disadvantages The front faces are all diffuse white The color is because of reflection from rear-facing colored faces � Radiosity methods track rate at which energy (radiosity) leaves [diffuse] surfaces Raytracing makes all faces white. � Determine equilibrium of light energy in a view- It can handle specular reflection and independent way shadows, but not diffuse-diffuse interreflection or color bleeding � Allows for diffuse interreflection, color bleeding, and walkthroughs Radiosity correctly captures the color bleeding from the back of the boards to the front. � Difficult to handle specular objects, mirrors General Approach General Approach Earliest Earliest Radiosity Radiosity pictures pictures Radiosity was first developed in other fields � Assume diffuse surfaces discretized into a finite � Heat transport, Lighting Design set of patches or finite elements � In graphics: Goral et al. 84 � Radiosity equation is a matrix equation or set of simultaneous linear equations derived by approximations to the rendering equation � Solve iteratively using numerical methods Parry Moon and Domina Spencer (MIT), Lighting Design, 1948
Rendering Equation Outline Outline Surfaces (interreflection) x ′ � Rendering equation review dA � Radiosity equation � Form factors ω d ω ω i i r � Methods to compute form factors x ω ′− ∼ x x i ∫ ′ − ω = ω + ω ω ω θ ω L x ( , ) L x ( , ) L x ( , ) f x ( , , ) c os d r r e r r i i r i i Ω High-level overview only. Best textual reference is probably Reflected Light Emission BRDF Cosine of Reflected Sections 16.3.1 and 16.3.2 in FvDFH. This will be handed out. (Output Image) Light Incident angle If curious, read the rest of 16.3 and parts of Cohen and Wallace. UNKNOWN KNOWN UNKNOWN KNOWN KNOWN Change of Variables Change of Variables ∫ ∫ ω = ω + ′ − ω ω ω θ ω ω = ω + ′ − ω ω ω θ ω L x ( , ) L x ( , ) L x ( , ) ( , f x , ) cos d L x ( , ) L x ( , ) L x ( , ) ( , f x , ) cos d r r e r r i i r i i r r e r r i i r i i Ω Ω Integral over angles sometimes insufficient. Write integral Integral over angles sometimes insufficient. Write integral in terms of surface radiance only (change of variables) in terms of surface radiance only (change of variables) θ θ cos cos ∫ ω = ω + ′ − ω ω ω ′ L x ( , ) L x ( , ) L x ( , ) ( , f x , ) i o d A x ′ r r e r r i i r ′ | x − x | 2 ′ all x visible to x θ o dA ′ − ω i ′ θ ′ θ d ω dA cos dA cos θ ω ω = ω = i d o d o i i − ′ i − ′ i | x x | 2 | x x | 2 θ θ x cos cos ′ ′ = = G x x ( , ) G x x ( , ) i o ′ − 2 | x x | Rendering Equation: Standard Form Radiosity Equation ∫ ω = ω + ′ − ω ω ω θ ω L x ( , ) L x ( , ) L x ( , ) ( , f x , ) cos d ∫ ′ ′ ′ ′ ω = ω + − ω ω ω L x ( , ) L x ( , ) L x ( , ) ( , f x , ) ( , G x x V ) ( , x x ) dA r r e r r i i r i i r r e r r i i r Ω all surfaces x ′ Integral over angles sometimes insufficient. Write integral Drop angular dependence (diffuse Lambertian surfaces) in terms of surface radiance only (change of variables) θ θ cos cos ∫ ′ ′ ′ ′ ∫ ′ ′ L x ( ) = L x ( ) + f x ( ) L x G ( ) ( , x x V x x ) ( , ) dA L x ( , ω ) = L x ( , ω ) + L x ( , − ω ) ( , f x ω ω , ) i o d A ′ r e r r r e r r i i r − 2 | x x | all x ′ visible to x S Domain integral awkward. Introduce binary visibility fn V Change variables to radiosity (B) and albedo ( ρ ) ∫ ′ ′ ω = ω + ′ − ω ω ω ′ ′ ′ G x x V x x ( , ) ( , ) L x ( , ) L x ( , ) L x ( , ) ( , f x , ) ( , G x x V ) ( , x x ) dA ∫ ′ ′ = + ρ r r e r r i i r B x ( ) E x ( ) ( ) x B x ( ) dA π ′ all surfaces x ′ θ dA cos S ω = d o Expresses conservation of light energy at all points in space Same as equation 2.52 Cohen Wallace. It swaps primed i ′ − 2 | x x | And unprimed, omits angular args of BRDF, - sign. Same as equation above 19.3 in Shirley, except he has θ θ cos cos Same as equation 2.54 in Cohen Wallace handout (read sec 2.6.3) ′ ′ no emission, slightly diff. notation = = G x x ( , ) G x x ( , ) i o ′ − 2 | x x | Ignore factors of π which can be absorbed.
Outline Discretization and Form Factors and Form Factors Outline Discretization � Rendering equation review ′ ′ G x x V x x ( , ) ( , ) ∫ = + ρ ′ ′ B x ( ) E x ( ) ( ) x B x ( ) dA π S � Radiosity equation A + ∑ = ρ j B E B F → i i i j j i A j i � Form factors 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 � Methods to compute form factors total energy) that arrives anywhere in the entirety of patch i ( divide by area of i to get energy per unit area or radiosity). Section 16.3.1,2 (eqs 16.63-65) in FvDFH Form Factors Form Factors Matrix Equation Matrix Equation A + ∑ = ρ j B E B F θ → i i i j j i dA A j j j A i ′ ′ j = ∫∫ G x x V x x ( , ) ( , ) r = A F A F dAdA → → i i j j j i π i j θ + ∑ i = ρ B E B F → i i i j i j dA A i ∑ j i − ρ = B B F E → i i j i j i ′ ′ = ∫∫ G x x V x x ( , ) ( , ) j = A F A F dAdA → → i i j j j i π i j ∑ = = = − ρ M B E MB E M I F θ θ cos cos → ij j i ij ij i i j ′ = ′ = G x x ( , ) G x x ( , ) i o j − ′ | x x | 2 Outline Outline Nusselt Nusselt’ ’s s Analog Analog Analytically project � Rendering equation review into hemisphere above point. Then project onto hemisphere base � Radiosity equation Form factor is ratio of area on base to area of entire base � Form factors This computes differential point to patch form factor � Methods to compute form factors Section 16.3.2 in FvDFH Why does it work?
Hemicube Hemicubes Hemicubes Hemicube θ θ cos cos ∆ = i p ∆ F A p π 2 r � Each small hemicube cell has a precomputed delta form factor: add up to get final value � We can render the scene using normal Z-buffer scan conversion onto the faces of the hemicube! Monte Carlo Ray Tracing Monte Carlo Ray Tracing � Can be used to find form factors (slow) � Can be used directly to shoot energy
Recommend
More recommend