# A Bayesian Inference Framework for Procedural Material Parameter Estimation: Supplemental Materials

In this supplemental material, we provide detailed descriptions on the procedural material models used in the paper. Additionally, we show animated results for optimization (i.e., posterior maximization) and posterior sampling (using Hamiltonian Monte Carlo). Lastly, we demonstrate another application of our posterior sampling: recovering similarity relations of material scattering parameters.

Procedural Material Models

For all models, light gives light intensity, while iSigma gives standard deviation of the vignetting falloff in centimeters. We use truncated Gaussians for all prior distributions.

• Bumpy surface: The diffuse color is given by albedo (an RGB triple), rough is the roughness, fsigma and fscale define the Fourier-domain Gaussian power spectrum.

• Leather: Here albedo and rough are the same as in the bumpy surface, rough_var gives the roughness variation (increase) in the grooves, height gives vertical height-field scaling, power controls cell edge smoothing, scale controls the spatial scaling and shift the 2D offset of the Voronoi cell map.

• Plaster: Here slope defines the vertical scaling of the fractal noise pattern before thresholding; other parameters are like in the leather example.

• Metallic flake: Here topF0 and flakeF0 define the Fresnel reflectance at normal incidence of the top coating and the embedded flakes (the latter is an RGB quantity), while flakeRough gives flake roughness and flakeNDF the width of the normal distribution from which flake normals are chosen. Other parameters are like in above models.

• Brushed metal: Here f0 is the Fresnel reflectance, roughx and roughy are the roughness values in x/y direction, fsigmax and fsigmay give the standard deviations of the Fourier-domain Gaussian spectrum, while fscale gives its scaling.

• Wood: Here albedo gives the earlywood color, ring_size the size of a growth ring in centimeters, lw_power the power applied to earlywood color to get the (usually more absorptive) latewood color. The parameters lw_fraction, lw_ramp_width and ew_ramp_width control the relative size of the latewood as a fraction of the growth ring, as well as the smoothness of the latewood/earlywood transitions. The small scale noise scale and strength are controlled by ssn_scale and ssn_power, respectively. Growth rate noise scale and strength are controlled by grn_scale and grn_amplitude, respectively. Global distortion noise scale and strength are controlled by gdn_scale and gdn_amplitude, respectively. Finally, ew_rough and lw_height control the relative roughness and height of of earlywood vs. latewood, and cut_angle and center control the cutting plane with respect to original tree axis.
Clicking the images below to control the optimization/sampling animations:
left click the images below to start/pause; right click to reset the animations.
Results
Synthetic Input

We use the neural-network-based summary function for all results in this section.

• Prior
• Optimization
• HMC sampling

• Prior
• Optimization
• HMC sampling

• Prior
• Optimization
• HMC sampling

• Prior
• Optimization
• HMC sampling

• Prior
• Optimization
• HMC sampling

#### Wood

• Prior
• Optimization
• HMC sampling
Real Input

We use the neural-network-based summary function for all results in this section except for Metallic flake (Bins of radial bands) and Brushed metal (Bins of vertical bands + 1D FFT).

• Prior
• Optimization
• HMC sampling

• Prior
• Optimization
• HMC sampling

• Prior
• Optimization
• HMC sampling

• Prior
• Optimization
• HMC sampling

• Prior
• Optimization
• HMC sampling

#### Wood

• Prior
• Optimization
• HMC sampling
Translucent Materials

Translucent materials allow light to penetrate their surface and scatter within the interior. Our forward model focuses on semi-infinite and homogeneous media with a Henyey-Greenstein (HG) phase function lit by a point light source depicted using the following parameters: ${\boldsymbol\theta} = (\sigma_s, \sigma_a, g, E),$ where $$\sigma_s$$ and $$\sigma_a$$ are respectively the material’s scattering and absorption coefficients, $$g$$ indicates the phase function’s first Legendre moment (average cosine), and $$E$$ is the light intensity. Further, we assume that the medium’s refractive index $$\eta$$ is known.

To render these materials, we use Monte Carlo volumetric path tracing (VPT) with a specialized next-event estimation (NEE) technique capable of going through refractive interfaces. This makes our forward evaluation $$f$$ to involve a complex rendering component $$R$$ which is itself stochastic but still fully differentiable.

The radiative transfer material parameter space (i.e., $$\sigma_s$$, $$\sigma_a$$, and $$g$$) is known to be (approximately) over-complete, especially with the absence of sharp geometries (which applies in our flat configuration). That is, multiple combinations of these parameters can yield roughly identical appearances. This effect is mathematically captured by similarity relations. Specifically, the first-order variant of the similarity relations states that two scattering media with parameters $$(\sigma_s, \sigma_a, g)$$ and $$(\sigma_s^*, \sigma_a^*, g^*)$$ will have approximately identical appearances if $\sigma_a = \sigma_a^*, \quad \sigma_s (1 - g) = \sigma_s^* (1 - g^*).$

The presence of similarity relations has been a challenge for solving inverse scattering problems because of the fundamental difficulty in distinguishing parameters within the same similarity class. Our technique, which provides posterior distributions rather than single estimates, is capable of automatically detecting such structures.

The figure below shows posterior distributions sampled with our method for two synthetic input images. Unlike optimization-based methods which usually converge to some arbitrary locations near the similarity curve, our technique is able to detect the full structure of these "areas of confusion". The posterior distributions provided by our method match the similarity theory predictions very well.

Demo code

We provide demo code to generate different materials.

• Bumpy surface: code/run_me_bump.py
• Leather: code/run_me_leather.py
• Plaster: code/run_me_plaster.py
• Metallic flake: code/run_me_flake.py
• Brushed metal: code/run_me_metal.py
• Wood: code/run_me_wood.py