Presentation is loading. Please wait.

Presentation is loading. Please wait.

Illumination Models Radiosity Chapter 14 Section 14.7 Some of the material in these slides may have been adapted from University of Virginia, MIT, Colby.

Similar presentations


Presentation on theme: "Illumination Models Radiosity Chapter 14 Section 14.7 Some of the material in these slides may have been adapted from University of Virginia, MIT, Colby."— Presentation transcript:

1 Illumination Models Radiosity Chapter 14 Section 14.7 Some of the material in these slides may have been adapted from University of Virginia, MIT, Colby College, and University College London

2 2 Point illumination

3 3 Ray Tracing

4 4 Diffuse Reflection & Color Bleeding

5 5 Radiosity ● All surfaces are assumed perfectly diffuse ■ What does that mean about property of lighting in scene? ○ Light is reflected equally in all directions ○ Same lighting independent of viewing angle / location ● Diffuse-diffuse surface lighting effects possible

6 6 Radiosity ● Basic Idea ■ We can accurately model diffuse reflections from a surface by considering the radiant energy transfers between surfaces, subject to conservation of energy laws. ■ This method for describing diffuse reflections is generally referred to as the ra diosity model.

7 7 Which one is Better RaytracedRadiosity Herik Wann Jensen

8 8 Radiosity: Cornell Experiment MeasuredSimulated Program of Computer Graphics Cornell University

9 9 Radiosity: Cornell Experiment MeasuredSimulated Difference

10 10 Early Radiosity Shenchang Eric Chang et al., Cornell 1988

11 11 Types of Surface Reflectance Specular-specular (ray tracing) Diffuse-diffuse (radiosity) Specular-diffuse (Monte Carlo) Diffuse-specular (Monte Carlo)

12 12 Rendering ● Radiosity is a view-independent solution. ● Could flat shade each patch with colour depending on radiosity at the center (bad solution!) ● Instead obtain radiosities at the vertices of the polygons ■ use Gouraud smooth shading (interpolation) ■ Available very cheaply on graphics hardware.

13 13 Ray Tracing vs. Radiosity ● Both achieve global illumination ● Ray tracing ■ Follow rays of energy as they bounce through a scene ○ Which rays? Pick some. Randomness helps. Monte Carlo. Still a research topic. ○ How many rays? Depends on the scene. Still a topic of research debate. ● Radiosity ■ Compute energy transfer between finite-sized patches of surfaces in the scene ○ Which patches? Must subdivide the scene somehow ○ How does energy transfer Approximating models between patches? Still an area of research

14 14 Ray Tracing vs. Radiosity ● Radiosity captures the sum of light transfer well ■ But it models all surfaces as diffuse reflectors ■ Can’t model specular reflections or refraction ○ Images are viewpoint independent ● Ray tracing captures the complex behavior of light rays as they reflect and refract ■ Works best with specular surfaces. ○ Diffuse surface converts light ray into many. Ray tracing follows one ray and does not capture the full effect of the diffusion. ○ Must use ambient term to replace absent diffusion

15 15 Radiosity Measure ● It is the name of a measure of light energy... ●...and an algorithm: ■ Radiant energy (flux) = energy flow per unit time across a surface (watts) ■ Radiosity = flux per unit area (a derivative of flux with respect to area) radiated from a surface. ■ These are wavelength-dependent quantities.

16 16 Radiosity Equation ● A model for the light reflections from the various surfaces is formed by setting up an "enclosure" of surfaces. ● Each surface in the enclosure is either ■ a reflector, ■ an emitter (light source), ■ or a combination reflector-emitter. ● We want to calculate radiosity parameter B i, the total rate of energy leaving surface i per unit area.

17 17 Radiosity Equation ● B i = total rate of radiant energy leaving surface i per unit area ● H i = sum of the radiant energy contributions from all surfaces in the rendered volume arriving at surface i per unit time per unit area ● F ji = the form factor for surfaces j and i = the fractional amount of radiant energy from surface j that reaches surface i.

