recovering dual-level rough surface parameters from simple ...cpwang/docs/iprough_slides.pdf · a...

55
Recovering dual-level rough surface parameters from simple lighting Chun-Po Wang Noah Snavely Steve Marschner Graphics Seminar, Fall 2010

Upload: others

Post on 08-Oct-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Recovering dual-level rough surface parameters from simple ...cpwang/docs/iprough_slides.pdf · A dual-level model for rough surface Micro-level: microfacet model Meso-level: visible

Recovering dual-level rough surface parameters from simple lighting

Chun-Po Wang Noah Snavely Steve Marschner

Graphics Seminar, Fall 2010

Page 2: Recovering dual-level rough surface parameters from simple ...cpwang/docs/iprough_slides.pdf · A dual-level model for rough surface Micro-level: microfacet model Meso-level: visible

Motivation and Goal

� Many surfaces are rough

Page 3: Recovering dual-level rough surface parameters from simple ...cpwang/docs/iprough_slides.pdf · A dual-level model for rough surface Micro-level: microfacet model Meso-level: visible

Motivation and Goal

� Many surfaces are rough

Page 4: Recovering dual-level rough surface parameters from simple ...cpwang/docs/iprough_slides.pdf · A dual-level model for rough surface Micro-level: microfacet model Meso-level: visible

Motivation and Goal

� Goal: build a model for rough surface

Perfect mirror Micro-level roughness Meso-level roughness

“Visible” roughness“Non-visible” roughness

Page 5: Recovering dual-level rough surface parameters from simple ...cpwang/docs/iprough_slides.pdf · A dual-level model for rough surface Micro-level: microfacet model Meso-level: visible

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

Page 6: Recovering dual-level rough surface parameters from simple ...cpwang/docs/iprough_slides.pdf · A dual-level model for rough surface Micro-level: microfacet model Meso-level: visible

The Inverse Problem

iPhone

Metal cabinet

Reflection

What is the roughness in the micro- and meso-level?

What is the size of these “bumps”?

Page 7: Recovering dual-level rough surface parameters from simple ...cpwang/docs/iprough_slides.pdf · A dual-level model for rough surface Micro-level: microfacet model Meso-level: visible

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

Page 8: Recovering dual-level rough surface parameters from simple ...cpwang/docs/iprough_slides.pdf · A dual-level model for rough surface Micro-level: microfacet model Meso-level: visible

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

Page 9: Recovering dual-level rough surface parameters from simple ...cpwang/docs/iprough_slides.pdf · A dual-level model for rough surface Micro-level: microfacet model Meso-level: visible

Outline

� Surface model

� Problem formulation

� Recovering roughness

� Model

� Micro-level, Meso-level

� Factoring mixed roughness

Page 10: Recovering dual-level rough surface parameters from simple ...cpwang/docs/iprough_slides.pdf · A dual-level model for rough surface Micro-level: microfacet model Meso-level: visible

Surface model

Page 11: Recovering dual-level rough surface parameters from simple ...cpwang/docs/iprough_slides.pdf · A dual-level model for rough surface Micro-level: microfacet model Meso-level: visible

Surface modelMicro-level Meso-level

Page 12: Recovering dual-level rough surface parameters from simple ...cpwang/docs/iprough_slides.pdf · A dual-level model for rough surface Micro-level: microfacet model Meso-level: visible

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

Page 13: Recovering dual-level rough surface parameters from simple ...cpwang/docs/iprough_slides.pdf · A dual-level model for rough surface Micro-level: microfacet model Meso-level: visible

Facet slope distribution function

� Describe how rough a surface is

� E.g., Gaussian model

D

α

Large mSmall m

Page 14: Recovering dual-level rough surface parameters from simple ...cpwang/docs/iprough_slides.pdf · A dual-level model for rough surface Micro-level: microfacet model Meso-level: visible

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

Page 15: Recovering dual-level rough surface parameters from simple ...cpwang/docs/iprough_slides.pdf · A dual-level model for rough surface Micro-level: microfacet model Meso-level: visible

Height displacement

� Modeled by the scale of the bump map

Small scale

Large scale

Page 16: Recovering dual-level rough surface parameters from simple ...cpwang/docs/iprough_slides.pdf · A dual-level model for rough surface Micro-level: microfacet model Meso-level: visible

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

