|
Description
This BSDF fitting utility accepts Tabulated BSDF formatted data files (in-plane data only) and fits the data to one of the following functional forms; Harvey-Shack, ABg, or Extended Harvey Shack. If the data provided does not follow the form of these functions, the resulting fit will be poor. In such cases, the Diffuse Binomial/Polynomial BSDF data fitting utility should be considered.
BSDF Angle and |B-B0| plots for each of the supported functional forms is shown below. Prior to using this fitting utility, plot the input data and visually confirm that it exhibits the behavior similar to that shown below. Generally speaking, these functional forms represent scattering with a "specular" characteristic that may change as a function of AOI, where the BSDF is rapidly increasing near the specular direction.
|
Harvey-Shack
|
|
.png)
|
|
ABg
|
|
.png)
|
|
Extended Harvey-Shack
|
|
.png)
|
The fitting routine is a proprietary algorithm that uses an analytic solution to the functional form as a first step, followed by a subsequent optimization that minimizes the relative error of the fitted BSDF values. A typical workflow for using this data fitting utility is the following:
1. Load the in-plane Tabulated BSDF data file into the utility.
2. Specify the functional form to be fitted, which should be based on the user's existing knowledge of the dataset being provided.
3. If relevant, apply any minimum or maximum BSDF value thresholds based on the user's existing knowledge of the dataset being provided.
4. Unlock all Parameters.
5. Press the "Perform Fit" button.
6. Inspect the updated values in the Parameters section of the dialog. Check the Status section of the dialog for the returned fitting error function value (smaller numbers are better).
7. Press the "Plot Angles" button to see a 2D BSDF Angle plot of the raw data and fitted functional form. Or, press the "Plot b-b0" button to see a 2D BSDF |B-B0| plot of the raw data and fitted functional form.
8. If the fit looks to be of sufficient quality, press the "Create Model" button to add the fitted model to the Scatterers folder on the object tree.
9. If the fit looks to be insufficient, attempt to improve the fit by manually specifying values for any of the Parameters and then using their associated "Lock" option to hold the value(s) fixed. Repeat steps 5-7 as necessary.
Navigation
This feature can be accessed in the following way:
•Tools > BSDF Data Fitting > Harvey/ABg Data Fitting
Controls
|
Control
|
Inputs / Description
|
Defaults
|
|
BSDF Data File
|
Use the Browse button to select a properly formatted *.txt file containing the BSDF data to be fit. The required file format is described in the Tabulated BSDF help topic.
This utility only will reject any data file that contains out-of-plane BSDF data. If such a file is selected, the user will receive the following error message:
"Found out-of-plane data. Harvey/ABg fit routine requires only in-plane data. Please select another dataset."
The data file should be modified so that it contains only the in-plane subset of the BSDF data.
If the file only contains BSDF values for a single AOI, the user will receive the following warning:
"Read BSDF data at only one AOI! Extrapolation at other AOI is likely to be inaccurate!"
As no information regarding the AOI dependence of the BSDF is available, the P and Q parameters of the Extended Harvey-Shack functional form will not be varied during fitting (these parameters are AOI dependent). The user is still able to manually specify values for P and Q if desired. Fitting of the P and Q parameters in an Extended Harvey-Shack function requires a minimum of two AOI datasets.
|
Empty
|
|
Function
|
|
Radio button controlling the functional form used for data fitting.
•If ABg is selected, the fitting algorithm will use the Harvey-Shack functional form internally and then convert to an ABg form using the following relationships:
B = L^(-S)
g = -S
A = b0B
•The text labels for the top row of parameters will be updated according to the selected functional form.
•The P and Q parameters will be greyed out unless the Extended Harvey-Shack form is selected.
|
Harvey-Shack
|
|
Options (applied during fit)
|
|
Ignore above maximum
|
For the purpose of fitting, BSDF values above the supplied value will be ignored.
|
Unchecked
|
|
Ignore above minimum
|
For the purpose of fitting, BSDF values below the supplied value will be ignored.
|
Unchecked
|
|
Preview Options (applied only during the summary preview)
|
|
TIS Sampling
|
The number of sample points to be used in the numerical TIS calculation presented in the chart preview of the raw data and fitted function.
|
101
|
|
Parameters
|
|
There are 5 possible parameters to be fit, depending on the functional form selected, with the first row corresponding to the b0, S and L parameters for the Harvey-Shack and Extended Harvey-Shack functions OR the A, B, and g parameters of the ABg function. The second row of parameters always corresponds to the P and Q parameters of the Extended Harvey-Shack form and will only be active when that function is selected for fitting. The following table indicates the range of allowed values for each parameter.
|
Model Parameter Limits
|
|
Harvey-Shack / Extended Harvey-Shack
|
ABg
|
|
b0 > 0
|
A > 0
|
|
S <= 0
|
B > 0
|
|
L > 0
|
g >= 0
|
|
P >= 0
|
|
|
Q >= 0
|
|
Each parameter has a "Lock" checkbox next to it, which determines whether that parameter is allowed to vary in the fitting process (unchecked) or whether it will remain fixed at its currently specified value (checked).
After the "Perform Fit" button is pressed, the values for each active, unlocked parameter will be updated.
|
|
Fit Statistics
|
|
After fitting has occurred, an error value is calculated for each input BSDF sample point as (BSDF_input - BSDF_fitted). The average, standard deviation, minimum and maximum error values for all input data points are then reported in the dialog. The Fit error function value reported in the Status section of this dialog may be a more useful indicator of the success (or failure) of the data fitting, even though the reported value is relative.
|
|
Plot Data Fit
|
|
Plot b-b0
|
Plots the raw data and the fitted functional form in a 2D BSDF |B-B0| chart window, where B = sin(theta_specular) and B0 = sin(theta_scatter). Though less intuitive than the "Plot Angles" option, this style of BSDF plot is commonly found in the BSDF literature. Each AOI is represented by one curve on the plot, though in the case of the Harvey-Shack and ABg functions the curves will all lie on top of each other.
|
|
Plot Data Fit
|
Plots the raw data and the fitted functional form in a 2D BSDF Angle plot, where the scatter angle is the horizontal axis and the BSDF is the vertical axis.
|
|
Status
|
|
Displays the value of the Fit error function after the "Perform Fit" button has been pressed. The fit error function is the sum of (BSDF_input - BSDF_fitted) / BSDF_input for each sample point.
|
|
|
|
Create Model
|
Creates a new Scatterer on the object tree corresponding to the fitted model of the selected functional form.
|
|
Close
|
Close dialog box.
|
|
Perform Fit
|
Perform the data fitting operation and update the Parameter values.
|
|
Help
|
Access this Help page.
|
Related Topics
Polynomial/Binomial Data Fitting
Harvey-Shack Scatter Model
ABg Scatter Model
Extended Harvey-Shack Scatter Model
Create New Scatter Model
Tools Menu Summary
|
Copyright © Photon Engineering, LLC
|
|