VZOROVÁ PREZENTACE DCGI - cw.fel.cvut.cz · Linear system: N equations with N uknowns...
Transcript of VZOROVÁ PREZENTACE DCGI - cw.fel.cvut.cz · Linear system: N equations with N uknowns...
Radiosity
Jiří Bittner
Radiosity Methods MPG 15.10- Assumptions
- Basic principle
- Radiosity equation
- Iterative methods
- Meshing
- Instant radiosity
Outline
2
Globall Illumination Computation
Assumption: Diffuse surfaces
Energy transport- Balance of emitted and absorbed energy
- Origin in heat transfer simulation
Radiosity - Overview
3
Example
4
Illumination computed for planar patches- Finite element method
View independent solution- Long preprocessing (1x)
- Fast viewing (Nx)
Good soft shadows, bad sharp shadows
Cannot simulate specular reflection/refraction
Basic Properties
5
Directionally independent radiance
Diffuse emitor- Equal radiance in all directions
Reflection on a diffuse patch
B (x) = rd(x) *E (x)
B … radiosity [W/m2]
E … irradiance [W/m2]
rd ... reflectivity
View independent solution
Assumption #1: Diffuse emission and reflection
6
Scene subdivision to patches
Piecewise constant approximation
of radiosity
Assumption #2: Constant radiosity on patches
7
Radiosity Equation
N
j
ijjiiei FBBB1
, r
Bi
B1
B2
Bj
Be,i, ρi
radiosity Bi
self emmision Be,i (Ei)reflectivity ρi
form factor Fij
8
Form factor Fij
- Portion of energy from Ai reaching Aj
Form Factor
i jA
ij
A
jiji
i
ij dAdAr
xxv
AF
2
coscos),(1
jijiji FAFA
9
Leads to system of N equations with unknowns Bi
Radiosity Equation
Bi
B1
B2
BN
Be,i, ρi ij
N
j
jiiei FBBB
1
, r
ji
N
j
jjiieiii FBABABA
1
, r Power formulation
10
Linear system: N equations with N uknowns (radiosities) Bi … (uknown)
Be,i …(known)
ri … (known)
Fij … form factors• Have to be computed, known when solving the system
Solving Radiosity Equation
N
j
ijjiiei FBBB1
, r
1 − 𝜌1𝐹1→1 −𝜌1𝐹1→2 … −𝜌1𝐹1→𝑛−𝜌2𝐹2→1 1 − 𝜌2𝐹2→2 … −𝜌2𝐹2→𝑛
… … … …−𝜌𝑛𝐹𝑛→1 1 − 𝜌𝑛𝐹𝑛→2 … 1 − 𝜌𝑛𝐹𝑛→𝑛
𝐵1𝐵2…𝐵𝑛
=
𝐵𝑒,1𝐵𝑒,2…𝐵𝑒,𝑛
11
Part of energy emmited by patch i to patch j
or
How patch i sees patch j (Nusselt analogy)
Configuration Factor Fij
Aj
A’j
dAiFij
12
Hemicube instead of Hemisphere
Configuration factors from patch projections- Cell weights (δ factors)
- z-buffer
Computing Fij using Hemicube
Aj
Aioccluder
13
Classical Computation Scheme
Computing
configuration factors
Subdivision to patches
Radiosity solution(system of equations)
Scene with planar polygonsand area light sources
Change or self emmision (E)
Change of patch reflectivity (ρ)
Change of viewpoint
Rendering
14
replaced by explicitly iterative methods
Progressive radiosity- Southwell iteration: shooting energy from brightest patches
Hierarchical radiosity- Patches in a hierarchy
- Energy transfer between hierarchy nodes
Stochastic radiosity (Monte-Carlo)- Using rays to stochastically distribute energy
- Diffuse ray reflection
- Register #hits per patch
Iterative Methods
15
(Cohen & Wallace)
Meshing
Reference solution Uniform subdivision
finecoarse
16
Adaptive Subdivision
solution adaptive subdivision
17
Subdivision along illumination discontinuities
Discontinuity Meshing
18
Discontinuity Meshing - Example
19
Radiosity determines patch color at patch center
For Gouraud shading values at vertices needed
Radiosity and Shading
20
B1
B2
B3
B4
B1
B2
B4
B1
(B1+B2)/2
(B1+B2 +B3)/3
Use many virtual point lights (VPLs)
No explicit meshing needed
1. Create VPLs- Shoot photons
- Random walk
2. Render- For each VPL
- Render with shadows
Instant Radiosty
Images courtesy of M. Hasan 21
Radiosity - DEMO
22
Radiosity Methods MPG 15.10- Assumptions
- Basic principle
- Radiosity equation
- Iterative methods
- Meshing
- Instant radiosity
Outline
23
Questions?