Download **** 1 - Tri-ace research

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Wave optics based
glare generation techniques
Real-time Rendering of Physically Based Optical Effects in Theory and Practice
Masanori KAKIMOTO
Tokyo University of Technology
Wave optics based glare generation techniques
Table of Contents
•
•
•
•
•
•
Introduction
Related work
Fundamental theory
Glare pattern image generation
Implementation and examples
Conclusion
Real-time Rendering of Physically Based Optical Effects in Theory and Practice
Wave optics based glare generation techniques
INTRODUCTION
Introduction
• Vast majority of computer graphics theories
are based upon geometrical optics
• ~1% taking wave optics into account
• If you need reality for glare effects,
– Then wave optics may help
• Computation power today is advantageous
Wave-Related Phenomena and Effects
• Diffraction
– Glare
– Airy disc
• Interference
– Surface coating
– Thin film color effects
• Polarization
– Complex reflection
– Image dehazing
Requires wave optics
Cannot simulate with
extended rays
Can be simulated w/
extended ray theories
[CookTorrance1981],
[Gondek1994], [Wolff1999],
[Schechner 2001]
Wave optics topics in this course focus on diffraction
An Example of Glare
A Simple Experiment of Glare (1)
A pen-light used for
the experiment
A direct snapshot of
the light
A Simple Experiment of Glare (2)
False eyelashes
attached
A direct snapshot of
the light
A Simple Experiment of Glare (3)
Eyelashes rotated
90 degrees
A direct snapshot of
the light
Real-time Rendering of Physically Based Optical Effects in Theory and Practice
Wave optics based glare generation techniques
RELATED WORK
Early Work for Glare Effect
• Cross filter lens flare effect [Shinya et al.1989]
• Glare by eyelashes for night driving scene
[Nakamae et al. 1990]
Nakamae, E., K. Kaneda, T. Okamoto, and
T. Nishita: A Lighting Model Aiming at Drive
Simulators, in Proc. ACM SIGGRAPH ’90,
pp. 395–404, 1990.
Early Work for Glare (cont’d)
• Glare billboard [Rokita 1993]
• Eye structure analysis and glare filter
compositor [Spencer et al. 1995]
• Glare filter on HDR images [Debevec et al. 1997]
Real-Time Techniques for Glare
• Real-time environment lighting [Mitchell 2002]
• Racing game implementation [Kawase 2002, 2003]
©2002 BUNKASHA PUBLISHING CO.,LTD.
Physically-Based Aproaches
• Glare caused by Fraunhofer diffraction
[Kakimoto et al. 2004, 2005]
• Inside-the-eye Fresnel diffraction
[Ritschel et al. 2009]
• Real-time lens flare [Hullin et al. 2011]
Real-time Rendering of Physically Based Optical Effects in Theory and Practice
Wave optics based glare generation techniques
FUNDAMENTAL THEORY
Diffraction – A Major Cause of Glare
Diffraction
Geometrical optics
Wave optics
Diffraction
Diffraction – A Major Cause of Glare
Huygens-Fresnel Principle
Accounts for Diffraction
• Waves propagate concentrically,
at EVERYWHERE on the wave
front
• Envelope curve of the
secondary waves form the next
wave front
An Analysis of Diffraction
Incident
light
Aperture
Wave front Observation screen
A Model for Diffraction
Aperture S
𝑦𝑜
𝑡 𝑥𝑜 , 𝑦𝑜 =
1,
0,
inside 𝑆
outside 𝑆
𝑦𝑓
𝑥𝑜
𝑃𝑜
𝑟=
𝑅 2 + 𝑥𝑓 − 𝑥𝑜
2
+ 𝑦𝑓 − 𝑦𝑜
2
𝑥𝑓
𝑈𝑓 𝑥𝑓 , 𝑦𝑓
𝑅
Object
region
𝑃𝑓
𝜆: wave length
Observation
region
:Complex wave
amplitude at
point 𝑥𝑓 , 𝑦𝑓
See Appendix for the Analysis
Fraunhofer Diffraction
𝑥𝑓 𝑦𝑓
𝐼𝑓 𝜆𝑅, 𝜆𝑅
2
ℱ 𝑡𝑜 𝑥𝑜 , 𝑦𝑜
2
𝑦𝑜
𝑦𝑓
𝑥𝑜
𝑥𝑓
𝑅
𝑡 𝑥𝑜 , 𝑦𝑜
𝐴
=
𝜆𝑅
𝐼𝑓 𝑥𝑓 , 𝑦𝑓
𝐼𝑓 ≡ 𝑈𝑓
𝐴
ℱ∙
𝑅
2
: Wave intensity
: Amplitude of incident light
: Fourier transform operator
: Sufficiently large distance
𝑅 ≫ 50m for 5mm2 aperture
size and λ = 500nm
Fraunhofer Approximation in a Lens System
𝑥𝑓 𝑦𝑓
𝐼𝑓 𝜆𝑓, 𝜆𝑓
𝐴
=
𝜆𝑓
The diffraction image through a
lens system can be denoted using
a 2D Fourier transform of the
object that causes diffraction.
[Goodman 1968]
2
2
ℱ 𝑡𝑜 𝑥𝑜 , 𝑦𝑜
𝑡𝑜 𝑥𝑜 , 𝑦𝑜
𝜆
𝑑𝑜
𝐼𝑓 𝑥𝑓 , 𝑦𝑓
𝑓
Real-time Rendering of Physically Based Optical Effects in Theory and Practice
Wave optics based glare generation techniques
GLARE PATTERN
IMAGE GENERATION
Diffraction w.r.t. Wave Length
𝑥𝑓 𝑦𝑓
𝐼𝑓 𝜆𝑓, 𝜆𝑓
𝜆𝑅
𝐼𝑓
𝑥𝑓 𝑦𝑓
,
𝜆𝑅 𝑓 𝜆𝑅 𝑓
𝐴
=
𝜆𝑓
𝜆𝐺
2
𝐼𝑓
ℱ 𝑡𝑜 𝑥𝑜 , 𝑦𝑜
𝑥𝑓 𝑦𝑓
,
𝜆𝐺 𝑓 𝜆𝐺 𝑓
𝜆𝐵
2
𝐼𝑓
𝑥𝑓 𝑦𝑓
,
𝜆𝐵 𝑓 𝜆𝐵 𝑓
Glare Pattern Image and Wave Lengths
• The 2D pattern scaling ∝ 𝜆
• Diffraction intensity ∝ 𝜆−2
𝜆𝑅
𝐼𝑓
𝑥𝑓 𝑦𝑓
,
𝜆𝑅 𝑓 𝜆𝑅 𝑓
𝜆𝐺
𝐼𝑓
𝐼𝑓
𝑥𝑓 𝑦𝑓
,
𝜆𝑓 𝜆𝑓
𝑥𝑓 𝑦𝑓
,
𝜆𝐺 𝑓 𝜆𝐺 𝑓
𝐴
=
𝜆𝑓
𝜆𝐵
2
ℱ 𝑡𝑜 𝑥𝑜 , 𝑦𝑜
𝐼𝑓
2
𝑥𝑓 𝑦𝑓
,
𝜆𝐵 𝑓 𝜆𝐵 𝑓
Glare by a Hexagonal Diaphragm
No filter
Hexagonal diaphragm
Output Glare
A Cross Filter Pattern
Cross filter pattern
Pupil diaphragm
Output Glare
Eyelashes and Iris Diaphragm
Drawn pattern of
an eyelid and
eyelashes
Pupil diaphragm
Glare for Red, Green,
and Blue wave lengths
Dynamic Glare
• How glare changes its shape while moving
Light source position
Choose an input obstacle
image 𝑡 𝑥𝑜 , 𝑦𝑜 𝑃 𝑥𝑜 , 𝑦𝑜
Output glare image
Dynamic Glare
• How glare changes its shape while moving
Light source position
Choose an input obstacle
image 𝑡 𝑥𝑜 , 𝑦𝑜 𝑃 𝑥𝑜 , 𝑦𝑜
Output glare image
Dynamic Glare
• How glare changes its shape while moving
Light source position
Choose an input obstacle
image 𝑡 𝑥𝑜 , 𝑦𝑜 𝑃 𝑥𝑜 , 𝑦𝑜
Output glare image
Special Case: Circular Aperture
• Use the analytical formula for ‘Airy Disc’
rather than FFT
𝜋𝑟 2 𝐴2 2𝐽1 𝑘𝑟 sin 𝜃
𝐼 𝜃 = 2 2
𝜆 𝑓
𝑘𝑟 sin 𝜃
2
𝜃: View angle
𝑟: Aperture radius
𝐽1 ∙ : The Bessel function of the first kind
𝑘 ≡ 2𝜋 𝜆
Input circular
aperture
* For a rectangular aperture, you can use another formula
Output Glare
(Airy Disc)
Real-time Rendering of Physically Based Optical Effects in Theory and Practice
Wave optics based glare generation techniques
AN IMPLEMENTATION AND
EXAMPLES
Multi-Spectra Integration
𝜆𝑚𝑎𝑥
𝐆𝑅𝐺𝐵 = 𝐌
𝐼𝑓 𝑥𝑓 , 𝑦𝑓 , 𝜆 𝐂𝑋𝑌𝑍 𝜆 𝑆 𝜆 𝑑𝜆
𝜆𝑚𝑖𝑛
RGB Glare
image for a
light source
Glare intensity
(A 2D FFT result)
Conversion from XYZ
to RGB (3×3 matrix)
Color
matching
function
Spectral power
distribution of the
light source
Processing Flow
Light source spectra Color matching func.
Output glare image
2
x(λ)
y(λ)
z(λ)
1.5
Fraunhofer
diffraction
1
0.5
0
380
480
580
680
780
Light source
intensity
×
FFT
Input images
(eyelashes
and a pupil)
Single spectrum
glare image

