Navigation: Scatterers > Scatter Types > Tabulated BSDF

 

Tabulated BSDF

 

Contact Us: fredsupport@photonengr.com

 

 

 

Description


The Tabulated BSDF representation is an isotropic, wavelength invariant scatter model that interpolates BSDF values from a properly formatted tabular data file for any arbitrary incident angle and outgoing scattered ray direction.  The intention of this scatter model is to support the direct use of BSDF measurement data, though fitting of tabular data to binomial/polynomial and Harvey/ABg/ExtendedHarvey functional forms is also encouraged when the tabular data can be well represented by those functions.

 

Tabular BSDF data can be categorized in two types; in-plane and out-of-plane.  It is important to verify the type of data being used in the Tabulated BSDF scatter model, as each type has slightly different rules regarding the data formatting and interpolation assumptions.

 

The coordinate system for in-plane scatter data is shown below, where a ray is incident on a scatter surface with polar angle -θspec with respect to the local surface normal.  An outgoing scattered ray direction has angle θscat with respect to the surface normal and the outgoing specular ray direction has angle θspec with respect to the surface normal.  All three rays, the incident ray, specular ray, and scattered ray, lie in the same plane with the surface normal.  In-plane scatter data, acquired from scatterometer measurements or published data, is more common than out-of-plane data.

 

The coordinate system for out-of-plane scatter data is shown below.  The polar angles, θ, are left off the diagram for simplicity but will be defined by the angle between the incident, specular, or scatter direction and the surface normal in the same manner as above for the in-plane scatter definition.  The azimuthal angles, f, are defined such that when f_scat - f_inc = 0 or 180 degrees, the scatter direction corresponds to the in-plane definition.  In all other cases, the scatter direction will lie out-of-plane.

 

Specific information on the tabular data file format required for in-plane and out-of-plane scatter data is provided in the Application Notes sections below.

 

It is equally as important to plot the raw tabular data before providing it to FRED, in order to (a) understand what the expected behavior of the resulting Tabular BSDF model should be, and (b) identify any modifications or corrections to the measured dataset.  Consider the 2D angle BSDF plot below of a commercially available black surface treatment from Acktar, where in-plane BSDF scans for two specular angles, 3 degrees and 60 degrees, are shown.  Each curve in the plot corresponds to an in-plane BSDF scan associated with either a 3 degree incident angle or a 60 degree incident angle.

 

The BSDF curves shown are characteristic of diffuse black surface treatments; having a quasi-lambertian behavior at nearly normal-incidence and acquiring a mild tilt and curvature as the angle of incidence is increased (to 60 degrees, in this example).  Any Tabular BSDF scattering model constructed from this dataset should exhibit the same functional behavior and closely match the magnitudes of the BSDF for any incident specular angle and outgoing scatter direction.

 

Four regions of the BSDF plots are circled in red to note some common aspects of BSDF data sets that may need to be modified prior to being loaded into FRED.  The two regions labeled "A" on the plot, at the extreme scatter angles approaching +/- 90 degrees, show abrupt transitions that either dramatically increase, or dramatically decrease the BSDF values in those directions.  These data should be removed from the tabular data file supplied to FRED.  The two regions labeled "B" on the plot correspond to the negative of the specular direction for each incident angle scan.  These "dropout" regions occur where the scatterometer detection arm is scanned through the fixed, incident laser beam, blocking the signal path.  The BSDF data values in these "dropout" regions should be removed or manually re-populated with suitable values.  Under no circumstances should the BSDF values be set to zero (or negative) in these regions, which violates the fundamental requirement of positivity in the BSDF values.

 

 