Page 17: Recovering dual-level rough surface parameters from simple ...cpwang/docs/iprough_slides.pdf · A dual-level model for rough surface Micro-level: microfacet model Meso-level: visible

Bump map generation

� We can also generate bump map from a single parameter

� By using Fourier transform and random phasing

� For synthesizing images

Page 18: Recovering dual-level rough surface parameters from simple ...cpwang/docs/iprough_slides.pdf · A dual-level model for rough surface Micro-level: microfacet model Meso-level: visible

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”

Page 19: Recovering dual-level rough surface parameters from simple ...cpwang/docs/iprough_slides.pdf · A dual-level model for rough surface Micro-level: microfacet model Meso-level: visible

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

Page 20: Recovering dual-level rough surface parameters from simple ...cpwang/docs/iprough_slides.pdf · A dual-level model for rough surface Micro-level: microfacet model Meso-level: visible

Parameters of our model

� Micro-level

� Root mean square slope of facets

� Meso-level

� Width of the bumps

� Height displacement (scale)

Page 21: Recovering dual-level rough surface parameters from simple ...cpwang/docs/iprough_slides.pdf · A dual-level model for rough surface Micro-level: microfacet model Meso-level: visible

Demo

� Images are rendered by PBRT

Light

Rough surface

Camera

Page 22: Recovering dual-level rough surface parameters from simple ...cpwang/docs/iprough_slides.pdf · A dual-level model for rough surface Micro-level: microfacet model Meso-level: visible

Micro-level roughness = 0.001

Page 23: Recovering dual-level rough surface parameters from simple ...cpwang/docs/iprough_slides.pdf · A dual-level model for rough surface Micro-level: microfacet model Meso-level: visible

Micro-level roughness = 0.003

Page 24: Recovering dual-level rough surface parameters from simple ...cpwang/docs/iprough_slides.pdf · A dual-level model for rough surface Micro-level: microfacet model Meso-level: visible

Micro-level roughness = 0.01

Page 25: Recovering dual-level rough surface parameters from simple ...cpwang/docs/iprough_slides.pdf · A dual-level model for rough surface Micro-level: microfacet model Meso-level: visible

Micro-level roughness = 0.03

Page 26: Recovering dual-level rough surface parameters from simple ...cpwang/docs/iprough_slides.pdf · A dual-level model for rough surface Micro-level: microfacet model Meso-level: visible

Micro-level roughness = 0.1

Page 27: Recovering dual-level rough surface parameters from simple ...cpwang/docs/iprough_slides.pdf · A dual-level model for rough surface Micro-level: microfacet model Meso-level: visible

Meso-level roughness (scale) = 0

Page 28: Recovering dual-level rough surface parameters from simple ...cpwang/docs/iprough_slides.pdf · A dual-level model for rough surface Micro-level: microfacet model Meso-level: visible

Meso-level roughness (scale) = 0.025

Page 29: Recovering dual-level rough surface parameters from simple ...cpwang/docs/iprough_slides.pdf · A dual-level model for rough surface Micro-level: microfacet model Meso-level: visible

Meso-level roughness (scale) = 0.05

Page 30: Recovering dual-level rough surface parameters from simple ...cpwang/docs/iprough_slides.pdf · A dual-level model for rough surface Micro-level: microfacet model Meso-level: visible

Meso-level roughness (scale) = 0.075

Page 31: Recovering dual-level rough surface parameters from simple ...cpwang/docs/iprough_slides.pdf · A dual-level model for rough surface Micro-level: microfacet model Meso-level: visible

Meso-level roughness (scale) = 0.1

Page 32: Recovering dual-level rough surface parameters from simple ...cpwang/docs/iprough_slides.pdf · A dual-level model for rough surface Micro-level: microfacet model Meso-level: visible

1

Page 33: Recovering dual-level rough surface parameters from simple ...cpwang/docs/iprough_slides.pdf · A dual-level model for rough surface Micro-level: microfacet model Meso-level: visible

The Inverse Problem

Page 34: Recovering dual-level rough surface parameters from simple ...cpwang/docs/iprough_slides.pdf · A dual-level model for rough surface Micro-level: microfacet model Meso-level: visible

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

Page 35: Recovering dual-level rough surface parameters from simple ...cpwang/docs/iprough_slides.pdf · A dual-level model for rough surface Micro-level: microfacet model Meso-level: visible

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?