Glare image
Sampling and Accumulation along Wave Lengths
• 100 samples along visible light wave lengths
(380nm – 700nm) may be sufficient
𝜆: One sample
𝜆: 4 samples
Output glare images
𝜆: 100 samples
Scale and Accumulate a Seed Glare Image
• Need not compute
FFT for each 𝜆
𝑥𝑓 𝑦𝑓
𝐼𝑓 𝜆𝑓, 𝜆𝑓
𝐼𝑓
Seed glare
image
assuming
𝜆 = 𝜆0
𝐴
=
𝜆𝑓
2
ℱ 𝑡𝑜
𝑥𝑜 , 𝑦𝑜
Accumulate
𝐆𝑅𝐺𝐵
Scale image by 𝜆 𝜆0 .
Scale pixel value by
𝜆0
2
𝜆
.
……
2
A Result and a Reference
𝑡 𝑥𝑜 , 𝑦𝑜
×
Input object and pupil image
Light source, attachment and a camera
𝐆𝑅𝐺𝐵
Output glare image of
an infinite point light
A real snapshot
Results for Different Light Sources
𝑆 𝜆
𝐆𝑅𝐺𝐵
An HID*
A blue LED
headlamp
* High Intensity Discharge
An
incandescent lamp
A white
LED
The sun
Results for Different Brightness
• Varied results from a single HDR glare image
• Multiply the brightness of the current pixel in the input scene
L=672
L=3188
L=68496
L=53
L=17332
Measured headlamp
intensity distribution
Unit: cd
The L is equivalent to 𝐴2 , a squared
amplitude of the incident light
Rendering Glare from Light Sources Directly Viewed
1. Find the light source in screen space
2. Multiply the brightness according to the directional light
distribution
3. Scatter or overlay
glare image
Glare from directly viewed light sources
Rendering Glare on Highly Reflective Surfaces
1.
2.
3.
4.
Prepare a light map of bright light sources
Detect the reflecting points in screen space
Multiply the mapped texel brightness
Scatter or overlay glare image
The used light map
Glare on a reflective model
[Kakimoto et al. 2010]
An Application to Headlamp Evaluation
Spectral power distributions
Incandescent lamps
High
beam
Directional
intensity
distributions
Low
beam
HID lamps
Real-time Rendering of Physically Based Optical Effects in Theory and Practice
Wave optics based glare generation techniques
CONCLUSIONS
Conclusions
• Glare image is a 2D Fourier Transform of the obstacle image
– Make a seed glare image by FFT
– Compute an intermediate HDR glare image by resizing,
amplifying, and accumulating the seed glare along 𝜆
– Use spectral distributions of light source and sensitivity
• Scatter or use billboard for each pixel detected as ‘bright’
– Multiply the intermediate glare by the pixel brightness
References
•
•
•
•
•
•
•
•
•
Goodman, J. W. 1968. Introduction to Fourier Optics. McGraw-Hill.
Shinya, M., Saito, T., and Takahashi, T. 1989. Rendering Techniques for Transparent Objects. Proc. Graphics
Interface ’89, pp. 173–182.
Nakamae, E., Kaneda, K., Okamoto, T., and Nishita, T. 1995. A Lighting Model Aiming at Drive Simulators.
Proc. SIGGRAPH ’90, pp. 395–404, 1990.
Rokita, P., 1993. A model for rendering high intensity lights. Computers & Graphics, 17, 4, pp. 431–437.
Spencer, G., Shirley, P., Zimmerman, K., and Greenberg, D. P. 1995. Physically-Based Glare Effects for
Digital Images. Proc. SIGGRAPH ’95, pp. 325–334.
Stam, J. 1999. Diffraction shaders. Proc. SIGGRAPH ’99, pp. 101–110.
Mitchell, J. L. 2002. RADEON 9700 Shading. State of the Art in Hardware Shading, Course Note #17,
SIGGRAPH 2002.
Kawase, M., and Nagaya, M. 2002. Real-time CG rendering techniques in DOUBLE-S.T.E.A.L. CEDEC 2002,
Tokyo, No. 1-3-A. (In Japanese)
Kawase, M. 2003. Frame Buffer Postprocessing Effects in DOUBLE-S.T.E.A.L (Wreckless). GDC 2003.
References
•
•
•
•
•
•
Kakimoto, M., Matsuoka, K., Naemura, T., Nishita, T., and Harashima, H. 2004. Glare generation based on
wave optics. Proc. Pacific Graphics 2004, pp. 133–142. (reprinted as CGF 24, 2, pp. 185–193)
Kakimoto, M., Matsuoka, K., Naemura, T., Nishita, T., and Harashima, H. 2005. Glare Simulation and Its
Application to Evaluation of Bright Lights with Spectral Power Distribution, Posters, SIGGRAPH 2005.
Ritschel, T., Ihrke, M., Frisvad, J. R., Coppens, J., Myszkowski, K., and Seidel, H.-P. 2009. Temporal Glare:
Real-Time Dynamic Simulation of the Scattering in the Human Eye. Computer Graphics Forum (Proc.
Eurographics).
Kakimoto, M., Nishita, T., Naemura, T., Harashima, H. 2010. A Glare Effect Application to Headlamp Design
Verification. Journal of IIEEJ (Institute of Image Electronics Engineers of Japan), 39, 4, 369–375. (In
Japanese)
Hullin, M., Eisemann, E., Seidel, H., Lee, S. 2011. Physically-Based Real-Time Lens Flare Rendering. ACM
Trans. Graph. 30, 4, Article 108 (July 2011), 9 pages.
Cuypers, T., Haber, T., Bekaert, P., Oh, S. B., and Raskar, R. 2012. Reflectance model for diffraction. ACM
Trans. Graph. 31, 5, Article 122 (August 2012), 11 pages.
Related documents