ALTA  alpha
Function file format

ALTA library assumes that all functions are exported using the following convention:

Example of a *.function file for a single Lafortune lobe without any diffuse:

   #ALTA_HEADER_DATA
   #CMD lafortune --nb_lobes 1 --isotrope
   #DIM 2 1
   #PARAM_IN  CARTESIAN
   #PARAM_OUT ENERGY
   #ALTA_HEADER_END

   #FUNC lafortune
   Cx 1.0
   Cz 1.0
   N  10.0

For multiple BRDFs lobes (when you want to add a diffuse for example), you need to specify it into the command line. The different parameters are outputed sequentially into the file:

   #ALTA_HEADER_FUNC
   #CMD [diffuse, lafortune --nb_lobes 1 --isotrope, phong --fresnel schlick]
   #DIM 2 3
   #PARAM_IN  CARTESIAN
   #PARAM_OUT RGB_COLOR
   #ALTA_HEADER_END

   #FUNC diffuse
   kd 1.0
   kd 0.02
   kd 0.1We advise to output function file into <em>.function</em> file for consistency.

   #FUNC lafortune
   Cx 1.0
   Cz 1.0
   N  10.0
   Cx 1.0
   Cz 1.0
   N  10.0
   Cx 1.0
   Cz 1.0
   N  10.0

   #FUNC phong
   ks 1.0
   N  10.0
   ks 1.0
   N  10.0
   ks 1.0
   N  10.0

   #FUNC schlick
   R 1.0
   R 1.0
   R 1.0
Todo:
Right now the different color channels have the same length !