560 likes | 581 Views
CSCE 641 Computer Graphics: Radiosity. Jinxiang Chai. Rendering: Illumination Computing. Direct ( local ) illumination Light directly from light sources No shadows. Local Illumination. I r = k a I a + I i (k d (n.l) + k s (h.n) m ). ambient. diffuse. specular. Local Illumination.
E N D
CSCE 641 Computer Graphics: Radiosity Jinxiang Chai
Rendering: Illumination Computing • Direct (local) illumination • Light directly from light sources • No shadows
Local Illumination Ir = kaIa + Ii (kd (n.l) + ks(h.n)m ) ambient diffuse specular
Local Illumination Ir = kaIa + Ii (kd (n.l) + ks(h.n)m ) ambient diffuse specular
Local Illumination Ir = kaIa + Ii (kd (n.l) + ks(h.n)m ) ambient diffuse specular • if there are multiple lights there is a sum of the specular and diffuse components for each light
Rendering: Illumination Computing • Direct (local) illumination • Light directly from light sources • No shadows • Indirect (global) illumination • Transparent, reflective surfaces, and hard shadows (Ray tracing) • Diffuse interreflections, color bleeding, and soft shadow (radiosity)
Radiosity • The radiosity model computes radiant-energy interactions between all the surfaces in a scene
Radiosity • Radiosity computes the rendering equation for diffuse surfaces
Energy Conservation Equation The total rate of radiant energy leaving surface i per unit square
Energy Conservation Equation The rate of energy emitted from surface i per unit area - zero if surface i is not a light source
Energy Conservation Equation Reflectivity factor Percent of incident light that is reflected in all directions
Energy Conservation Equation Form factor Fractional amount of radiant energy from surface j that reaches surface i
Compute Form Factors The form factor specifies the fraction of the energy leaving one patch and arrives at the other. In other words, it is an expression of radiant exchange between two surface patchesl
Compute Form Factors Radiant energy reaching Ay from Ax Radiant energy leaving Ax in all directions The form factor specifies the fraction of the energy leaving one patch and arrives at the other. In other words, it is an expression of radiant exchange between two surface patchesl
Radiosity Equation • Radiosity for each polygon • Linear system: • - : radiosity of patch I (unknown) • - : emission of patch I (known) • - : reflectivity of patch I (known) • - : form-factor (known)
Linear System X = B A
Form Factor: How to compute? • Closed Form • - analytical • Hemicube
Form Factor: How to compute? • Closed Form • - anlytical • Hemicube: precomputation!!!
Form Factor: Nusselt Analog So how can use Nusselt analog for form factor calculation?
Delta Form Factor: Top Face Top of hemicube
Delta Form Factors: Side Faces Side of hemicube
How to Solve Linear System? • Matrix conversion • Iterative approaches • - Jacobian (gathering) • - Gauss-Seidel (gathering) • - progressive refinement (shooting)
Matrix Conversion - Computational cost: O(N3) - Very slow for a large set of polygons
Jacobian Iterations • For all patches i, i=1,…,N, • While not converged: • for all patches i=1,…,N
Jacobian Iterations • For all patches i, i=1,…,N, • While not converged: • for all patches i=1,…,N Update of one patch requires evaluation of N Form Factors What’s the computational cost?
Rendering • - The final Φi's can be used in place of intensities in a standard renderer (Gouraud) • - Radiosities are constant over the extent of a patch • - A standard renderer requires vertex intensities (or radiosities) • - If the radiosities of surrounding patches are know, vertex radiosities can be estimated using bilinear interpolation