BRDF and BTDF Theory
In raytracing, the bidirectional scattering distribution function (BSDF) radiometrically characterizes the scatter of optical radiation from a surface as a function of the angular positions of the incident and scattered beams. Due to the natural characteristics of a material rough surface, the ray propagation (e.g. reflection direction) can be understood as a random phenomenon satisfying the distribution described by the BSDF. In practice, this phenomenon is usually split into the reflected and transmitted components, which are then treated separately as BRDF (Bidirectional Reflectance Distribution Function) and BTDF (Bidirectional Transmittance Distribution Function).
Thus, BSDF is a superset and the generalization of the BRDF and BTDF. The concept behind all BxDF functions (BSDF, BRDF or BTDF) could be described as a black box with the inputs being any two angles, one for incoming (incident) ray and the second one for the outgoing (reflected or transmitted) ray at a given point of the surface. The output of this black box is the value defining the ratio between the incoming and the outgoing light energy for the given couple of angles. For BRDF, the outgoing ray is on the same semi-sphere side as the incoming ray, while for BTDF, the outgoing is on the opposite side.
This implies that the BSDF function is 4(+1)-dimensional:
Spherical coordinate values for incoming ray: \(\theta_{incoming}\), \(\phi_{incoming}\)
Spherical coordinate value for the outgoing ray: \(\theta_{outgoing}\), \(\phi_{outgoing}\)
Wavelength of the light: lambda
which means that it cannot be simply represented by 2D and not even by a 3D graph. Each 2D or 3D graph, sometimes seen in the literature, shows only a slice of the function.
Speos BRDF File
Explanation of BRDF format
BRDF format is created for non-anisotropic but iridescent measurement. BRDF values are measured for multiple wavelengths and with each measurement and incident angle the reflection or transmission is measured.
With this data model you need a lot of measurements and data to have a spectrally well resolute model. This creates large files which slows down simulation and decreases performance. Due to this, there is no anisotropy allowed in this format as the amount of data is too big to be reasonably used within Optical simulation.
Structure of BRDF format
The \(\theta\) and \(\phi\) term in BRDF format defining the ray direction are illustrated as below:
Concepts and Parameters of the Bidirectional Reflectance Distribution Function
Z vector | Surface normal |
X vector | Constructed for a given incoming photon as the projection of its direction on the surface plane |
Y vector | Computed from X and Z |
\(\theta_{incoming}\) | Incidence angle |
Output direction (\(\theta_{outgoing}\), \(\phi_{outgoing}\)) | Displayed in red and is given using standard spherical coordinates in the X,Y,Z axis system |
The Speos BRDF file can be understood using a schematic view:
Details of table is explained like below:
Row | Value | Description |
---|---|---|
Row 1 |
Header
|
The version number of this file does not change regardless of the selected mode (text or binary). |
Row 2 | Boolean values | 0 for text mode, 1 for binary mode. |
Row 3 | Comments | Comment line. |
Row 4 | Integers |
Number of characters to read for the measurement description. Several lines are allowed for the measurement description. |
Row 5 | Descriptions | Measurement description (cannot be edited from the viewer). |
Row 6 | Two Boolean values |
|
Row 7 | Boolean value | 1 means the data is proportional to the BSDF. 0 means the data is proportional to the measured intensity or to the probability density function. |
Row 8 | Two integers |
First integer means the number of incident angles (Note, if you manually create the file, give at least 2 incident angles). Second integer number represents wavelength samples (in nanometer). |
Row 9 | List of values | List of the incident angles. |
Row 10 | List of values | List of the wavelength samples (in nanometer). |
Row 11 | Percentage value (for the first BSDF table) | Reflection (or transmission) percentage for BRDF wavelength data normalization, for the first table (i.e. light source with first incident angle and first wavelength) |
Row 12 | Two integers (for the first BSDF table) | Number of angles measured for Theta and Phi for the first table, aka for the incident angle N°1 and the wavelength N°1 of the incident angle N°1. |
Row 13 – Table 2 |
List of values List of values … |
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. Note, the table may take several lines. |
Row 14 | Percentage value (for the second BSDF table) | Reflection (or transmission) percentage for BRDF wavelength data normalization, for the second table. |
Row 15 | Two integers (for the second BSDF table) | 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 3 |
List of values List of values … |
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. The table may take several lines. |
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. |
More details about the structure of BRDF file can be found in the Speos Labs User’s Guide.
Speos Anisotropic BSDF
Explanation of Anisotropic BSDF
The Speos *.anisotropicbsdf format is used to describe non iridescent materials. The material relies on spectral modulation to describe the spectral response. For each incident angle only a grayscale response is measured. The BSDF data needs to be on the same scale for all incident angles. The reflection spectrum included in the file is then used to define the spectral reflectance and modulate the BSDF.
The normalization of the values is done by using the measurement values according to the following formula:
If data is proportional to BSDF: BSDF(lambda, I, theta, phi) = α0 * RelativeIncidenceValue(i, theta, phi)
If data is proportional to Intensity: BSDF(lambda, I, theta, phi) = α0 * RelativeIncidenceValue(i,theta,phi) / cos(theta)
If i0 is not measured, α0 is calculated for the 2 incidences around i0 and weighted in function of the distance to i0.
If i0 is lower than the first incidence measured, then i0=first incidence.
Due to the light data structure this model can accommodate for anisotropy. For coloured specular materials please read the interpolation section and Specular Constant for anisotropic BSDF section of the Speos Labs User’s Guide.
The following diagram gives definitions for incoming and outgoing directions according to the surface normal (Z) and the fixed anisotropic vector of the Speos *.anisotropicbsdf file.
File Structure Anisotropic BSDF
Z vector | Surface normal |
X vector | Constructed for a given incoming photon as the projection of its direction on the surface plane |
Y | Computed from X and Z |
Anisotropic vector |
The Anisotropic vector is the orientation vector of the BSDF on the geometry. It defines an axis on the surface used as the origin when calculating the Anisotropic angle. It directs the surface when the vector given in the file is not in the tangent plane at the impact point, an orthogonal projection of it is used instead. You can modify the anisotropic vector in the X, Y and Z boxes under Anisotropy vector. The anisotropic vector is stored in .anisotropicBSDF files and is defined by the global coordinate system. |
Anisotropic angle \(\phi_{incoming}\) |
The anisotropic angle is the angle between the incidence plane and the anisotropic vector. When the vector is in the incidence plane, phi=0°. Angle between X and the anisotropic vector using trigonometrical convention (Phi_i is positive on the diagram) Setting the Phi incidence angle value does not impact the incidence angle visualization in the XYZ axis system. |
\(\theta_{incoming}\) | Incidence angle |
Output direction (\(\theta_{outgoing}\), \(\phi_{outgoing}\)) | Displayed in red and is given using standard spherical coordinates in the X,Y,Z axis system |
the Speos *.anisotropicbsdf file can be understood using a schematic view:
Row | Value | Description |
---|---|---|
Row 1 |
Header |
Ex: OPTIS - Anisotropic BSDF surface file v8.0 The version number of this file does not change regardless of the selected mode (text or binary). |
Row 2 | Boolean | Defines the mode: 0 for text mode, 1 for binary mode. |
Row 3 | Comments | Comment line. |
Row 4 |
Integer |
Number of characters to read for the measurement description. Several lines are permitted for the measurement description. |
Row 5 | Description | Measurement description (cannot be edited from the viewer). |
Row 6 | Float vector | Contains the anisotropy vector in the global coordinates system. |
Row 7 |
two Booleans |
Contains two boolean values (0=false and 1=true):
|
Row 8 |
boolean |
Contains a boolean value describing the type of value stored in the file:
|
Row 9 | integer | Number of anisotropy angles in reflection. |
Row 10 | List of values in percent(0-100) | List of anisotropy angles in reflection. |
Row 11 |
integer |
Number of incident angles in reflection, for anisotropy angle N°1. If you manually create the file, give it minimum two incident angles. |
Row 12 |
list of values in degree |
List of incident angles in reflection, for anisotropy angle N°1. If the number of anisotropy angles is higher than 1, rows 11 and 12 are repeated. |
Row 13 | Integer | Number of anisotropy angles in transmission. |
Row 14 | list of values in degree | List of anisotropy angles in transmission. |
Row 15 |
Integer |
Number of incident angles in transmission, for anisotropic angle N°1. If you manually create the file, give it at least 2 incident angles. |
Row 16 |
list of values in degree |
List of incident angles in transmission, for anisotropy angle N°1. If the number of anisotropy angles is higher than 1, rows 15 and 16 are repeated. |
Row 17 | two floats in degree | Theta angle and a Phi angle for each spectrum measurement in reflection. |
Row 18 | Description | Reflective Spectrum description: wavelength (nm), coefficient (%) |
Row 19 | Integer | Number of wavelength measurements in reflection. |
Row 20 |
List of values in percent |
Wavelength measurements in reflection (in nm). One wavelength takes one line. There are as many lines as wavelengths. |
Row 21 | two floats in degree | Theta angle and a Phi angle for each spectrum measurement in transmission. |
Row 22 | Description | Transmission Spectrum description: wavelength (nm), coefficient (%) |
Row 23 | Integer | Number of wavelength measurements in transmission. |
Row 24 |
List of values in percent |
Wavelength measurements in transmission (in nm). One wavelength takes one line. There are as many lines as wavelengths. |
Row 25 | two integer | Number of angles measured for Theta and Phi, in reflection, for the anisotropy angle N°1 and the incident angle N°1 of the anisotropy angle N°1. |
Row 26 |
list of values |
Table of the measured BSDF according to Theta and Phi angles, in reflection, for the anisotropy angle N°1 and the incident angle N°1 of the anisotropy angle N°1. See Row 25 to 29 below. The table may take several lines. |
Row 27 | two integer | Number of angles measured for Theta and Phi, in reflection, for the anisotropy angle N°1 and the incident angle N°2 of the anisotropy angle N°1. |
Row 28 |
list of values |
Table of the measured BSDF according to Theta and Phi angles, in reflection, for the anisotropy angle N°1 and the incident angle N°2 of the anisotropy angle N°1. See Row 25 to 29 below. The table may take several lines. |
Row 29 | From the row 25, the model of the rows is repeated according to the number of anisotropy angles and the number of incident angles of each anisotropy angle, in reflection and in transmission. |
An example anisotropic bsdf file can be downloaded from this article’s attachment. More details about the anisotropic bsdf file can be found in the Speos Labs User’s Guide.