Note that in the example BSDF plots above, the smallest specular angle measurement set is shown to be 3 degrees.  In general, supplying a specular angle measurement set at zero degrees incidence, or as small an angle close to normal as can be achieved by the measuring instrument, will be beneficial to the overall quality of the Tabulated BSDF data interpolation.  In fact, when the Tabulated BSDF model detects that 0 degree specular data has not been provided as part of the input file, it will synthesize the 0 degree specular data subject to the rules below.  Not only will the 0 degree specular dataset be beneficial to the Tabulated BSDF model itself, the BSDF data fitting utilities (which accept tabular BSDF data files as input) require that data as part of their fitting algorithms.  When the supplied data file does not contain a measurement set corresponding to 0 degrees specular:

 

If the supplied data file has 2 or more non-zero specular angle measurement sets, the 0 degree data will be synthesized from the two smallest specular angle datasets in the file

If the supplied data file contains only a single non-zero specular angle measurement set, the 0 degree data will be synthesized by shifting the single angle dataset to zero degrees.  In this case, there is really only one unique set of data and the resulting scatter model will be shift-invariant (i.e. the BSDF is a function of |sin(θ_scatter)-sin(θ_specular)| ).

 

 

 

Navigation


This feature can be accessed by:

1. Right mouse click on the Scatterers folder in the object tree and select, "Create a new scatterer"

2. Select "Tabulated BSDF (Reciprocity-obeying sampled BSDF)" as the Type in the resulting dialog

 

 

Controls


Control

Inputs / Description

Defaults

File

Right mouse click in this cell to bring up the following options:

 

Replace with data from a file

Loads data from a properly formatted text file into the scatter model for interpolation.  Refer to the application notes sections below for file format details.

Export data to a FRED text file

The tabulated data stored in the scatter model is exported to a text file in the FRED tabulated data file format.

Show last accessed file name

Displays a dialog with the full file path name of the last text file that was loaded into the scatter model.

Plot current data - raw and not interpolated

Displays a plot configuration dialog, where the Specular Angles are preset (and not modifiable) to the specular angles contained in the input data file.

 

If the file does not contain a dataset for 0-degree incidence, the synthetic 0-degree dataset will be displayed in the plot.

 

If the raw data is in-plane only, only the BSDF Scale options will be active and the raw data will be shown on a 2D angle BSDF plot.

 

If the input file contains out-of-plane data, the user will be allowed to enter the number of samples across the full unit direction-cosine circle in the X and Y directions.  The resulting plot will be a 3D BSDF plot in direction-cosine space, where the raw BSDF values are accumulated into the defined bins.  Depending on the density of the out-of-plane data, this accumulation can result in multiple raw BSDF values being accumulated into the same direction-cosine bin.  Increasing the pixel counts in the 3D plot can reduce (or eliminate) the artificially high BSDF values displayed as a result of the accumulation.

 

If the supplied data file contains BSDF data at only one specular angle, the following warning message will be presented to the user when the model is created:

 

"Read BSDF data at only 1 AOI.  Extrapolation at other AOI is likely inaccurate."

 

This message simply indicates that an insufficient amount of data is provided to truly characterize the behavior of the scatter model as a function of angle of incidence.  An assumption of shift-invariance in the scatter model will be applied, for lack of additional measurement data.

 

Blank

Symmetry

Specifies the type of symmetry exhibited by the BSDF data and influences the data search scheme for choosing interpolation points. 

 

Options are:

Isotropic (Beta Minus Beta0) [Recommended]

This is the most common symmetry type and should be used unless another symmetry is explicitly determined.  In Beta-Beta0 symmetry, BRDF with a specular, or glossy, lobe track with the specular direction.  Diffuse BRDF may develop curvature and tilt with higher angles of incidence so that the peak BRDF value lies on the same side of the surface normal as the specular direction.

Isotropic (Beta Plus Beta0)

This is a less common symmetry type that may be observed in the presence of strong subsurface or volumetric contributions to the BRDF, where the specular, or glossy, lobe tracks opposite to the specular direction.  Diffuse BRDF may develop curvature and tilt with higher angles of incidence so that the peak BSDF value lies on the opposite side of the surface normal as the specular direction.

Isotropic (Beta Minus Beta0)

