Recovering dual-level rough surface parameters from simple lighting
Chun-Po Wang Noah Snavely Steve Marschner
Graphics Seminar, Fall 2010
Motivation and Goal
� Many surfaces are rough
Motivation and Goal
� Many surfaces are rough
Motivation and Goal
� Goal: build a model for rough surface
Perfect mirror Micro-level roughness Meso-level roughness
“Visible” roughness“Non-visible” roughness
The Inverse Problem
iPhone screen
Metal cabinet (rough surface)
Reflection
� Goal: fit a low-dimensional model
� Use only one or a few photos
� Use simple, inaccurate lighting and camera position
� Use simple techniques
� E.g., statistical analysis
The Inverse Problem
iPhone
Metal cabinet
Reflection
What is the roughness in the micro- and meso-level?
What is the size of these “bumps”?
Related works
� [Torrance et al., 1967]
� Micro-facet model
� “The surface consists of small, randomly disposed, mirror-like facets”
� [Cook et al., 1981]
� Two or more scales of roughness
Related works
� [Ramamoorthi et al., 2001]� Spherical Harmonics� A signal processing
framework for inverse rendering under general illumination conditions
� [Han et al., 2007]� Spherical Harmonics� This paper shows how
meso-level structure is mixed into micro-level structure by altering the underlying BRDF
Outline
� Surface model
� Problem formulation
� Recovering roughness
� Model
� Micro-level, Meso-level
� Factoring mixed roughness
Surface model
Surface modelMicro-level Meso-level
Surface model at Micro-level� Cook-Torrance model
� Vectors
� L: direction of the light
� V: direction of the viewer
� N: (global) surface normal
� H: half vector of L and V
� Terms
� D: facet slope distribution function
� F: Fresnel term
� G: geometrical attenuation factor
Facet slope distribution function
� Describe how rough a surface is
� E.g., Gaussian model
D
α
Large mSmall m
Surface model at Meso-level
� Microfacets at the “visible” level
� Facet slope distribution function is not enough: no width information
� Simulated by bump mapping
1. Height displacement
2. Width of the bumps
� Model bump maps as stationary random process
� How to describe this random process?
� How many parameters are needed?� We want to use only 2
Height displacement
� Modeled by the scale of the bump map
Small scale
Large scale
Width of the bumps
� Autocorrelation: the spatial (or time-domain) similarity of a signal to itself
� Idea: model as a normalized 2D Gaussian function
� One parameter: the variance of the Gaussian function
τX
image 2D autocorrelation
τx
τy
Bump map generation
� We can also generate bump map from a single parameter
� By using Fourier transform and random phasing
� For synthesizing images
Bump map generation
� Generate bump maps from one parameter
� Wiener-Khinchin Theorem
� “The power spectral density of a stationary random process is the Fourier transform of the corresponding autocorrelation function”
Bump map generation (cont.)
� The procedure:
1. Generate 2D Gaussian function as the autocorrelation function
2. Compute its Fourier transform, and take square root. This is the magnitude of the Fourier transform of the signal we want.
3. Randomly permute the phase of the Fourier transform
4. Do inverse Fourier transform to get the noise signal
Parameters of our model
� Micro-level
� Root mean square slope of facets
� Meso-level
� Width of the bumps
� Height displacement (scale)
Demo
� Images are rendered by PBRT
Light
Rough surface
Camera
Micro-level roughness = 0.001
Micro-level roughness = 0.003
Micro-level roughness = 0.01
Micro-level roughness = 0.03
Micro-level roughness = 0.1
Meso-level roughness (scale) = 0
Meso-level roughness (scale) = 0.025
Meso-level roughness (scale) = 0.05
Meso-level roughness (scale) = 0.075
Meso-level roughness (scale) = 0.1
1
The Inverse Problem
Problem formulation
� Goal: recover low dimensional parameters in micro- and meso-level
� Can be used to generate renderings which look similar to the real surface at different distances
� Assumptions
� The surface can be modeled by random facets at two very different scales
� The pattern in the meso-level is stationary
What we want are …
� Output� At Micro-level
� Root mean square slope of facets in micro-level
� At Meso-level
� Width of the bumps
� Height displacement
� Possible solutions?
Problem formulationPerfect mirror
Micro-level
Micro-level + Meso-level
B = f(A)
A
B
C
C = g(B)
Reflection as transform function
C = g(f(A)) = (g。f)(A)
Parameters
Transform in Micro-level
� In [Ramamoorthi et al., 2001]
� Reflected light field as a convolution of the lighting and BRDF
� Sharp env. map + rough surface = Blurred env. map + perfect mirror
� The transform function is a convolution of the env. map and the BRDF
� Sphere Harmonics
� Powerful tool, but may be overkill
f()
Transform in Meso-level
� Tranform function: a look-up function
� The environment map is scrambled
g()
Recover mixed-roughness
� The transform function (g。f)
� f: A convolution function (micro-level)
� g: A look-up function (meso-level)
� What is the property of this transform function?
(g。f)() ?Width of the bumpsHeight displacementR.M.S. slope
Meso-level
Micro-level
Method for width of the bumps
Autocorrelation?
Rectified and normalized
Recover the width of the bumps
� Directly applying autocorrelation to the reflected image does not work
Autocorrelation of the surface patch Our autocorrelation model
Recover the width of the bumps (cont.)
Negative 2nd partial derivative
Bump mapBump mapderivative
Bump mapAutocorrelation
Bump map derivativeAutocorrelation
derivative
autocorrelation autocorrelation
negative 2nd derivative
Recover the width of the bumps (cont.)
� Proof idea:
� Assume the surface is diffuse
� The brightness of a point on the surface is related to the slope of the facet there
� The brightness is related to the derivative of the bump map
� The autocorrelation of the derivative of the bump map is the negative second derivative of the autocorrelation of the bump map itself
Bump mapBump mapderivative
Bump mapAutocorrelation
Bump map derivativeAutocorrelation
derivative
autocorrelation autocorrelation
negative 2nd derivative
Recover the width of the bumps (cont.)
� Therefore, we can fit negative 2nd derivative of our autocorrelation model to the patch
Autocorrelation of the surface patch
Negative 2nd derivative of our autocorrelation model
The direction of derivatives?
� Direction = light direction
� When the surface is diffuse
� The lighting is directional
� How about in general case?� Seems to hold for
environment lighting
� Not true when the surface is not diffuse
Diffuse surfaceDirectional light
Diffuse surfaceEnvironment lighting
Microfacet surfaceDirectional light
Autocorrelation of real surfaces
White, painted wall in an apartmentLit by daylight
Autocorrelation of real surfaces (cont.)
White, painted wall in Upson Hall 4FLit by daylight
Recover mixed-roughness
� The 2-level of roughness can be mixed by
� Looking at the surface at distance, or
� Panning the camera or the surface, then averaging all images
A surface lit by B/W environment light
Randomly move the surface and average the result images
Recover mixed-roughness (cont.)
� Applying techniques in single-level problem to recover parameter of “mixed” roughness
� How to factor this into 2 levels of parameters?
Summary
� A dual-level model for rough surface� Micro-level: microfacet model� Meso-level: visible bumps modeled by bump maps
with certain autocorrelation
� Possible methods to recover parameters� Width of the bumps
� Fitting autocorrelation with negative 2nd derivative of Gaussian function
� Height displacement� Root mean square slope of facets
On-going works
� How to:
� Recover micro-level roughness by simpler method, given our model for the surface?
� Apply autocorrelation to non-diffuse surface and general lighting condition?
� Factor mixed roughness?
Thank you for your attention!