Download presentation
Presentation is loading. Please wait.
Published byMarvin West Modified over 9 years ago
1
02/18/05© 2005 University of Wisconsin Last Time Radiosity –Converting the LTE into the radiosity equation –Solving with Gauss-Seidel relaxation –Form factor computations
2
02/18/05© 2005 University of Wisconsin Today Progressive Radiosity Assorted optimizations
3
02/18/05© 2005 University of Wisconsin Problems with Gauss-Seidel All the form factors are required before any image can be generated –So you wait a long time to see anything Reducing the number of form factors requires reducing the number of patches, which severely impacts quality We desire a progressive solution, that starts with a rough approximation and refines it –This also opens the possibility of computing some pieces (the bits you can see) before others
4
02/18/05© 2005 University of Wisconsin Radiosity Eqn to Energy Eqn The radiosity equation is in terms of power per unit area Rewrite this equation in terms of energy values per patch (instead of per unit area) Note that the form factor is now from j to i
5
02/18/05© 2005 University of Wisconsin Relaxation and Residuals Relaxation methods start with an initial guess, (0), and perform a sequence of relaxation steps, each resulting in a new (k) The residual is defined as At each step, relaxation methods zero one element of the residual (e.g. Gauss-Seidel zeros each one in turn) Note the residual is zero when the equation is solved
6
02/18/05© 2005 University of Wisconsin Southwell Relaxation Southwell relaxation zeros the largest residual at each step We can update the radiosity for the patch i in a single step! But we need to update all the other residuals
7
02/18/05© 2005 University of Wisconsin Updating Residuals Note that only one component of changed, i Hence, we only need one element of K for every j, one row in total Using the definition of residuals
8
02/18/05© 2005 University of Wisconsin Southwell Summary Each patch has two components: energy, i k, and undistributed energy, r i k Start with some i 0 and hence r i 0 At each step k+1: –Choose the i with maximum residual –Update i k+1 and r i k+1 =0 –Update all the r j k+1
9
02/18/05© 2005 University of Wisconsin Physical Interpretation Assume that all the initial patch energies are 0 Then the initial residuals are the amounts of energy to be emitted by each patch Each step redistributes the residual according to: Recall, the form factor F ij is the amount of power radiated by i that j receives So, each patch gets its own share of the residual that is shot, according to the form factors
10
02/18/05© 2005 University of Wisconsin Gathering and Shooting Gauss-Seidel “gathers” radiosity from every patch to a specific patch: Southwell “shoots” energy from one patch onto all the other patches The terms gathering and shooting are used commonly in the literature –Eg “do a final gather” means gather radiance to the image plane
11
02/18/05© 2005 University of Wisconsin Progressive Refinement After any number of iterations, an estimate of each patch’s final energy can be obtained by: These intermediate results can be displayed as the algorithm proceeds, giving faster feedback
12
02/18/05© 2005 University of Wisconsin Typical Equations Typically work in terms of radiosity, which result in equations similar to those from the previous slides Define radiosity and “un-shot” radiosity On each step, find the highest residual: Compute all the form factors out of patch i Continued…
13
02/18/05© 2005 University of Wisconsin More Equations Display partial solution by displaying B j
14
02/18/05© 2005 University of Wisconsin Ambient Correction Progressive radiosity images look dark at first, because shooters hold onto their energy until it’s their turn. An ambient correction can be added to the display only:
15
02/18/05© 2005 University of Wisconsin The Effect of Patch Size There is a trade-off in patch size: large patches give faster solution, small patches give better results –Doubling the patch resolution increases computation by 16x 4x in each patch, but N 2 computation, so 16x Effect of large patches is most obvious in receiving: patch size indicates largest resolvable illumination feature –Particularly important when? Large patches are not so bad for emitting –What impact will large vs. small patches have?
16
02/18/05© 2005 University of Wisconsin Shooting to Vertices “Standard” progressive radiosity shoots from points to areas –Point is middle of shooting patch –Area is the area of a receiving element Better to shoot from area to points: –Area is source patch, point is receiving vertex –Progressive radiosity really needs F ji –Less aliasing under certain circumstances –Radiosity is needed at vertices for display –Greater control over receivers
17
02/18/05© 2005 University of Wisconsin Ray-casting For Form Factors Aim: compute Cast rays from y to sub-patches, P i k, of P i : –Ray determines (constant) visibility for each sub-patch Then: Not Monte-Carlo, but similar!
18
02/18/05© 2005 University of Wisconsin Delta Form Factors We need to compute F k Several possibilities –Assume constant, evaluated using angles and radius for a point at the center of the patch (can be very bad) –Use analytic methods, point-polygon (costly) –Use disc approximation Assume sub-patch is a small disc Form factor for point-disc is known
19
02/18/05© 2005 University of Wisconsin Automated Meshing The patch and element resolution should be decided based on the complexity of the illumination situation It is unreasonable to expect a user to know what is required – they are, after all, using the software to find a solution Automated meshing strategies are desired
20
02/18/05© 2005 University of Wisconsin Adaptive Subdivision (Progressive Version) Shoot as normal Choose to subdivide after each shot –Look at how the received energy varied over the surface Not all shooting patches require the same subdivision –For instance, lights in different places cast different shadows –Can re-compute subdivision for each shot Distribute radiosity gathered at one resolution to that gathered at another –Need all radiosity at largest patch size for shooting –Need all radiosity at highest level of subdivision for rendering
21
02/18/05© 2005 University of Wisconsin Which Resolution? Should P be bigger or smaller for each receiving patch? What influences the decision?
22
02/18/05© 2005 University of Wisconsin Hierarchical Meshing Use different resolution depending on who is emitting and who is receiving Build hierarchy of elements for each patch Record interactions between elements at appropriate levels Essentially replaces blocks in the form factor matrix with average values
23
02/18/05© 2005 University of Wisconsin Building the Hierarchy Start with “top level” patches Estimate the error incurred by each patch-patch transfer. Use: –Form factor estimate: –Radiosity Form factor –Importance (more later) If error too large, break one element and recurse –But only recurse for this transfer – don’t re-compute all transfers Like starting with finest resolution, and averaging blocks in the form factor matrix
24
02/18/05© 2005 University of Wisconsin Hierarchical Solution For each Gauss-Seidel iteration –Gather energy to a patch along all the links –Update radiosity values for each node in the patch hierarchy Push radiosity down from parents to children – no area weighting Pull radiosity up from children to parents – area weighted Cost proportional to number of links, which is O(N) where N is number of leaves
25
02/18/05© 2005 University of Wisconsin Brightness-weighted refinement Subdivide based on an estimate of energy transferred Need radiosity estimates, which we don’t know beforehand: –Start with high error threshold, and get approximate solution –Refine hierarchy using radiosity estimates –Repeat with successively lower thresholds –Also called multi-grid methods
26
02/18/05© 2005 University of Wisconsin Importance For a single image, only the visible surfaces are directly important –Don’t care what’s “down the hall” Surfaces illuminating visible surfaces are also important, and other surfaces illuminating those surfaces… Importance propagates backwards from the “primary” sources of importance –Visible surfaces are typically prime sources of importance
27
02/18/05© 2005 University of Wisconsin Solving for Importance R i is the inherent importance of a given element When radiosity is gathered, importance is shot Use BIF as error estimate in determining subdivision –Radiosity * Importance * Form Factor: Combine with multi-grid method Note: must use different push-pull operations for importance –Push down area-weighted, pull up non-weighted
28
02/18/05© 2005 University of Wisconsin Next Time A little more radiosity Volume scattering
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.