Page 36: Recovering dual-level rough surface parameters from simple ...cpwang/docs/iprough_slides.pdf · A dual-level model for rough surface Micro-level: microfacet model Meso-level: visible

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

Page 37: Recovering dual-level rough surface parameters from simple ...cpwang/docs/iprough_slides.pdf · A dual-level model for rough surface Micro-level: microfacet model Meso-level: visible

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()

Page 38: Recovering dual-level rough surface parameters from simple ...cpwang/docs/iprough_slides.pdf · A dual-level model for rough surface Micro-level: microfacet model Meso-level: visible

Transform in Meso-level

� Tranform function: a look-up function

� The environment map is scrambled

g()

Page 39: Recovering dual-level rough surface parameters from simple ...cpwang/docs/iprough_slides.pdf · A dual-level model for rough surface Micro-level: microfacet model Meso-level: visible

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

Page 40: Recovering dual-level rough surface parameters from simple ...cpwang/docs/iprough_slides.pdf · A dual-level model for rough surface Micro-level: microfacet model Meso-level: visible

Method for width of the bumps

Autocorrelation?

Rectified and normalized

Page 41: Recovering dual-level rough surface parameters from simple ...cpwang/docs/iprough_slides.pdf · A dual-level model for rough surface Micro-level: microfacet model Meso-level: visible

Recover the width of the bumps

� Directly applying autocorrelation to the reflected image does not work

Autocorrelation of the surface patch Our autocorrelation model

Page 42: Recovering dual-level rough surface parameters from simple ...cpwang/docs/iprough_slides.pdf · A dual-level model for rough surface Micro-level: microfacet model Meso-level: visible

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

Page 43: Recovering dual-level rough surface parameters from simple ...cpwang/docs/iprough_slides.pdf · A dual-level model for rough surface Micro-level: microfacet model Meso-level: visible

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

Page 44: Recovering dual-level rough surface parameters from simple ...cpwang/docs/iprough_slides.pdf · A dual-level model for rough surface Micro-level: microfacet model Meso-level: visible

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

Page 45: Recovering dual-level rough surface parameters from simple ...cpwang/docs/iprough_slides.pdf · A dual-level model for rough surface Micro-level: microfacet model Meso-level: visible

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

Page 46: Recovering dual-level rough surface parameters from simple ...cpwang/docs/iprough_slides.pdf · A dual-level model for rough surface Micro-level: microfacet model Meso-level: visible

Diffuse surfaceDirectional light

Page 47: Recovering dual-level rough surface parameters from simple ...cpwang/docs/iprough_slides.pdf · A dual-level model for rough surface Micro-level: microfacet model Meso-level: visible

Diffuse surfaceEnvironment lighting

Page 48: Recovering dual-level rough surface parameters from simple ...cpwang/docs/iprough_slides.pdf · A dual-level model for rough surface Micro-level: microfacet model Meso-level: visible

Microfacet surfaceDirectional light

Page 49: Recovering dual-level rough surface parameters from simple ...cpwang/docs/iprough_slides.pdf · A dual-level model for rough surface Micro-level: microfacet model Meso-level: visible

Autocorrelation of real surfaces

White, painted wall in an apartmentLit by daylight

Page 50: Recovering dual-level rough surface parameters from simple ...cpwang/docs/iprough_slides.pdf · A dual-level model for rough surface Micro-level: microfacet model Meso-level: visible

Autocorrelation of real surfaces (cont.)

White, painted wall in Upson Hall 4FLit by daylight

Page 51: Recovering dual-level rough surface parameters from simple ...cpwang/docs/iprough_slides.pdf · A dual-level model for rough surface Micro-level: microfacet model Meso-level: visible

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

Page 52: Recovering dual-level rough surface parameters from simple ...cpwang/docs/iprough_slides.pdf · A dual-level model for rough surface Micro-level: microfacet model Meso-level: visible

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?

Page 53: Recovering dual-level rough surface parameters from simple ...cpwang/docs/iprough_slides.pdf · A dual-level model for rough surface Micro-level: microfacet model Meso-level: visible

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

Page 54: Recovering dual-level rough surface parameters from simple ...cpwang/docs/iprough_slides.pdf · A dual-level model for rough surface Micro-level: microfacet model Meso-level: visible

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?

Page 55: Recovering dual-level rough surface parameters from simple ...cpwang/docs/iprough_slides.pdf · A dual-level model for rough surface Micro-level: microfacet model Meso-level: visible

Thank you for your attention!