The \a brdf2data allows you to export a function into a data file. If no data plugin is specified, the ALTA format is used which is gnuplot compliant. The position of evaluation for the function are taken from a specified data file (here the original Kirby2 file).
...
...
@@ -31,7 +31,7 @@ You should obtain gnuplot data files like the following image:
\image html Kirby2.png
To convert this brdf file to be used in another software (here matlab),
To convert this brdf file to be used in another software (here matlab),
In this example, we will show how to perform data conversion and vertical segments interpolation of the <em>gold-metallic-paint</em> material from the MERL database using the command line programs on an OSX platform. First download the binary file <a href="http:///">gold-met.binary</a> and copy it to the <em>$ALTA/data/3d/merl</em> directory.
The first command we will execute will convert the three dimensional data in a 2D slice in the halfway vector parametrization:
This outputs a BRDF file which cannot be displayed directly. To seen the result of our fitting, we can export this BRDF into the BRDF image slice format:
It is now possible to perform side by side comparison of the original data, and the interpolated rational function:
<center>
<table border="0" style='text-align:center'>
<tr>
<td>
\image html gold-met-merl.png "gold-metallic-paint slice"
</td>
<td>
\image html gold-met-rat.png "gold-metallic-paint slice fitting using R-BRDFs"
</td>
</tr>
</table>
</center>
<br />
<h3>Non-linear fitting</h3>
In this example, we use Google's <a href="http://code.google.com/p/ceres-solver/">CERES</a> nonlinear fitter to approximate the
blue metallic paint from the <a href="http://www.merl.com/brdf/">MERL database</a> using a Lafortune lobe (Note that we do not provide the data in ALTA package, you will have to download it). The resulting BRDF is exported in a shader format compatible with BRDF Explorer.
...
...
@@ -58,7 +98,7 @@ This command line is rather long. To help you design complex command line in a m
<h3>XML scripts</h3>
Here is the script to perform the same fitting as the previous example. It
Here is the script to perform the same fitting as the previous example. It
performs the fitting of the blue metallic paint from the MERL database using
a Beckmann lobe (note there is no shadowing term, nor Fresnel term):
...
...
@@ -78,7 +118,7 @@ a Beckmann lobe (note there is no shadowing term, nor Fresnel term):