80 likes | 299 Views
Radiosity. CS 319 Advanced Topics in Computer Graphics John C. Hart. Radiosity Concept. Radiosity of each surface depends on radiosity of all other surfaces Treat global illumination as a linear system Need constant BRDF (diffuse) Solve rendering equation as a matrix problem Process
E N D
Radiosity CS 319 Advanced Topics in Computer Graphics John C. Hart
Radiosity Concept • Radiosity of each surface depends on radiosity of all other surfaces • Treat global illumination as a linear system • Need constant BRDF (diffuse) • Solve rendering equation as a matrix problem • Process • Mesh into patches • Calculate form factors • Solve radiosity • Display patches Cornell Program of Computer Graphics
Radiosity System • Recall the radiance version of the rendering equation • Flux version of rendering equation • Flux is radiosity times area • Diffuse reflection is constant • Fij is the form factor Fi Fo
Form Factor Ai qi qj r FdAidAj – portion of all intensity leaving a diff. area on patch i (denominator) that reaches a diff. area on patch j (numerator) FdAiAj – portion of all intensity leaving a diff. area on patch i that reaches all of patch j FAiAj = Fij – portion of all intensity leaving patch i that reaches patch j Aj Form Factor Fun Facts Fii = 0 when patches are flat Fij = 0 if patches are occluded AiFij = AjFji Fij is dimensionless When r2>>Aj …
Computing Form Factors • Stokes Theorem [Lambert 1760, Goral et al. S84] • Nusselt analog Fij = projD(projW(Aj))/Area(D) • Hemicube • Monte-Carlo Ray Casting • Uniformly sample disk • Fij = # of rays hitting Aj / # of rays Aj (cos qj/r2) Aj W Ai 1 D cos qi(cos qj/r2) Aj DA
Matrix Radiosity Ei Bi
Gathering • Solve as an Ax = b linear system MB = E • Jacobi • Radiosity = Emittance plus reflection of other radiosities Bi(k+1) = Ei – SjiMijBj(k) • Gauss-Siedel • Works in place Bi = Ei – SjiMijBj • Overrelaxation • Gauss-Siedel too conservative Bi(k+1) = 110% Bj(k+1) – 10% Bj(k) Bi
Shooting Bi • Progressive refinement • Distribute extra radiosity DBi across other patches j Bj(k+1) = Bj(k) + SrjFjiDBi • Extra “unshot” radiosity is whatwe got from last iteration DBi = Bj(k) – Bj(k-1) • Energy starts at emitters • Distributes “progressively” through scene • Can use an ambient term when displaying scene, which gets replaces as progressive radiosity converges IBM