Presentation is loading. Please wait.

Presentation is loading. Please wait.

01/29/03© 2003 University of Wisconsin Last Time Radiosity.

Similar presentations


Presentation on theme: "01/29/03© 2003 University of Wisconsin Last Time Radiosity."— Presentation transcript:

1 01/29/03© 2003 University of Wisconsin Last Time Radiosity

2 01/29/03© 2003 University of Wisconsin Today Form Factor Computations Progressive Radiosity

3 01/29/03© 2003 University of Wisconsin Form Factors (recall) The proportion of patch i’s power received by patch j Also a point-patch form: the proportion of the power from a differential area about point x received by j

4 01/29/03© 2003 University of Wisconsin Form Factor Computations Unoccluded patches: –Direct integration –Conversion to contour integration –Form factor algebra Occluded patches: –Monte Carlo integration –Projection methods Hemisphere Hemicube

5 01/29/03© 2003 University of Wisconsin Direct Integration Only works for simplest cases For example: Point to a Disc –A point to something form factor is that from a small area, dx, to the patch –Integrating over the points on a patch gets you the patch-patch integral –Note that the point is on the line perpendicular to the disc through the center

6 01/29/03© 2003 University of Wisconsin Direct Integration – Point-Rect Note that you could get any point- rectangle configuration using the additive property

7 01/29/03© 2003 University of Wisconsin Direct Integration – Rect-Rect Note that we can do this only under the constant radiosity over patch assumption There is a formula for 2 isolated polygons, but it assumes they can see each other fully!

8 01/29/03© 2003 University of Wisconsin Contour Integral Use Stokes’ theorem to convert the area integrals into contour integrals For point to polygon form factors, the contour integral is not too hard Care must be taken when r  0

9 01/29/03© 2003 University of Wisconsin Form Factor Algebra Use the properties of form factors and direct integration to compute new form factors –Additivity –Reciprocity –Point to disc form factors –Rectangle to rectangle form factors Difficult to apply automatically –Useful only in tiny scenes Unoccluded case only

10 01/29/03© 2003 University of Wisconsin Projection Methods For patches that are far apart compared to their areas, the inner integral in the form factor doesn’t vary much –That is, the form factor is similar from most points on a surface i So, compute point to patch form factors and weigh by area

11 01/29/03© 2003 University of Wisconsin Nusselt’s Analogy Integrate over visible solid angle instead of visible patch area: F x,P is the fraction of the area of the unit disc in the base plane obtained by projecting the surface patch P onto the unit sphere centered at x and then orthogonally down onto the base plane.

12 01/29/03© 2003 University of Wisconsin Same Projection – Same Form Factor Any patches with the same projection onto the hemisphere have the same form factor –Makes sense: put yourself at the point and look out – if you see equal amounts, they get equal power It doesn’t matter what you project onto: two patches that project the same have the same form factor

13 01/29/03© 2003 University of Wisconsin Monte-Carlo Form Factors We can use Monte-Carlo methods to estimate the integral over visible solid angle Simplest method: –Uniformly (in area) sample the disc about the point –Project up onto the hemisphere, then cast a ray out from the point in that direction –Form factor for each patch is the weighted sum of the number of rays that hit the patch There are even better Monte-Carlo methods that we will see later

14 01/29/03© 2003 University of Wisconsin The Hemicube We have algorithms, and even hardware, for projecting onto planar surfaces The hemicube consists of 5 such faces A “pixel” on the cube has a certain projection, and hence a certain form factor Something that projects onto the pixel has the same form factor

15 01/29/03© 2003 University of Wisconsin Hemicube, cont. Pretend each face of the hemicube is a screen, and project the world onto it Code each polygon with a color, and count the pixels of each color to determine C(j) Quality depends on hemicube resolution and z-buffer depth

16 01/29/03© 2003 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

17 01/29/03© 2003 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

18 01/29/03© 2003 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

19 01/29/03© 2003 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

20 01/29/03© 2003 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

21 01/29/03© 2003 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

22 01/29/03© 2003 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

23 01/29/03© 2003 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 radiosity to the image plane

24 01/29/03© 2003 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

25 01/29/03© 2003 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 –Eg With a hemi-cube centered on I Continued…

26 01/29/03© 2003 University of Wisconsin More Equations Display partial solution by displaying B j

27 01/29/03© 2003 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:


Download ppt "01/29/03© 2003 University of Wisconsin Last Time Radiosity."

Similar presentations


Ads by Google