How to use the fitted data


  1. Overview
  2. Fitted parameters
    1. BSDF parameters
      1. Peak value
      2. Peak location
      3. Broadness
      4. Logarithmic behavior
      5. Anisotropy
    2. Spatial distribution parameters
      1. Notes
      2. First moment
      3. Second moment
  3. Values outside the control points

Overview

In http://www-evasion.imag.fr/Membres/Antoine.Bouthors/research/phd/thesis/tables/ you will find the following files:


I am not sure whether these functions are normalized or not. I advise you to re-generate them using MiePlot, with the parameters described in appendix A.


Fitted parameters

Here is what the matlab files contain in detail:

BSDF parameters

When you open the matlab files for the BSDF parameters (fit_o*.mat), you will find the following variables in the workspace. All the variables follow the same "table of control points" format.

Peak value

For example if you open fit_o2.mat, and read [50,-0.6,0.039801] in the 3rd row, that means A1( n=3, z1=50m, θ=cos-1(0.6) ) = 0.039801. And so on.
Note there is a discontinuity around θ=90°. That is normal and expected.

For example if you open fit_o2.mat, and read [50,0.2,1.904] in the 3rd row, that means A2( n=3, z1=50m, θ'=cos-1(0.2) ) = 1.904. And so on.
Note that A2 is normalized so that A2(n, z1, 0) = 1, as explained in the thesis. Also, θ' ranges from 0° to 90° (whereas θ ranges from 0° to 180°), which is normal since the slab can only be lit from above.

Peak location

For example if you open fit_o2.mat, and read [50,-0.6,9.2099] in the 3rd row, that means B1( n=3, z1=50m, θ=cos-1(0.6) ) = 9.2099. And so on.

For example if you open fit_o2.mat, and read [50,0.2,26.066] in the 3rd row, that means B2( n=3, z1=50m, θ=cos-1(0.2) ) = 26.066. And so on.

Broadness

    For example if you open fit_o2.mat, and read [50,-0.6,18.529] in the 3rd row, that means C( n=3, z1=50m, θ=cos-1(0.6) ) = 18.529. And so on.

Logarithmic behavior

    For example if you open fit_o2.mat, and read [50,-0.6,631.07] in the 3rd row, that means D( n=3, z1=50m, θ=cos-1(0.6) ) = 631.07. And so on.

Anisotropy

    Note there is an inconsistency here: although in the thesis and paper we say that P does not depend on z1, we have z1 as a parameter in the tables. This is simply due to the fact that the fitting was done per slab thickness. If you observe the data, you will note that the values for P are actually almost identical for a given Θ, regardless of z1. This is a nice validation of our assumption that P does not depend on z1. In consequence, to read the value for P, you can either read the values of P for an arbitrary z1, or read P for all values of z1 and take the average. I think we did the latter.

    For example if you open fit_o2.mat, and read
    that means P( n=3, Θ=cos-1(0.5) ) = 2.0873. And so on.

    Finally, note that there is no data for P(n=[16,∞], Θ). This is normal: these orders are isotropic, therefore P(n=[16,∞], Θ)=1 everywhere, as explained in the thesis.

Spatial distribution parameters

Notes




First moment

Matlab variable
Thesis function equivalent
Control points
I3D paper function equivalent
b
O(n, μ, μ')     (eq.5.24)
Column 1&2: -μ (i.e., μV in the I3D paper), Column 3: μ', Column 4: O N(μV, μL)
c
I(n, μ)          (eq.5.19) Column 1: -μ (i.e., μV in the I3D paper), Column 2: I I(μV)
d
M(n, μ)         (eq.5.23) Column 1: -μ (i.e., μV in the I3D paper), Column 2: M M(μV)
e
E(n, μ)         (eq.5.15) Column 1: -μ (i.e., μV in the I3D paper), Column 2: E E(μV)
j
G(n, μ)         (eq.5.20) Column 1: -μ (i.e., μV in the I3D paper), Column 2: G
G(μV)
k
F(n, μ)          (eq.5.16) Column 1: -μ (i.e., μV in the I3D paper), Column 2: F F(μV)
l
H(n, μ)         (eq.5.18) Column 1: -μ (i.e., μV in the I3D paper), Column 2: H H(μV)
u
K(n, μ)         (eq.5.21) Column 1: -μ (i.e., μV in the I3D paper), Column 2: K K(μV)
v
L(n, μ)         (eq.5.22) Column 1: -μ (i.e., μV in the I3D paper), Column 2: L L(μV)
w
J(n, μ)         (eq.5.20) Column 1: -μ (i.e., μV in the I3D paper), Column 2: J J(μV)

Second moment

The equation 5.25 in the thesis should be

    σ(n
, z1, z, θ, ψ, θ') = p + q z1 log(1 + rz') + s log(1 + tz1),    n=[16,∞]

    σ(n
, z1, z, θ, ψ, θ') = Sa + Sb log(1 + Sc z'),    n
<16

With these equations, the data for n=[16,∞] is not present in the matlab files. Here are the values:

P(n=[16,∞]) = 171.0
Q(n=[16,∞]) = 0.1645
R(n=[16,∞]) = 0.002321
S(n=[16,∞]) = 504.6956
T(n=[16,∞]) = 0.00096153

For n<16, the parameters Sa, Sb, Sc are defined by the scalar variables sa, sb, and sc in the matlab files.

Values outside the control points

The parameters have been fitted only for the given control points. To compute the value of a parameter outside the control points, you have to interpolate. The choice of the interpolation method is important, as it will give different results. We used the linspace() matlab function to sample uniformly the domain, then interpolated using interp1() for 1D data and griddata() for 2D data. Although it is tempting to use a cubic or spline interpolation method to get smooth variations, these are bad choices as they result in overshoots. Thus we interpolated all the data using the linear method, which gave satisfactory results. Care must be taken to interpolate finely enough so that the discontinuities are not smoothed out.

The data in the .txt files was directly created from the matlab files by interpolation. The files *Params*.txt contain the min and max bounds of the domain over which we did the interpolation. I advise you to re-create your own tables, though.

The program used to create the videos directly reads these text files and converts them into OpenGL textures. The equations are then computed in a GLSL shader, using the textures. I strongly advise you to validate your code against a basic slab before trying it out on other shapes.




Antoine Bouthors