Granier-Heidrich

Required files:

rmannotes.sl

granier.sl
inter.sl
interfere.rib

This is an implementation of the BRDF described in A Simple Layered RGB BRDF Model by Xavier Granier and Wolfgang Heidrich. The model simulates the interaction (interference) of light with itself due to a thin substrate. To completely capture this effect, the simulation would have to be performed over the whole spectrum of light. This is obviously too much work for a shader to do, so this model avoids sampling the whole spectrum by simulating only the RGB colors and then interpolating between the results using a phong-like approach.

The parameters to the shader are:

 * ---- surface parameters ----------
 * drange: the minimum and maximum substrate thickness
 * ior: rgb index of refraction of substrate
 * spec: specular exponents of the rays reflected [substrate surface]
 * freq: frequency of the perlin noise [diffuse specular]
 * dev: deviation of the normals in the surface between [0:1]
 * Kd: diffuse coefficient
 * Ks: specular coefficient
 * seed: control random properties
    

These images attempt to emulate the images in the paper.

drange = [1 30]
ior = [1.5 1.5 1.5]
spec = [130 130]
freq = [100 100]
dev = 0.1
Kd = 1
Ks = 0
seed = 2924
drange = [1 210]
ior = [1.3 1.3 1.3]
spec = [130 130]
freq = [200 200]
dev = 0.1
Kd = 1
Ks = 0
seed = 2924
drange = [67 73]
ior = [1.4 1.4 1.4]
spec = [130 130]
freq = [40 40]
dev = 0.1
Kd = 1
Ks = 0
seed = 2924
drange = [66 76]
ior = [1.4 1.45 1.6]
spec = [90 170]
freq = [40 40]
dev = 0
Kd = 0.7
Ks = 1
seed = 2924
drange = [66 76]
ior = [1.4 1.45 1.6]
spec = [90 170]
freq = [40 40]
dev = 0.1
Kd = 0.7
Ks = 1
seed = 2924
drange = [66 76]
ior = [1.4 1.45 1.6]
spec = [90 170]
freq = [40 40]
dev = 0.2
Kd = 0
Ks = 1
seed = 2924
drange = [1 30]
ior = [1.5 1.6 1.8]
spec = [130 130]
freq = [40 40]
dev = 0.2
Kd = 0.5
Ks = 1
seed = 2924
drange = [146 200]
ior = [1.5 1.6 1.8]
spec = [130 130]
freq = [40 40]
dev = 0.2
Kd = 0.5
Ks = 1
seed = 2924
drange = [79 106]
ior = [1.5 1.6 1.8]
spec = [130 130]
freq = [40 40]
dev = 0.2
Kd = 0.5
Ks = 1
seed = 2924