rendering equation(渲染方程)
合集下载
相关主题
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
n Not practical for rendering equation
Monte Carlo methods
n Distributed ray tracing
n
Randomly traces ray from the eye
n Path tracing n Bidirectional ray tracing n Photon tracing
CS348B Lecture 12
Pat Hanrahan, Spring 2000
To The Rendering Equation Questions
1. How is light measured? 2. How is the spatial distribution of light energy described? 3. How is reflection from a surface characterized? 4. What are the conditions for equilibrium flow of light in an environment?
1 Be = Be + KBe + K 2 Be + K I−K = ( Be + K ( Be + K ( Be + K
B1 = Be B2 = Be + KB 1 B3 = Be + KB 2 L Bn = Be + KB n −1
CS348B Lecture 12 Pat Hanrahan, Spring 2000
CS348B Lecture 12 Pat Hanrahan, Spring 2000
Classic Ray Tracing
From Heckbert
Forward (from eye): E S* (D|G) L
CS348B Lecture 12 Pat Hanrahan, Spring 2000
n
Direct ( local ) illumination
n Light directly from light sources n No shadows
n
Indirect ( global) illumination
n Shadows due to blocking light n Interreflections n Complete accounting of light energy
M2
Sum over all paths of length k
CS348B Lecture 12
Pat Hanrahan, Spring 2000
Page 7
Two Types of Operators
1. Transport operator
L ( x,ω ) = T o L( x′,ω ′) = L( x * ( x,−ω ),ω )
CS348B Lecture 12
Pat Hanrahan, Spring 2000
Page 1
The Grand Scheme
Light and Radiometry
Energy Balance
Surface Rendering Equation
Volume Rendering Equation
f ( x) = g ( x) + ∫ k ( x, x′ ) f ( x′) dx′
CS348B Lecture 12
Pat Hanrahan, Spring 2000
Page 5
Linear Operators
Linear operators act on functions like matrices act on vectors
Neumann series
1 =1 + x + x2 + K 1− x
1 = I + K + K 2 +K I−K
CS348B Lecture 12 Pat Hanrahan, Spring 2000
Page 6
Formal Solution of Integral Equations
Successive Approximation
M
2
Integrate over All surfaces
Geometry term
G ( x , x' )=
′ cosθ i cosθ o ′ 2 V (x, x ) x − x′
Visibility term
visible 1 V ( x, x′) = 0 not visible
CS348B Lecture 12
The total light energy put into the system must equal the energy leaving the system (usually, via heat).
n Micro level
Φ o − Φi = Φ e − Φ a
The energy flowing into a small region of phase space must equal the energy flowing out.
Page 8
Photon Paths
From Heckbert
CS348B Lecture 12
Pat Hanrahan, Spring 2000
How to Solve It?
Finite element methods
n Classic radiosity
n n n
Mesh surfaces Piecewise constant basis functions Solve matrix equation
2. Scattering operator
L ( x,ω o ) = S o L( x ,ω i ) =
Rendering equation
2 H+
∫ f r ( x,ωi → ωo ) Li ( x,ωi ) cosθi dωi
( I − K ) o L = ( I − S o T ) o L = Le
Pat Hanrahan, Spring 2000
Page 4
The Radiosity Equation
Assume diffuse reflection 1. f r ( x, ω i → ω o ) = f r ( x ) 2. Lo ( x, ω ) = B( x ) / π
⇒
ρ ( x ) = π f r ( x)
B ( x ) − E ( x ) = Be − Ea Lo ( x,ω ) − Li ( x,ω ) = Le ( x,ω ) − La ( x ω )
CS348B Lecture 12 Pat Hanrahan, Spring 2000
Page 2
Surface Balance Equation
CS348B Lecture 12
Pat Hanrahan, Spring 2000
Formal Solution of Integral Equations
Integral equation
B = Be + K o B ( I − K ) o B = Be
Formal solution
B = ( I − K ) −1 o Be
CS348B Lecture 12 Pat Hanrahan, Spring 2000
Page 9
θ dA
x − x′
cos θ dω =
cosθ cos θ ′ dA′ 2 x − x′
CS348B Lecture 12
Pat Hanrahan, Spring 2000
The Rendering Equation
Lo ( x, ω o ) = Le ( x, ω o ) +
∫ fr ( x, ω i ( x − x′ ) → ω o )G ( x, x′)Lo ( x′, ω ′o ( x − x′)) dA′
B ( x ) = Be ( x ) + ρ ( x ) E ( x ) B ( x) = Be ( x ) + ρ ( x) ∫ F ( x, x ′)B ( x′ ) dA′
M2
F ( x, x′) =
G( x, x′) π
Form factor: The percentage of light leaving dA’ that arrives at dA
2 H+
ωi
+ ∫ f t ( x,ω i → ω o ) Li ( x,ω i )cosθ i′dω i
2 H−
2 H− ( x) ω i • n( x) > 0 2 H+ ( x) ω i • n( x) < 0
CS348B Lecture 12
Pat Hanrahan, Spring 2000
CS348B Lecture 12 Pat Hanrahan, Spring 2000
Integral Equations
Integral equations of the 1 st kind
f ( x) = ∫ k ( x , x′) g ( x′) dx′
Integral equations of the 2 nd kind
Formal Solution
Formal solution to the rendering equation
L ( x, ω ) = ∑
∞
k=0 M 2 M 2
∫ ∫K ∫ K ( xo , x1 , x2 )L K ( xk , x,ω ) Le ( x0 , x1 ) dA0 dA1 K dAk
[outgoing] = [ emitted] + [ reflected] + [ transmitted]
H ωo H
2 − 2 +
Lo ( x,ω o ) = Le ( x,ω o ) + Lr ( x,ω o) + Lt ( x ,ω o )
n ωi
= Le ( x,ω o ) + ∫ f r ( x,ω i → ω o ) Li ( x,ω i )cosθ i′dω i
Radiosity Equation
CS348B Lecture 12 Pat Hanrahan, Spring 2000
Balance Equation
Accountability [outgoing] - [incoming ] = [ emitted] - [absorbed] n Macro level
h( x ) = ( K o f )( x ) ≡ ∫ k ( x, x′) f ( x′) dx′
They are linear in that
( K o ( af + bg )) = aK o f + bK o g
Other types of linear operators, e.g. derivatives, integro-differential operators
The Rendering Equation
Couple balance equations
Li ( x,ω ) = Lo ( x* ( x,−ω )),ω )
Lo ( x′,ω ′ ) ω ′
x′ = x* ( x,−ω )
n
Li ( x,ω )
Lo ( x, ω o ) = Le ( x, ω o ) +
Illumination Models
To evaluate the reflection equation the illumination must be specified or computed.
Lr ( x ,ω r ) =
H2
∫ f r ( x ,ωi → ωr ) Li ( x,ωi )cosθi′dωi
n′
x
∫ f r ( x,ω i → ω o )Lo ( x
2 H+
*
( x ,−ω i ),ω i ) cosθ i dω i
CS348B Lecture 12
Pat Hanrahan, Spring 2000
Page 3
Two Point Geometry
θ′ x′
cos θ ′ dω = dA′ 2 x − x′