Upload
geona
View
26
Download
1
Tags:
Embed Size (px)
DESCRIPTION
A Practical Analytic Single Scattering Model for Real Time Rendering. Bo Sun Columbia University Ravi Ramamoorthi Columbia University Srinivasa Narasimhan Carnegie Mellon University Shree Nayar Columbia University. - PowerPoint PPT Presentation
Citation preview
A Practical Analytic Single Scattering Model for Real Time Rendering
Bo Sun Columbia University Ravi Ramamoorthi Columbia UniversitySrinivasa Narasimhan Carnegie Mellon University Shree Nayar Columbia University
Sponsors: ONR, NSF
Clear Day Foggy Day
Light Transport in Scattering Media
Clear Day Foggy Day
Point Source
Surface PointViewer
Direct T
ransmiss
ion
Scattered (glows)
Our Technical Contributions
Explicit compact Airlight formula
Explicit Surface Radiance formula
- Accurate
- Simple fragment shader
- Fully interactive
Assumptions:
Isotropic point light sources
Homogenous media
Single scattering
No volumetric shadows
20)(d
eIk
d
xd
ed
eIk
2
0)(
d
The Airlight IntegralPoint Source, s
Surface Point, pViewer, v
svD
x vpD
vpD
: scattering coefficient of the medium
The Airlight Integral:2
0
d
eI d
The Airlight IntegralPoint Source, s
Surface Point, pViewer, v
svD
: scattering coefficient of the medium
The Airlight Integral: xd
ed
eIk
2
0)(
The Airlight IntegralPoint Source, s
Surface Point, pViewer, v
svD
: scattering coefficient of the medium
The Airlight Integral: xd
ed
eIk
2
0)(
The Airlight IntegralPoint Source, s
Surface Point, pViewer, v
svD
: scattering coefficient of the medium
The Airlight Integral: xd
ed
eIk
2
0)(
The Airlight IntegralPoint Source, s
Surface Point, pViewer, v
svD
: scattering coefficient of the medium
The Airlight Integral: xd
ed
eIk
2
0)(
The Airlight IntegralPoint Source, s
Surface Point, pViewer, v
svD
vpD
: scattering coefficient of the medium
The Airlight Integral:
vpD
xd
dxed
eIk
02
0)(
The Airlight IntegralPoint Source, s
Surface Point, pViewer, v
svD
The Airlight Integral:
vpD
: scattering coefficient of the medium
vpD
xd
dxed
eIk
02
0)(
),,,( vpsvairlight DDL
The Airlight Model
airlightL
Originally 4D: , , , svD vpD
0A [ 1A ,2
)]1A )
sin
cosarctan2
1
4 sv
svvp
T
TT ,(F (F
Point Source, s
Surface Point, pViewer, v
svD
vpD
airlightL
Originally 4D: , , , svD vpD
The Airlight Model
sin2
cos0
2
sv
T
T
eI sv
sinsvT
0A [ 1A ,2
)]1A )
sin
cosarctan2
1
4 sv
svvp
T
TT ,(F (F
Point Source, s
Surface Point, pViewer, v
svD
vpD
The Airlight Model
airlightL
Originally 4D: , , , svD vpD
0A [ 1A ,2
)]1A )
sin
cosarctan2
1
4 sv
svvp
T
TT ,(F (F
Point Source, s
Surface Point, pViewer, v
svD
vpD
Special Function F
v
duvuF0
]tanexp[),(
Well behaved and purely numerical 2D function.
Pre-computed once for all and stored as a 2D texture.
Shader Code for Airlight Model
float AirLight( )
{
float u = A1(beta, Dsv, gammasv);
float v1 = 0.25*PI+0.5*atan((DvpDsv*cos(gammasv))/(Dsv*sin(gammasv)));
float v2 = 0.5*gammasv;
float4 f_1=texRECT(F, v1, u);
float4 f_2=texRECT(F, v2, u);
return A0(lightIntensity, beta, Dsv, gammasv)*(f_1.x-f_2.x);
}
0A [ 1A ,2
)]1A )
sin
cosarctan2
1
4 sv
svvp
T
TT ,(F (F
Shader Code for Airlight Model
float AirLight( )
{
float u = A1(beta, Dsv, gammasv);
float v1 = 0.25*PI+0.5*atan((DvpDsv*cos(gammasv))/(Dsv*sin(gammasv)));
float v2 = 0.5*gammasv;
float4 f_1=texRECT(F, v1, u);
float4 f_2=texRECT(F, v2, u);
return A0(lightIntensity, beta, Dsv, gammasv)*(f_1.x-f_2.x);
}
0A [ 1A ,2
)]1A )
sin
cosarctan2
1
4 sv
svvp
T
TT ,(F (F
Shader Code for Airlight Model
float AirLight( )
{
float u = A1(beta, Dsv, gammasv);
float v1 = 0.25*PI+0.5*atan((DvpDsv*cos(gammasv))/(Dsv*sin(gammasv)));
float v2 = 0.5*gammasv;
float4 f_1=texRECT(F, v1, u);
float4 f_2=texRECT(F, v2, u);
return A0(lightIntensity, beta, Dsv, gammasv)*(f_1.x-f_2.x);
}
0A [ 1A ,2
)]1A )
sin
cosarctan2
1
4 sv
svvp
T
TT ,(F (F
Shader Code for Airlight Model
float AirLight( )
{
float u = A1(beta, Dsv, gammasv);
float v1 = 0.25*PI+0.5*atan((DvpDsv*cos(gammasv))/(Dsv*sin(gammasv)));
float v2 = 0.5*gammasv;
float4 f_1=texRECT(F, v1, u);
float4 f_2=texRECT(F, v2, u);
return A0(lightIntensity, beta, Dsv, gammasv)*(f_1.x-f_2.x);
}
0A [ 1A ,2
)]1A )
sin
cosarctan2
1
4 sv
svvp
T
TT ,(F (F
Shader Code for Airlight Model
float AirLight( )
{
float u = A1(beta, Dsv, gammasv);
float v1 = 0.25*PI+0.5*atan((DvpDsv*cos(gammasv))/(Dsv*sin(gammasv)));
float v2 = 0.5*gammasv;
float4 f_1=texRECT(F, v1, u);
float4 f_2=texRECT(F, v2, u);
return A0(lightIntensity, beta, Dsv, gammasv)*(f_1.x-f_2.x);
}
0A [ 1A ,2
)]1A )
sin
cosarctan2
1
4 sv
svvp
T
TT ,(F (F
Implementation Choices for Airlight
1. 64x64 floating point texture for F table
2. Add a skybox to invoke vertex/pixel shader to compute Airlight.
Nearest Neighbor
Bilinear Interpolation
Airlight Demo
Demo
The Surface Radiance Model
Point Source, s
Surface Point, p
Viewer, vn̂
BRDF
2D:F
The Surface Radiance Model
Point Source, s
Surface Point, p
Viewer, vn̂
BRDF
1D function on i2D : Lambertian, Phong
nG0G: ,
iiairlightsurface dBRDFLL cos
Special Function G
Shader Code for Surface Radiance
float SurfaceRadiance( )
{
float4 G = texRECT(G_20, Tsp, thetas);
return Ks*Io*beta/(2*Dsp*PI)*G;
}
)',(2
20
sspnsp
ssurface TG
T
kIL
Shader Code for Surface Radiance
)',(2
20
sspnsp
ssurface TG
T
kIL
float SurfaceRadiance( )
{
float4 G = texRECT(G_20, Tsp, thetas);
return Ks*Io*beta/(2*Dsp*PI)*G;
}
Shader Code for Surface Radiance
)',(2
20
sspnsp
ssurface TG
T
kIL
float SurfaceRadiance( )
{
float4 G = texRECT(G_20, Tsp, thetas);
return Ks*Io*beta/(2*Dsp*PI)*G;
}
Implementation Choices for Surface Radiance
1. Need to add radiance contribution from attenuated direct lighting.
2. Attenuate the final radiance according to distance to the camera.
Point Source, s
Surface Point, p
Viewer, vn̂
BRDF
Implementation Choices for Surface Radiance
1. Need to add radiance contribution from attenuated direct lighting.
2. Attenuate the final radiance according to distance to the camera.
Point Source, s
Surface Point, p
Viewer, vn̂
BRDF
Lambertian and Phong Spheres
Lambertian Phong=10 Phong=20
Clear
Day
Foggy Day
The Complete Model
airlightsurfaceT LLeL vp
Airlight Model
Surface Radiance Model
2 LookupsF2 Lookups andnG0G
The Complete Model
Texture lookups Analytic expression
Maya Plug-in available from our website.
NIS 4 IS8
Image size
Lights
Terms to approximate the phase function
airlightsurfaceT LLeL vp
Airlight Model
Surface Radiance Model
2 LookupsF2 Lookups andnG0G
Demo: Complex Geometry
Demo
Complex Lighting and Material
Rendering time is linear in the number of lights.
Surface Point, p
Viewer, v
svD
vpD
n̂
BRDF
Point Spread Function
Assume equidistant point sources
Scattering is essentially Point Spread Function (PSF).
PSF
Angles
Inte
nsi
ty
Input Output
Angles
Inte
nsi
ty
Inte
nsi
ty
Angular Component Amplitude Component
Point Spread Function
Assume equidistant point sources
Scattering is essentially Point Spread Function (PSF).
PSF
Angles
Inte
nsi
ty
Input Output
Angles
Inte
nsi
ty
Inte
nsi
ty
Angular Component Amplitude ComponentTsv*exp[-Tsv] * Pre-convolved Environment Map
Convolution with PSFBRDF Environment Map
Clear Day
Foggy Day
Demo: PSF for Complex Lighting
Demo
50fps 40fps
Summary
Analytic Airlight Model
An OpenGL-Like Practical Real-Time Rendering Technique:
Summary
Analytic Airlight Model
Analytic Surface Radiance Model
An OpenGL-Like Practical Real-Time Rendering Technique:
50fps 60fps
Summary
Analytic Airlight Model
Analytic Surface Radiance Model
PSF for Complex Lighting and Natural Material
An OpenGL-Like Practical Real-Time Rendering Technique:
100fps 20fps
Acknowledgement
R. Wang, J. Tran and D. Luebke for the PRT code.
S. Premoze for the Monte Carlo simulation code.
P. Debevec for the light probes.
W. Matusik for the tabulated BRDF.
Supported by a Columbia University Presidential Fellowship, an ONR Grant, an NSF Grant, an NSF CAREER award, and equipment donations from Intel and NVIDIA.
Thanks for Listening!Maya Plug-in, 2D tables, and Shader code:
http://www.cs.columbia.edu/~bosun/research.htm
The End
The End