GameDev.netRadiosity Methods

Radiosity Methods
by Hin JangRadiosity is the rate at which energy leaves a surface. A Lambertian surface is one that reflects an amount of light from a unit differential area |\ | B(x) = B where B(x), the radiosity at point cos(t V(x, x') is equal to one if point Solving the radiosity equation involves projecting the emittance and reflectance functions onto a set of basis functions. For radiosity B(x), its approximation is B^(x), a linear combination of n ---- B(x) ~= B^(x) = \ B where B
The solution to the original radiosity equation for receiving surface n ---- B(x) = B where |\ |\ | | K The reflected radiosity B n n ---- ---- B If the radiosity equation is decomposed as follows *irradiance from scene radiosities* The operator*G*for a general function*f*is|\ | *G*(f)(x) = | G(x, x')f(x') dx' | \|so that E(x) = *G*(B)(x)*radiosities from irradiances and reflectivities* The operator*S*is*S*(f)(x) = p(x)f(x)so that B ^{r}(x) =*S*(E)(x)
the radiosity equation becomes B(x) = B and the linear system can be written as n ---- B where K The decomposition into operators
For The following code fragment establishes all linkages between initial patches void Refine(Patch *p, Patch *q, double Fe, double Ae) { double Fpq, Fqp; Fpq = FormFactor(p, q); Fqp = FormFactor(q, p); if (Fpq < Fe && Fqp < Fe) Link(p, q); else { if (Fpq > Fqp) { if (Subdivide(q, Ae)) { Refine(p, q->ne, Fe, Ae); Refine(p, q->nw, Fe, Ae); Refine(p, q->se, Fe, Ae); Refine(p, q->sw, Fe, Ae); } else Link(p, q); } else { if (Subdivide(p, Ae)) { Refine(q, p->ne, Fe, Ae); Refine(q, p->ne, Fe, Ae); Refine(q, p->ne, Fe, Ae); Refine(q, p->ne, Fe, Ae); } else Link(p, q); } } } Once all form factors have been determined, the radiosity for each patch is calculated. Gather( ) accumlates the total amount of energy received by a patch directly and from its parent subpatches. The average brightness of each patch is stored in void Gather(Patch *p) { Patch *q; double Fpq; if (p != NULL) { p->Bg = 0.0; for (q = p->interactions; q != NULL; q = q->next) { Fpq = FormFactor(p, q) p->Bg += Fpq * p->Cd * q->B; } Gather(p->sw); Gather(p->se); Gather(p->nw); Gather(p->ne); } } The disadvantage of hierarchical radiosity is that shadow boundaries tend to be jagged because subdivision occurs regularly and, therefore, does not follow the contour of the shadow. One way to remove the discontinuities is to mesh the environment along the curve. This method of
The accuracy to which radiosity is computed in the previous method is dependent on surface geometry. Complex interactions among non-planar surfaces require finer subdivision, at the cost of greater computation, since the bases are assumed to be piecewise constant across the subpatches. One way to avoid the limiting feature of hierarchical radiosity is to project the functions onto a higher order basis. Galerkin radiosity is a means by which the integral equation for radiosity can be solved in terms of a basis set of non-constant functions across a surface B so that the original function can be approximated with n ---- B Applying the Galerkin method for radiosity begins with the radiosity equation of two variables |\ |\ | | B(s, t) = B Expanding B(u, v) in terms of the basis set {T |\ |\ | | B(s, t) = B By taking the inner product of both sides with the ---- B where K n ---- B Galerkin radiosity allows direct evaluation of the radiosity equation without the need to tesselate a curved surface. Meshing is only required when two surfaces are extremely close to each other and is not needed to model variations in intensity across a surface
**[1]**- Bastos, R., M. Goslin, and H. Zhang,
*Efficient Rendering of Radiosity Using Textures and Bicubic Reconstruction,*TR-96-025, Department of Computer Science, University of North Carolina, Chapel Hill, 1996 **[2]**- Foley, J.D., A. van Dam, S.K. Feiner, and J.F. Hughes,
*Computer Graphics Principles and Practice, Second Edition*, Addison-Wesley, Reading, 723-724, 1990 **[3]**- Gershbein, R., P. Schroder, and P. Hanrahan,
*Textures and Radiosity: Controlling Emission and Reflection with Texture Maps,*Research Report CS-TR-449-94, Department of Computer Science, Princeton University, 1993 **[4]**- Gershbein, R.,
*An Adaptive Gauss Method For Computing Irradiance Coefficients of Galerkin Radiosity Systems,*TR-485-95, Department of Computer Science, Princeton University, 1995 **[5]**- Goral C.M., K.E. Torrance, D.P. Greenberg, and B. Battaile, "Modeling the Interaction of Light Between Diffuse Surfaces,"
*Computer Graphics,*18(3):213-222, July 1984 **[6]**- Gortler, S.J., P. Schröder, M.F. Cohen, and P. Hanrahan, "Wavelet Radiosity,"
*Computer Graphics, SIGGRAPH 1993 Proceedings,*27(4):221-230 **[7]**- Hanrahan, P., D. Salzman, and L. Aupperle, "A Rapid Hierarchical Radiosity Algorithm,"
*Computer Graphics, SIGGRAPH 1991 Proceedings,*25(4):197-206 **[8]**- Kajiya, J.T., "The Rendering Equation,"
*Computer Graphics, SIGGRAPH 1986 Proceedings,*20(4):143-149 **[9]**- Lischinski, D., F. Tampieri, and D.P. Greenberg, "Combining Hierarchical Radiosity and Discontinuity Meshing,"
*Computer Graphics, SIGGRAPH 1993 Proceedings,*27(4):199-208 **[10]**- Pellegrini, M., "Monte Carlo Approximation of Form Factors with Error Bounded a Priori,"
*ACM Proceedings of the Eleventh Annual Symposium on Computational Geomerty,*287-296, 1995 **[11]**- Smits, B., J. Arvo, and D. Greenberg, "A Clustering Algorithm for Radiosity in Complex Environments,"
*Computer Graphics, SIGGRAPH 1994 Proceedings,*28(4):435-442 **[12]**- Zatz, H.R., "Galerkin Radiosity: A Higher Order Solution for Global Illumination,"
*Computer Graphics, SIGGRAPH 1993 Proceedings,*27(4):213-220
© 1999-2011 Gamedev.net. All rights reserved. |