Structure of BRDF files
The following example of *.brdf files only describes the *.txt version of *.brdf files.
A binary version of *.brdf files also exists. This binary version is generated after applying some treatments to the .brdf files.
The Complete Scattering Surface is able to handle transmission as well as reflection and has one distribution per wavelength.
Row | Description |
---|---|
Row 1 |
Header. The version number of this file does not change regardless of the selected mode (text or binary). |
Row 2 | Defines the mode: 0 for text mode, 1 for binary mode. |
Row 3 | Comment line. |
Row 4 |
Number of characters to read for the measurement description. Several lines are allowed for the measurement description. |
Row 5 | Measurement description (cannot be edited from the viewer). |
Row 6 |
Contains two boolean values (0=false and 1=true)
|
Row 7 |
Contains a boolean value describing the type of value stored in the file:
|
Row 8 |
Number of incident angles and number of wavelength samples (in nanometer). If you manually create the file, give it at least 2 incident angles. |
Row 9 | List of the incident angles. |
Row 10 | List of the wavelength samples. |
Row 11 | Reflection (or transmission) percentage for BRDF wavelength data normalization, for the first table. |
Row 12 | Number of angles measured for Theta and Phi, for the incident angle N°1 and the wavelength N°1 of the incident angle N°1. |
Row 13 |
Table of the measured BSDF according to Theta and Phi angles, in reflection, for the incident angle N°1 and the wavelength N°1 of the incident angle N°1. See Blocks Organization below. The table may take several lines. |
Row 14 |
Reflection (or transmission) percentage for BRDF wavelength data normalization, for the second table. |
Row 15 | Number of angles measured for Theta and Phi, for the incident angle N°1 and the wavelength N°2 of the incident angle N°1. |
Row 16 |
Table of the measured BRDF according to Theta and Phi angles, for the incident angle N°1 and the wavelength N°2 of the incident angle N°1. See Blocks Organization below. The table may take several lines. |
Row 17 | From the row 11, the model of the rows is repeated according to the number of incident angles and the number of wavelengths of each incident angle. |
Blocks Organization (from Row 11)
if the surface has reflection { for I=1 to Incidence Sample Number { for W=1 to Wavelength Sample Number { Write Reflection Block(I,W) } } } if the surface has transmission { for I=1 to Incidence Sample Number { for W=1 to Wavelength Sample Number { Write Transmission Block(I,W) } } }
It means the reflection comes first if present and the transmission comes after if present according to the boolean values in row 6.
Block Content
- Row 11 contains the reflection or transmission coefficient in percent. Each block contains a coefficient.
-
Row 12 contains the number of angles in theta and the number of angles in phi.
- Theta is the polar angle (the poles are on the surface normal direction), its origin is on the reflection pole.
- Phi is the azimuth angle, its origin is defined by the specular reflection.
- Row 13 contains the list of the Phi angles that are not necessarily equidistantly sampled.
- Next, there are as many rows as there are Theta angles. The first value of each row is the Theta angle sample value. Then there is one value per Phi angle corresponding to the intensity (or the BRDF depending on boolean in the row 7).
The Intensity or BRDF values does not need to be absolute values as the reflection/transmission coefficient is present at the beginning of each block and is used to normalize the values appropriately.