Presentation is loading. Please wait.

Presentation is loading. Please wait.

Computer graphics & visualization Pre-Computed Radiance Transfer PRT.

Similar presentations


Presentation on theme: "Computer graphics & visualization Pre-Computed Radiance Transfer PRT."— Presentation transcript:

1 computer graphics & visualization Pre-Computed Radiance Transfer PRT

2 computer graphics & visualization Image Synthesis – WS 07/08 Dr. Jens Krüger – Computer Graphics and Visualization Group Radiometric quantities Strahlungsenergie: radiant energy in Joule [J] Qin Joule [J] Strahlungsleistung oder -fluss: radiant flux in Watt [W=J/s] Einfallende Flussdichte: irradiance (incident) power per area in [W/m 2 ] ausgehende Flussdichte: radiosity (radiant exitance) power per area in [W/m 2 ]

3 computer graphics & visualization Image Synthesis – WS 07/08 Dr. Jens Krüger – Computer Graphics and Visualization Group Strahldichte: Radiance Combination of flux and intensity Strahldichte = Radiance Central quantity in physics based images synthesis Units: [W/(m 2 sr)] Power per unit solid angle per projected unit area N dd dNdN dA dA  

4 computer graphics & visualization Image Synthesis – WS 07/08 Dr. Jens Krüger – Computer Graphics and Visualization Group Precomputed radiance transfer Precompute irradiance on a grid Precompute irradiance on a grid – Based on irradiance volumes (Greger98) – Assume the scene doesn´t change – Precompute irradiance samples at grid points – Interpolate light at points in-between

5 computer graphics & visualization Image Synthesis – WS 07/08 Dr. Jens Krüger – Computer Graphics and Visualization Group Precomputed radiance transfer A cube-map captures radiance distribution at a point for all directions – Entries have to be scaled by projected solid angle For diffuse surfaces, radiance is defined in terms of the irradiance E

6 computer graphics & visualization Image Synthesis – WS 07/08 Dr. Jens Krüger – Computer Graphics and Visualization Group Precomputed radiance transfer Idea: compute irradiance at a point for all possible „orientations“ – Gives irradiance distribution function – Looks like a radiance distribution function but it is convolved (blurred) with a cosine kernel – It is continuous over directions – Can be stored at a point using a “Diffuse Cube Map”, which is indexed with surface normal

7 computer graphics & visualization Image Synthesis – WS 07/08 Dr. Jens Krüger – Computer Graphics and Visualization Group Radiance vs. Irradiance

8 computer graphics & visualization Image Synthesis – WS 07/08 Dr. Jens Krüger – Computer Graphics and Visualization Group Precomputed radiance transfer Volume subdivision for irradiance caching Volume subdivision for irradiance caching – Uniform, but – Uniform, but some areas have slowly changing irradiance while in others the irradiance is quickly changing – Idea: use adaptive subdivision

9 computer graphics & visualization Image Synthesis – WS 07/08 Dr. Jens Krüger – Computer Graphics and Visualization Group Precomputed radiance transfer Sampling the irradiance grid Sampling the irradiance grid – Trilinear between grid vertices – At level transitions use vertices on either side

10 computer graphics & visualization Image Synthesis – WS 07/08 Dr. Jens Krüger – Computer Graphics and Visualization Group Precomputed radiance transfer Idea: project irradiance into a particular function space and use only „a few“ coefficients to reconstruct the original function As irradiance is captured on a sphere, use basis functions on a sphere

11 computer graphics & visualization Image Synthesis – WS 07/08 Dr. Jens Krüger – Computer Graphics and Visualization Group Diffuse PRT http://people.csail.mit.edu/kautz/PRTCourse http://people.csail.mit.edu/kautz/PRTCourse http://people.csail.mit.edu/kautz/PRTCourse Goal: to shade a diffuse object using Precomputed Radiance Transfer (PRT) Diffuse: – Reflected light is view-independent – Simplifies equations

12 computer graphics & visualization Image Synthesis – WS 07/08 Dr. Jens Krüger – Computer Graphics and Visualization Group Remember Radiosity? B = E + TB = E + T(E+TB) = E + TE + T 2 B =... = T 0 E + T 1 E + T 2 E + T 3 E +... = B (0) + B (1) + B (2) + B (3) +...