TIS Integration Parameters (advanced)

Main Samps

Specifies the number of pixels in the X and Y axes of the unit direction cosine circle that will be used for calculation of the Total Integrated Scatter (TIS) value.

 

Sensitivity of the TIS value to this sampling can be checked by creating the tabulated BSDF scatter model, right mouse clicking on the resulting scatter node in the object tree and calling the Detailed Report.  The TIS values at predefined specular angles 0, 15, 30, 45, 60, 75 and 89.5 degrees are reported to the output window and can be checked after a modification to "Main Samps" is made.

200

Spec Samps

Specifies the number of pixels in the X and Y axes for the subregion of the unit direction cosine circle specified by "Spec Size" (see below) that will be used for the calculation of the Total Integrated Scatter (TIS) value.

 

200

Spec Size

Size of the specular subregion (in degrees) over which the "Spec Samps" setting applies.  Enter a value of 0.0 to ignore this setting.

 

This option can be useful in cases where the BSDF exhibits a "specular" nature, increasing orders of magnitude around the specular direction.  This behavior is encountered for tabular data representing surface micro-roughness, particulates, and various specular paints (ex. Z302).

10

Additional data

Apply on Reflection

The model can generate scattered rays in reflection, if the surface importance samples and raytrace property allow it.

Checked

Apply on Transmission

The model can generate scattered rays in transmission, if the surface importance samples and raytrace property allow it.

Unchecked

Halt Incident Ray

For any surface with this scatter model assigned to it, no specular rays will leave the surface, regardless of the surface coating and raytrace property settings, if this toggle is checked.

Checked

 

OK

Accept settings and close dialog box.

 

Cancel

Discard settings and close dialog box.

 

Help

Access this Help page.

 

 

 

Application Notes


Tabulated BSDF Interpolation Space

When the tabular data is processed, the a0,b0 (specular) and a,b (scatter) angle pairs are mapped into U,V,W interpolation space using the following relationships:

 

Specular ray

a0 = sin(f0) sin(θ0)

b0 = cos(f0) sin(θ0)

 

Scattered ray

a = sin(f) sin(θ)

b = cos(f) sin(θ)

 

U = a2 + b2

V = aa0 + bb0

W = a02 + b02

T = (a-a0)2 + (b-b0)2 = U - 2V + W

 

The BSDF interpolation at arbitrary incident and scatter angles takes place in this U,V,W space, where certain symmetry rules are applied to the data in order to reduce its dimensionality and improve the quality and speed of the interpolation.

 

For example, the scatter directions for 3 degree and 60 degree incident angles of an in-plane tabulated BSDF dataset having b-b0 symmetry is shown in the interpolation space below.  This particular symmetry results in a compression of the data to "V-Planes" when plotted as Sqrt(T) vs. V.  In this space, the coordinates for any arbitrary incident and scatter direction pair are calculated and the BSDF is interpolated from the nearby data points.  Because of the large dynamic range present in BSDF data, the actual interpolation is performed using log10(BSDF) values for improved numerical stability.

 

 

 

Using data from a file

A properly formatted text file must be created in order to feed the BSDF data into the Tabulated BSDF scatter model.  The sections below discuss the file header that is required at the start of the text file for all supplied data types (in-plane and out-of-plane), the formatting of the data for in-plane BSDF, and the formatting of data for out-of-plane BSDF.

 

File Header

The Tabulated BSDF data file format contains a two line header at the start of the file.

The first line of the header will always be given as:

 

type bsdf_data

 

The second line of the header describes the interpretation of the angles, the BSDF values, and any scaling of the BSDF that should be applied to the given values when read into the tabulated BSDF model.  The second header line will be provided as:

 

format angles=X bsdf=Y scale=Z

 

where X, Y and Z can take on the following values:

Header Argument

Description

X

Will use one of the following options:

deg

The specular and scatter angles are provided in degrees.

sin

