a practical analytic single scattering model for real time rendering
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 PresentationTRANSCRIPT
![Page 1: A Practical Analytic Single Scattering Model for Real Time Rendering](https://reader035.vdocument.in/reader035/viewer/2022081514/5681680f550346895ddd9bcd/html5/thumbnails/1.jpg)
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
![Page 2: A Practical Analytic Single Scattering Model for Real Time Rendering](https://reader035.vdocument.in/reader035/viewer/2022081514/5681680f550346895ddd9bcd/html5/thumbnails/2.jpg)
Clear Day Foggy Day
Light Transport in Scattering Media
Clear Day Foggy Day
Point Source
Surface PointViewer
Direct Transmission
Scattered (glows)
![Page 3: A Practical Analytic Single Scattering Model for Real Time Rendering](https://reader035.vdocument.in/reader035/viewer/2022081514/5681680f550346895ddd9bcd/html5/thumbnails/3.jpg)
Our Technical Contributions
Explicit compact Airlight formula Explicit Surface Radiance formula
- Accurate
- Simple fragment shader
- Fully interactiveAssumptions: Isotropic point light sources Homogenous media Single scattering No volumetric shadows
![Page 4: A Practical Analytic Single Scattering Model for Real Time Rendering](https://reader035.vdocument.in/reader035/viewer/2022081514/5681680f550346895ddd9bcd/html5/thumbnails/4.jpg)
20)(deIk
d
xd
edeIk
20)(
d
The Airlight IntegralPoint Source, s
Surface Point, pViewer, v
svD
x vpD
vpD
: scattering coefficient of the medium
The Airlight Integral: 20
deI d
![Page 5: A Practical Analytic Single Scattering Model for Real Time Rendering](https://reader035.vdocument.in/reader035/viewer/2022081514/5681680f550346895ddd9bcd/html5/thumbnails/5.jpg)
The Airlight IntegralPoint Source, s
Surface Point, pViewer, v
svD
: scattering coefficient of the medium
The Airlight Integral: xd
edeIk
20)(
![Page 6: A Practical Analytic Single Scattering Model for Real Time Rendering](https://reader035.vdocument.in/reader035/viewer/2022081514/5681680f550346895ddd9bcd/html5/thumbnails/6.jpg)
The Airlight IntegralPoint Source, s
Surface Point, pViewer, v
svD
: scattering coefficient of the medium
The Airlight Integral: xd
edeIk
20)(
![Page 7: A Practical Analytic Single Scattering Model for Real Time Rendering](https://reader035.vdocument.in/reader035/viewer/2022081514/5681680f550346895ddd9bcd/html5/thumbnails/7.jpg)
The Airlight IntegralPoint Source, s
Surface Point, pViewer, v
svD
: scattering coefficient of the medium
The Airlight Integral: xd
edeIk
20)(
![Page 8: A Practical Analytic Single Scattering Model for Real Time Rendering](https://reader035.vdocument.in/reader035/viewer/2022081514/5681680f550346895ddd9bcd/html5/thumbnails/8.jpg)
The Airlight IntegralPoint Source, s
Surface Point, pViewer, v
svD
: scattering coefficient of the medium
The Airlight Integral: xd
edeIk
20)(
![Page 9: A Practical Analytic Single Scattering Model for Real Time Rendering](https://reader035.vdocument.in/reader035/viewer/2022081514/5681680f550346895ddd9bcd/html5/thumbnails/9.jpg)
The Airlight IntegralPoint Source, s
Surface Point, pViewer, v
svD
vpD
: scattering coefficient of the medium
The Airlight Integral:
vpD
xd
dxedeIk
02
0)(
![Page 10: A Practical Analytic Single Scattering Model for Real Time Rendering](https://reader035.vdocument.in/reader035/viewer/2022081514/5681680f550346895ddd9bcd/html5/thumbnails/10.jpg)
The Airlight IntegralPoint Source, s
Surface Point, pViewer, v
svD
The Airlight Integral:
vpD
: scattering coefficient of the medium
vpD
xd
dxedeIk
02
0)(
),,,( vpsvairlight DDL
![Page 11: A Practical Analytic Single Scattering Model for Real Time Rendering](https://reader035.vdocument.in/reader035/viewer/2022081514/5681680f550346895ddd9bcd/html5/thumbnails/11.jpg)
The Airlight Model
airlightL
Originally 4D: , , , svD vpD
0A [ 1A , 2 )]1A )
sincos
arctan21
4 sv
svvp
TTT
,(F (F
Point Source, s
Surface Point, pViewer, v
svD
vpD
![Page 12: A Practical Analytic Single Scattering Model for Real Time Rendering](https://reader035.vdocument.in/reader035/viewer/2022081514/5681680f550346895ddd9bcd/html5/thumbnails/12.jpg)
airlightL
Originally 4D: , , , svD vpD
The Airlight Model
sin2
cos0
2
sv
T
TeI sv
sinsvT
0A [ 1A , 2 )]1A )
sincos
arctan21
4 sv
svvp
TTT
,(F (F
Point Source, s
Surface Point, pViewer, v
svD
vpD
![Page 13: A Practical Analytic Single Scattering Model for Real Time Rendering](https://reader035.vdocument.in/reader035/viewer/2022081514/5681680f550346895ddd9bcd/html5/thumbnails/13.jpg)
The Airlight Model
airlightL
Originally 4D: , , , svD vpD
0A [ 1A , 2 )]1A )
sincos
arctan21
4 sv
svvp
TTT
,(F (F
Point Source, s
Surface Point, pViewer, v
svD
vpD
![Page 14: A Practical Analytic Single Scattering Model for Real Time Rendering](https://reader035.vdocument.in/reader035/viewer/2022081514/5681680f550346895ddd9bcd/html5/thumbnails/14.jpg)
Special Function F
v
duvuF0
]tanexp[),(
Well behaved and purely numerical 2D function. Pre-computed once for all and stored as a 2D texture.
![Page 15: A Practical Analytic Single Scattering Model for Real Time Rendering](https://reader035.vdocument.in/reader035/viewer/2022081514/5681680f550346895ddd9bcd/html5/thumbnails/15.jpg)
Shader Code for Airlight Modelfloat 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 )
sincos
arctan21
4 sv
svvp
TTT
,(F (F
![Page 16: A Practical Analytic Single Scattering Model for Real Time Rendering](https://reader035.vdocument.in/reader035/viewer/2022081514/5681680f550346895ddd9bcd/html5/thumbnails/16.jpg)
Shader Code for Airlight Modelfloat 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 )
sincos
arctan21
4 sv
svvp
TTT
,(F (F
![Page 17: A Practical Analytic Single Scattering Model for Real Time Rendering](https://reader035.vdocument.in/reader035/viewer/2022081514/5681680f550346895ddd9bcd/html5/thumbnails/17.jpg)
Shader Code for Airlight Modelfloat 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 )
sincos
arctan21
4 sv
svvp
TTT
,(F (F
![Page 18: A Practical Analytic Single Scattering Model for Real Time Rendering](https://reader035.vdocument.in/reader035/viewer/2022081514/5681680f550346895ddd9bcd/html5/thumbnails/18.jpg)
Shader Code for Airlight Modelfloat 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 )
sincos
arctan21
4 sv
svvp
TTT
,(F (F
![Page 19: A Practical Analytic Single Scattering Model for Real Time Rendering](https://reader035.vdocument.in/reader035/viewer/2022081514/5681680f550346895ddd9bcd/html5/thumbnails/19.jpg)
Shader Code for Airlight Modelfloat 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 )
sincos
arctan21
4 sv
svvp
TTT
,(F (F
![Page 20: A Practical Analytic Single Scattering Model for Real Time Rendering](https://reader035.vdocument.in/reader035/viewer/2022081514/5681680f550346895ddd9bcd/html5/thumbnails/20.jpg)
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
![Page 21: A Practical Analytic Single Scattering Model for Real Time Rendering](https://reader035.vdocument.in/reader035/viewer/2022081514/5681680f550346895ddd9bcd/html5/thumbnails/21.jpg)
Airlight Demo
Demo
![Page 22: A Practical Analytic Single Scattering Model for Real Time Rendering](https://reader035.vdocument.in/reader035/viewer/2022081514/5681680f550346895ddd9bcd/html5/thumbnails/22.jpg)
The Surface Radiance ModelPoint Source, s
Surface Point, p
Viewer, v n̂BRDF
![Page 23: A Practical Analytic Single Scattering Model for Real Time Rendering](https://reader035.vdocument.in/reader035/viewer/2022081514/5681680f550346895ddd9bcd/html5/thumbnails/23.jpg)
2D:F
The Surface Radiance ModelPoint Source, s
Surface Point, p
Viewer, v n̂BRDF
1D function on i2D : Lambertian, Phong
nG0G: ,
iiairlightsurface dBRDFLL cos
![Page 24: A Practical Analytic Single Scattering Model for Real Time Rendering](https://reader035.vdocument.in/reader035/viewer/2022081514/5681680f550346895ddd9bcd/html5/thumbnails/24.jpg)
Special Function G
![Page 25: A Practical Analytic Single Scattering Model for Real Time Rendering](https://reader035.vdocument.in/reader035/viewer/2022081514/5681680f550346895ddd9bcd/html5/thumbnails/25.jpg)
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
TkIL
![Page 26: A Practical Analytic Single Scattering Model for Real Time Rendering](https://reader035.vdocument.in/reader035/viewer/2022081514/5681680f550346895ddd9bcd/html5/thumbnails/26.jpg)
Shader Code for Surface Radiance
)',(2
20
sspnsp
ssurface TG
TkIL
float SurfaceRadiance( )
{
float4 G = texRECT(G_20, Tsp, thetas);
return Ks*Io*beta/(2*Dsp*PI)*G;
}
![Page 27: A Practical Analytic Single Scattering Model for Real Time Rendering](https://reader035.vdocument.in/reader035/viewer/2022081514/5681680f550346895ddd9bcd/html5/thumbnails/27.jpg)
Shader Code for Surface Radiance
)',(2
20
sspnsp
ssurface TG
TkIL
float SurfaceRadiance( )
{
float4 G = texRECT(G_20, Tsp, thetas);
return Ks*Io*beta/(2*Dsp*PI)*G;
}
![Page 28: A Practical Analytic Single Scattering Model for Real Time Rendering](https://reader035.vdocument.in/reader035/viewer/2022081514/5681680f550346895ddd9bcd/html5/thumbnails/28.jpg)
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, v n̂BRDF
![Page 29: A Practical Analytic Single Scattering Model for Real Time Rendering](https://reader035.vdocument.in/reader035/viewer/2022081514/5681680f550346895ddd9bcd/html5/thumbnails/29.jpg)
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, v n̂BRDF
![Page 30: A Practical Analytic Single Scattering Model for Real Time Rendering](https://reader035.vdocument.in/reader035/viewer/2022081514/5681680f550346895ddd9bcd/html5/thumbnails/30.jpg)
Lambertian and Phong Spheres
Lambertian Phong=10 Phong=20
Clear
Day
Foggy Day
![Page 31: A Practical Analytic Single Scattering Model for Real Time Rendering](https://reader035.vdocument.in/reader035/viewer/2022081514/5681680f550346895ddd9bcd/html5/thumbnails/31.jpg)
The Complete Model
airlightsurfaceT LLeL vp
Airlight Model
Surface Radiance Model 2 LookupsF2 Lookups andnG0G
![Page 32: A Practical Analytic Single Scattering Model for Real Time Rendering](https://reader035.vdocument.in/reader035/viewer/2022081514/5681680f550346895ddd9bcd/html5/thumbnails/32.jpg)
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
![Page 33: A Practical Analytic Single Scattering Model for Real Time Rendering](https://reader035.vdocument.in/reader035/viewer/2022081514/5681680f550346895ddd9bcd/html5/thumbnails/33.jpg)
Demo: Complex Geometry
Demo
![Page 34: A Practical Analytic Single Scattering Model for Real Time Rendering](https://reader035.vdocument.in/reader035/viewer/2022081514/5681680f550346895ddd9bcd/html5/thumbnails/34.jpg)
Complex Lighting and Material
Rendering time is linear in the number of lights.
Surface Point, p
Viewer, vsvD
vpD
n̂
BRDF
![Page 35: A Practical Analytic Single Scattering Model for Real Time Rendering](https://reader035.vdocument.in/reader035/viewer/2022081514/5681680f550346895ddd9bcd/html5/thumbnails/35.jpg)
Point Spread Function Assume equidistant point sources Scattering is essentially Point Spread Function (PSF).
PSFAngles
Intensity
Input Output
Angles
Intensity
Intensity
Angular Component Amplitude Component
![Page 36: A Practical Analytic Single Scattering Model for Real Time Rendering](https://reader035.vdocument.in/reader035/viewer/2022081514/5681680f550346895ddd9bcd/html5/thumbnails/36.jpg)
Point Spread Function Assume equidistant point sources Scattering is essentially Point Spread Function (PSF).
PSFAngles
Intensity
Input Output
Angles
Intensity
Intensity
Angular Component Amplitude ComponentTsv*exp[-Tsv] * Pre-convolved Environment Map
![Page 37: A Practical Analytic Single Scattering Model for Real Time Rendering](https://reader035.vdocument.in/reader035/viewer/2022081514/5681680f550346895ddd9bcd/html5/thumbnails/37.jpg)
Convolution with PSFBRDF Environment Map
Clear Day
Foggy Day
![Page 38: A Practical Analytic Single Scattering Model for Real Time Rendering](https://reader035.vdocument.in/reader035/viewer/2022081514/5681680f550346895ddd9bcd/html5/thumbnails/38.jpg)
Demo: PSF for Complex Lighting
Demo
![Page 39: A Practical Analytic Single Scattering Model for Real Time Rendering](https://reader035.vdocument.in/reader035/viewer/2022081514/5681680f550346895ddd9bcd/html5/thumbnails/39.jpg)
50fps 40fps
Summary
Analytic Airlight Model
An OpenGL-Like Practical Real-Time Rendering Technique:
![Page 40: A Practical Analytic Single Scattering Model for Real Time Rendering](https://reader035.vdocument.in/reader035/viewer/2022081514/5681680f550346895ddd9bcd/html5/thumbnails/40.jpg)
Summary
Analytic Airlight Model Analytic Surface Radiance Model
An OpenGL-Like Practical Real-Time Rendering Technique:
50fps 60fps
![Page 41: A Practical Analytic Single Scattering Model for Real Time Rendering](https://reader035.vdocument.in/reader035/viewer/2022081514/5681680f550346895ddd9bcd/html5/thumbnails/41.jpg)
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
![Page 42: A Practical Analytic Single Scattering Model for Real Time Rendering](https://reader035.vdocument.in/reader035/viewer/2022081514/5681680f550346895ddd9bcd/html5/thumbnails/42.jpg)
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.
![Page 43: A Practical Analytic Single Scattering Model for Real Time Rendering](https://reader035.vdocument.in/reader035/viewer/2022081514/5681680f550346895ddd9bcd/html5/thumbnails/43.jpg)
Thanks for Listening!Maya Plug-in, 2D tables, and Shader code:
http://www.cs.columbia.edu/~bosun/research.htm
![Page 44: A Practical Analytic Single Scattering Model for Real Time Rendering](https://reader035.vdocument.in/reader035/viewer/2022081514/5681680f550346895ddd9bcd/html5/thumbnails/44.jpg)
The End
![Page 45: A Practical Analytic Single Scattering Model for Real Time Rendering](https://reader035.vdocument.in/reader035/viewer/2022081514/5681680f550346895ddd9bcd/html5/thumbnails/45.jpg)
The End