13 computer graphics & visualization Image Synthesis – WS 07/08 Dr. Jens Krüger – Computer Graphics and Visualization Group Diffuse PRT To derive PRT for the diffuse case we are going to start with just the direct term from the Neumann expansion of the rendering equation and make several simplifying assumptions.

14 computer graphics & visualization Image Synthesis – WS 07/08 Dr. Jens Krüger – Computer Graphics and Visualization Group Diffuse PRT The bottom equation is the “simplified” form. For diffuse objects light is reflected equally in all directions, so outgoing radiance is independent of view direction.

15 computer graphics & visualization Image Synthesis – WS 07/08 Dr. Jens Krüger – Computer Graphics and Visualization Group Diffuse PRT This also means the BRDF is just a constant (and independent of direction) so it can be pulled out of the integral.

16 computer graphics & visualization Image Synthesis – WS 07/08 Dr. Jens Krüger – Computer Graphics and Visualization Group Diffuse PRT „Visually”

17 computer graphics & visualization Image Synthesis – WS 07/08 Dr. Jens Krüger – Computer Graphics and Visualization Group Diffuse PRT Visually, we integrate the product of three functions (light, visibility, and cosine).

18 computer graphics & visualization Image Synthesis – WS 07/08 Dr. Jens Krüger – Computer Graphics and Visualization Group Diffuse PRT The main trick is to use for pre-computed radiance transfer (PRT) is to combine the visibility and the cosine into one function (cosine-weighted visibility or transfer function), which we integrate against the lighting.

19 computer graphics & visualization Image Synthesis – WS 07/08 Dr. Jens Krüger – Computer Graphics and Visualization Group Problems How to encode the spherical functions? We still need to encode the two spherical functions (lighting, cosine- weighted visibility/transfer function) How to quickly integrate over the sphere? we need to perform the integration of the product of the two functions quickly-  PRT

20 computer graphics & visualization Image Synthesis – WS 07/08 Dr. Jens Krüger – Computer Graphics and Visualization Group Diffuse PRT Now we are going to approximate the source radiance function with its projection into a set of basis functions on the sphere (denoted yi() in this equation.)

21 computer graphics & visualization Image Synthesis – WS 07/08 Dr. Jens Krüger – Computer Graphics and Visualization Group Diffuse PRT Manipulating this expression exploiting the fact that integration is a linear operator (sum of integrals = integral of sums), we can generate the following equivalent expression. The important thing to note about the highlighted integral is that it is independent of the actual lighting environment being used, so it can be pre-computed.

22 computer graphics & visualization Image Synthesis – WS 07/08 Dr. Jens Krüger – Computer Graphics and Visualization Group Diffuse PRT We call the precomputed integrals “transfer coefficients” Outgoing radiance: just a dot-product!

23 computer graphics & visualization Image Synthesis – WS 07/08 Dr. Jens Krüger – Computer Graphics and Visualization Group Diffuse PRT A similar process can be used to model the other bounces, so that a final vector can be computed and used to map source radiance to outgoing radiance at every point on the object. Outgoing radiance is then just the dot product of the lights projection coefficients with the transfer vector.

24 computer graphics & visualization Image Synthesis – WS 07/08 Dr. Jens Krüger – Computer Graphics and Visualization Group We project the lighting into the basis (integral against basis functions). If the object is rotated wrt. to the lighting, we need to apply the inverse rotation to the lighting vector. At run-time, we need to lookup the transfer vector at every pixel. A pixel-shader then computes the dotproduct between the coefficient vectors. The result of this computation is the outgoing radiance at that point. Putting it all together

25 computer graphics & visualization Image Synthesis – WS 07/08 Dr. Jens Krüger – Computer Graphics and Visualization Group Results

26 computer graphics & visualization Image Synthesis – WS 07/08 Dr. Jens Krüger – Computer Graphics and Visualization Group Results

27 computer graphics & visualization Image Synthesis – WS 07/08 Dr. Jens Krüger – Computer Graphics and Visualization Group Results


Download ppt "Computer graphics & visualization Pre-Computed Radiance Transfer PRT."

Similar presentations


Ads by Google