The specular and scatter angles are provided as direction cosines, where alpha and beta have the polar and azimuth angle relationships shown in the Tabulated BSDF Interpolation Space application note.

 

Y

Will use one of the following options:

value

The value supplied for each scatter angle direction is BSDF.

log

The value supplied for each scatter angle direction is log10(BSDF).

 

Z

This value is applied as a scale factor on the BSDF values in the file when read into the Tabulated BSDF model.  Setting this to a value other than 1.0 will have the effect of preserving the functional form of the supplied BSDF data and raising (or lowering) the total integrated scatter value of the resulting scatter model.

 

An example of a complete file header would look like:

type bsdf_data

format angles=deg bsdf=value scale=1.0

 

The above file header tells FRED that the data in the file specifies specular and scatter angles in degrees, the value associated with each scattered direction is the BSDF, and no additional scaling of the BSDF values in the file should be applied.

 

BSDF Data

If we consider the BSDF angle plot below, we can see that there are two sets of in-plane BSDF measurements present.  A scan of the BSDF from -90 to +90 degrees scatter angle was made for a source beam incident on the sample at 3 degrees and a second scan over the same scatter angle range was made for a source beam incident on the sample at 60 degrees.

 

 

Each of the individual BSDF scans, corresponding to 3 degrees and 60 degrees, will have its own section of data in the file with each section using the following structure (tab or comma delimited formatting):

 

θ_specular

f_specular

 

θ_scatter

f_scatter

bsdf

θ_scatter

f_scatter

bsdf

θ_scatter

f_scatter

bsdf

Additional scatter data rows as needed

 

In the common case of in-plane scatter measurements, the f_specular and f_scatter values will be set to 0.  Each section of data begins with a row containing just two values that indicates the specular direction associated with the BSDF values that follow in the file.  Next, rows containing three values correspond to the scatter direction (θ_scatter and f_scatter) and the associated BSDF value in that direction.  When there is no more scatter data associated with the specular direction, a new section of data is begun using the above format for the next specular direction measurement scan.

 

Example BSDF data files are shown below for the same measurement dataset, consisting of three in-plane scans at specular angles of 0, 15 and 30 degrees (note that the azimuth angles are all zero).  The file on the left uses the angles=deg convention as indicated in the file header, where the specular and scatter directions are provided as polar and azimuthal angles in degrees.  The file on the right uses the angles=sin convention, where the specular and scatter directions are converted to a0, b0 and a, b, respectively.

 

type bsdf_data

 

type bsdf_data

format angles=deg bsdf=value scale=1

 

format angles=sin bsdf=value scale=1

0

0

 

 

0

0

 

-89.5

0

3.74E-03

 

0

-0.99996

0.003739

-78.9706

0

3.95E-03

 

0

-0.98153

0.003951

-68.4412

0

4.41E-03

 

0

-0.93004

0.004407

-57.9118

0

4.82E-03

 

0

-0.84723

0.004823

-47.3824

0

5.21E-03

 

0

-0.73589

0.005206

-36.8529

0

6.10E-03

 

0

-0.59976

0.006098

-26.3235

0

8.34E-03

 

0

-0.44344

0.008338

-15.7941

0

1.24E-02

 

0

-0.27218

0.012424

-5.26471

0

1.65E-02

 

0

-0.09176

0.016549

5.264706

0

1.65E-02

 

0

0.091757

0.016549

15.79412

0

1.24E-02

 

0

0.272181

0.012424

26.32353

0

8.34E-03

 

0

0.443439

0.008338

36.85294

0

6.10E-03

 

0

0.599763

0.006098

47.38235

0

5.21E-03

 

0

0.735889

0.005206

57.91176

0

4.82E-03

 

0

0.847231

0.004823

68.44118

0

4.41E-03

 

0

0.930041

0.004407

78.97059

0

3.95E-03

 

0

0.981529

0.003951

89.5

0

3.74E-03

 

0

0.999962

0.003739

