Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 7M836 Animation & Rendering Global illumination, radiosity Arjan Kok

Similar presentations


Presentation on theme: "1 7M836 Animation & Rendering Global illumination, radiosity Arjan Kok"— Presentation transcript:

1 1 7M836 Animation & Rendering Global illumination, radiosity Arjan Kok a.j.f.kok@tue.nl

2 2 Direct and indirect illumination

3 3 Global illumination Light paths Complete solution: L(D|S)*E Ray tracing: L(S*)DS*E Still missing in ray tracing: Diffuse interreflection: D* Diffuse/specular interreflection: (D|S)* These terms approximated with ambient light

4 4 Diffuse interreflection Why specular reflection in in ray tracing and why diffuse interreflection not? 

5 5 Radiosity method Radiosity method computes diffuse interreflection of objects Diffuse interreflection is not longer approximated by ambient light Basic idea Subdivide all polygons in elements for which one energy value (~ color) must be computed Treat every element in scene as light source Computer for each element the total amount of radiated energy

6 6 Radiosity

7 7 Radiosity effects Soft shadows Color bleeding

8 8 Radiosity Radiosity (B) is energy per unit area that leaves surface so Radiosity is sum of energy Emitted by surface (light sources) Reflected by surface

9 9 Radiosity equation B i = Radiosity of element i E i = Emission of element i ρ i = Reflection coefficient (diffuse) of element i (k d C d ) F ji = Form-factor between elements j en i (= fraction of energy leaving element j that reaches element i) F ij A i = F ji A j

10 10 Form factor Form-factor F ij is fraction of total energy of patch i that reaches patch j V ij = 1 if dA j visible from dA i 0 if not visible AjAj dA j dA i NjNj NiNi AiAi θjθj θiθi r

11 11 Radiosity solution Solve for all elements the radiosity equation: Methods: Full-matrix radiosity Progressive refinement radiosity

12 12 Radiosity Result of radiosity: radiosity value (~ diffuse intensity) for each element Radiosity is viewpoint independent One solution can be used to generate several images modeling transform new model radiosity (== lighting)

13 13 Radiosity solution Solve for all elements the radiosity equation: Methods: Full-matrix radiosity Progressive refinement radiosity

14 14 Matrix radiosity

15 15 Matrix radiosity Disadvantages of matrix method High time and memory cost: (O(n 2 )) n = number of elements All form-factors have to be computed Even for areas in scene where there is almost no energy exchange

16 16 Progressive radiosity Contribution B i to B j: Shoot all energy from element i, and compute contribution to radiosities of all elements j in the scene Initially all radiosities of all elements are 0, except radiosities of light sources

17 17 Progressive radiosity for all elements assign emission value to radiosity and to “unshot” radiosity do determine element i with most “unshot” energy for all other elements j do compute contribution of patch i to patch j increase radiosity element j with this contribution increase unshot radiosity element j with this contribution unshot radiosity of element i set to 0 until convergence reached

18 18 Progressive radiosity Initialization B j, ΔB j = E j for all light source elements B j, ΔB j = 0 for all other elements do find element i with most “unshot” energy ΔB i A i ; for all other elements j do compute form-factor F ij ΔRad = ρ j * ΔB i * F ij * (A i /A j ) ΔB j = ΔB j + ΔRad B j = B j + ΔRad; ΔB i = 0; until convergence reached

19 19 Progressive radiosity Advantages Less memory consumption Ability to inspect process Ability to stop before process completely converged

20 20 Radiosity Result:1 radiosity value per element so 1 color per element Meshing: Partition surfaces in scene into small elements Meshing conditions Good representation of intensity changes As less elements as possible

21 21 Meshing Uniform meshing Adaptive meshing Make (uniform) start mesh and modify mesh (more elements) where large intensity differences found Discontinuity meshing Determine before radiosity computations where large intensity changes will occur. Mesh finer along intensity transitions (disconit

22 22 Uniform mesh

23 23 Reference picture & uniform mesh

24 24 Meshing problems

25 25 Increase resolution

26 26 Adaptive meshing

27 27 Shadow and light leaks

28 28 T-Vertices

29 29 Radiosity steps Create scene Take care of accurate material and light source definitions During modeling, keep in mind the problems that can occur during application of radiosity Make a coarse meshing, compute and inspect results Adapt materials and light sources Make a “good” meshing Compute radiosity results Use radiosity results to make one or more images

30 30 Radiosity summarized Computation of diffuse interreflection Result radiosity: intensities for patches Viewpoint independent Accuracy of results depends on meshing High memory and time costs

31 31 Rendering after radiosity step - 1 Direct use of radiosity results: Radiosity results replaces diffuse computation in local illumination function Gouraud shading Fine meshing to get nice shadows

32 32 Rendering after radiosity step - 2 Use radiosity results for indirect illumination only Re-compute direct light during rendering Less fine meshing required

33 33 Rendering after radiosity step - 3 Use radiosity results to re-compute direct and indirect illumination Use radiosity results as emission values Regard all patches will as light sources Coarse meshing suffices

34 34 Radiosity Ray tracing Viewpoint independent Diffuse (inter)reflections Color bleeding Area light sources Soft shadows Light paths: D* (and (D|S)*) High memory use Meshing determines accuracy results High computation times Viewpoint dependent Real specular reflections Transmission + refraction Point light sources Sharp shadows Light paths LDS*E (and LS*DS*E) Low memory use


Download ppt "1 7M836 Animation & Rendering Global illumination, radiosity Arjan Kok"

Similar presentations


Ads by Google