18 18 Radiosity Equation

19 19 Radiosity Equation ● For a scene with n surfaces ■ The radiosity equation for surface i ● E i = rate of energy emitted by surface i per unit area (watts/m 2 ) ● E i = 0 if surface i is not a light

20 20 Radiosity Equation ●  i is the reflectivity factor for surface i (percent of incident light that is reflected in all directions) ■ Related to the diffused reflection coefficient used in emperical diffuse illumination models ● What is the self-form-factor (self-incidence) F ii for plane and convex surfaces? ■ F ii Is zero because convex surfaces and planes cannot see themselves ● The radiosity equation indicates that surface affects other surfaces and even itself ● How will we compute B i for all surfaces in the scene?

21 21 Radiosity Equation ● To obtain the illumination effects over the various surfaces in the enclosure we need to solve the simultaneous radiosity equations for the n surfaces given the array values for E i,  i, and F ji

22 22 The Radiosity Equation where and

23 23 Radiosity Equation In matrix form The Bi are unknown and assume all else is known (Form Factor is not) Then can be rewritten as system of n linear equations in n unknowns. Hence patches can be rendered ideally with smooth shading. One set of eqns for each wavelength!

24 24 The Form Factors ● Need to determine form factors to solve the radiosity equation ● Remember F ij = energy transfer from surface i to j = percent of energy emanating from i that is incident on j This is a good image from Foley et al. Note  in the image corresponds to  in our Hearn and Baker.

25 25 Form Factors ● Consider the differential units ■ For some small area of surface j and some small area of i ■ We want to calculate the rate of radiant energy falling on a small surface dA j from a small area dA i ● See the derivation of the equation in the book ● We can calculate the integration using numerical methods

26 26 Final Radiosity Algorithm 1. Divide each surface into small polygons ■ The smaller the polygons, the more realistic the scene 2. Calculate form factors 3. Calculate Radiosity B i for each small polygon by solving simultaneous linear equations 4. Display the radiosity values ● Produces very realistic images ● Radiosity is expensive to compute ■ Get your PhD by improving it ● Specular reflection information is not modeled

27 27 View-dependent vs View-independent ● Ray-tracing models specular reflection well, but diffuse reflection is approximated ● Radiosity models diffuse reflection accurately, but specular reflection is ignored ● Advanced algorithms combine the two

28 28 Bidirectional Ray Tracing L A B C E* * * - these transports would be missed by conventional RT.

29 29 Bidirectional Ray Tracing Forward ray tracing – source to surfaces, illuminates surfaces. Backward (conventional) ray tracing – eye to surfaces, sees lit surfaces. Accumulate photon hits for surface intensity – render from eye pt.

30 30 Bidirectional Ray Tracing ● Computationally expensive. ● Much more accurate model though. ● Real problem is number of photons to trace. ● Can use refinement methods: ■ Trace so many photons, render and check… ■ and so on until rendering acceptable. ● Area sampling techniques can be used.

31 31 Bidirectional example Single Pass (Conventional RT)Two Pass (Bidirectional) Note : caustic due to red transparent ball

32 32 Bidirectional example 200 rays used in lighting pass400 rays used in lighting pass

33 33 Bidirectional example 800 rays used in lighting pass. Note: - improved caustic definition, - lighting effect of mirror, - reflection of caustic, - shadowing due to mirror lighting.

34 34 Summary of bidirectional RT ● Trace rays from light source to surfaces. ● Gives secondary lighting and caustics that conventional ray tracing misses. ● Accumulate surface hits – may require large number of hits for adequate intensity. ● Code for both ray trace directions can be identical.

35


Download ppt "Illumination Models Radiosity Chapter 14 Section 14.7 Some of the material in these slides may have been adapted from University of Virginia, MIT, Colby."

Similar presentations


Ads by Google