15

0

 

 

0

0.258819

 

-89.5

0

2.54E-03

 

0

-0.99996

0.002539

-78.9706

0

2.62E-03

 

0

-0.98153

0.002617

-68.4412

0

2.86E-03

 

0

-0.93004

0.002861

-57.9118

0

3.29E-03

 

0

-0.84723

0.003293

-47.3824

0

3.82E-03

 

0

-0.73589

0.003818

-36.8529

0

4.29E-03

 

0

-0.59976

0.004293

-26.3235

0

4.92E-03

 

0

-0.44344

0.00492

-15.7941

0

6.49E-03

 

0

-0.27218

0.00649

-5.26471

0

1.01E-02

 

0

-0.09176

0.010119

5.264706

0

1.55E-02

 

0

0.091757

0.015538

15.79412

0

1.84E-02

 

0

0.272181

0.018405

26.32353

0

1.61E-02

 

0

0.443439

0.016055

36.85294

0

1.24E-02

 

0

0.599763

0.012444

47.38235

0

1.05E-02

 

0

0.735889

0.010494

57.91176

0

1.00E-02

 

0

0.847231

0.010028

68.44118

0

1.01E-02

 

0

0.930041

0.010076

78.97059

0

1.01E-02

 

0

0.981529

0.01006

89.5

0

1.00E-02

 

0

0.999962

0.010007

30

0

 

 

0

0.5

 

-89.5

0

1.83E-03

 

0

-0.99996

0.001828

-78.9706

0

1.96E-03

 

0

-0.98153

0.001961

-68.4412

0

2.23E-03

 

0

-0.93004

0.002231

-57.9118

0

2.51E-03

 

0

-0.84723

0.002513

-47.3824

0

2.90E-03

 

0

-0.73589

0.002899

-36.8529

0

3.46E-03

 

0

-0.59976

0.003462

-26.3235

0

4.00E-03

 

0

-0.44344

0.004005

-15.7941

0

4.58E-03

 

0

-0.27218

0.004583

-5.26471

0

5.98E-03

 

0

-0.09176

0.00598

5.264706

0

9.35E-03

 

0

0.091757

0.009345

15.79412

0

1.52E-02

 

0

0.272181

0.015206

26.32353

0

2.17E-02

 

0

0.443439

0.021746

36.85294

0

2.54E-02

 

0

0.599763

0.025375

47.38235

0

2.48E-02

 

0

0.735889

0.024838

57.91176

0

2.38E-02

 

0

0.847231

0.023811

68.44118

0

2.74E-02

 

0

0.930041

0.027448

78.97059

0

3.75E-02

 

0

0.981529

0.037544

89.5

0

4.51E-02

 

0

0.999962

0.045133

 

 

The overall structure for BSDF datasets that contain out-of-plane data is identical except that the azimuth angles associated with the specular and scatter directions will be non-zero.  There are, however, specific rules regarding the ordering of the specular and scatter angle data that must be followed and which are provided below.

 

 

Rules regarding the ordering of specular and scatter data

 

Specular datasets are ordered from smallest to largest.  For example, if measurement scans were made at 5, 15, 30, 45 60 and 75 degrees specular angles, the datasets must be provided in that order in the data file.

If only in-plane BSDF data is provided (most common), then the scatter data must be provided in order from smallest scatter angle to largest scatter angle OR from largest scatter angle to smallest scatter angle.  This ordering is shown in the example file formats above, where the scatter data is ordered from -89.5 to +89.5 degrees for each specular measurement scan.

If out-of-plane BSDF data is provided in the data file, then the scatter data can be provided in any order.

 

 

 

Advanced Interpolation Controls

The advanced controls described in this section are generally not needed and can be ignored for most Tabulated BSDF model implementations.

 

Exclusion Angle

There may be cases in which the interpolation scheme generates artifacts for interpolated BSDF values that are unphysical.  Though rare, this may be seen specifically in datasets which are highly "specular", in the sense that the BSDF is changing rapidly from sample to sample as you approach the specular direction, and is compounded when the near-specular sample points are sparse.  In such cases, high BSDF value data points may yield an unphysical influence at other locations in the interpolation space and result in unphysical interpolated BSDF behavior.

 

An example of this behavior is shown below, where the BSDF data for a specular black paint sample is loaded into the Tabulated BSDF model.  The 2D BSDF angle plot of the raw data in the file is shown below, where the specular angles of the dataset are 10, 30, 50, 70 and 80 degrees.

 

After the model is created, the 2D BSDF angle plot is called again on the Tabulated BSDF model so that the behavior of the model with interpolation included can be visualized.  The 0-degree and 15-degree curves in the plot below are synthesized from the provided tabular data and side lobes adjacent to the peaks can be observed.  These unphysical side-lobes are the result of the behavior described above, where the peak BSDF values in the specular directions have too much influence on the interpolated values at other angles and artificially increases the BSDF.

FRED offers a way to address this behavior by using an optional "exclusion angle" parameter on the format line of the tabulated BSDF file header, which has the effect of excluding points within a specified distance from specular from participating in the BSDF interpolation.  The format header keyword is exclude=X, as shown in the example below.  The value of X is sin(Dθ_exclude), where Dθ_exclude is the distance from the specular direction in degrees.

 

format angles=deg bsdf=value scale=1 exclude=0.03

 

Applying the exclude=0.03 option (exclusion angle of ~1.7 degrees) to the file format header of the specular black paint example and then calling the 2D BSDF angle plot again, we see that the side lobes in the 0-degree and 15-degree AOI curves are no longer present.

 

 

An appropriate value to provide for the exclude=X option in the format header will need to be determined empirically for a specific scatter model.  This can be done iteratively using the following procedure:

1. Specify a value for the exclude option in the tabulated BSDF data file

2. Load the file into a Tabulated BSDF scatter model and press OK

3. Right mouse click on the scatter model and call a 2D or 3D BSDF plot option to check the behavior of the interpolated BSDF

4. Repeat steps 1-3 as necessary to converge on a satisfactory value for the exclude option

 

0-degree Sampling

As noted in the Description section, the Tabulated BSDF model internally requires data corresponding to 0-degrees specular AOI.  If this data is not supplied to the Tabulated BSDF model, it will be interpolated and stored internally as part of the original data.  By default, the 0-degree data will be interpolated such that it has 181 samples from 0 to 90 degrees scatter angle.  The number of sample points for the interpolated 0-degree data can be changed using the optional argument, num=X, in the format header string, where X is the number of sample points.  If the data is in-plane only, then the number of sample points created will be exactly X.  If there is out-of-plane data in the file, then the number of points will be close to, but not exactly, X.  This is a consequence of needing to sample half of the direction cosine hemisphere and then project those sample points to the plane of incidence.  An example file format header using this option is shown below, where 501 samples in the scatter plane are requested for interpolated 0-degree data.

 

format angles=deg bsdf=value scale=1 num=501

 

This option is only used once by FRED when the data file is initially read into the Tabulated BSDF model and the 0-degree data is interpolated (if needed).

 

Related Topics


ABg – for polished surface scatter

Binomial - plane symmetric case of general Polynomial

Extended Harvey-Shack - shift variant form of the Harvey-Shack model

Extended Scripted - User-defined scattering function that allows manipulation of the scattered rays' polarization state

Flat Black Paint – specify Total Integrated Scatter (TIS)

Harvey-Shack – for polished surface scatter

K-Correlation – analytic PSD

Lambertian – for diffuse scatter

Phong – cosn from specular

Polynomial - General polynomial with diffuse and Lorentzian component

Scripted - User-defined scattering function

Surface Particle (Mie) – for particulate contamination

Tabulated PSD – measured PSD data

 

 

 

 

 

Copyright © Photon Engineering, LLC