BSDF converter toolbox

BSDF converter screenshot

This toolbox allows importing BSDF data from measurement tools into Ocean. Various input formats will be supported in the future. Currently, it only supports a sparse CSV table format and AxF SVBRDF.

You may find this tool in the File menu. It is enabled only when a scene is open. The BSDFs are imported as new materials in the Objects toolbox.

Sparse CSV table BRDF

Several files can be processed at once (one per material). The material name is read in the metadata, if none is found, the file name is used instead.

BSDF resolution

The H steps and D steps parameters define the resolution of the imported BSDF as described in Rusinkiewicz table BSDF.

Gain

The provided BSDF values are multiplied by this number before creating the Ocean BSDF. If you used to convert files from the Murakami GCMS-3B format with Ocean 2016, you need to set this value to 1/π (0.318310), as they are multiplied by π in the file.

Splitting options

The Split checkboxes allow splitting the resulting BSDF into diffuse, glossy and specular components, using an advanced algorithm. The angular specular/glossy and glossy/diffuse angular limits may be adjusted below.

When this option is used, the created BSDF is of Additive BSDF type, with child BSDFs corresponding to the components.

File format

This formats use the CSV table formatting standard defined in RFC 4180

A sample file is available for download here : bsdfconverter-sparse-example.csv

The file may start by an arbitrary number of lines containing metadata. Only one tag is recognized, and used as the material name. It can be “sample name”, “name” or “sample”, and its value is read on the cell on the right on the next row. The tag name case is ignored, and may be followed by a colon character. For instance, “Sample Name:” is valid.

Other tags are ignored, and metadata lines are skipped until the data header row is detected.

The data header row identifies the data columns and precedes the data rows. Column names are case insensitive. A valid data header must contain at least these columns:

  • theta-in : The incident theta angle

  • theta-out : The scattered theta angle

  • phi-in : The incident phi angle

  • phi-out : The scattered phi angle

  • at least one wavelength column

Wavelength column names are made of the wavelength value with a unit, which must be m, mm, µm, um or nm. The unit is mandatory.

Other columns are ignored.

BRDF values are then given on the following rows, until the end of file. Each row correspond to a set of angles in degrees and the corresponding spectral BRDF values.

BRTDF Converter

This is a split BRDF / BTDF converter. It works by combining a BRDF and a BTDF into a single material.

This converter works similarly to the Sparse CSV Table converter.

The BRDF and BTDF are two “Sparse CSV Table” files, that are assigned by their respective file path.

In contrary to other converters, this one only processes a single pair of BRDF/BTDF at a time.

The created material will contain an Additive BSDF with a “reflective” (if a BRDF was given in input) and “transmissive” (if a BTDF was given in input) part. Its name will be either the one from the BRDF or the BTDF if no BRDF was given.

AxF SVBRDF

Ocean is able to read the X-Rite AxF file format, designated by the file extension *.axf. It only supports the SVBRDF type of material for now.

As with the sparse CSV table brdf, multiple files can be processed in one step. Converting the files produces Materials and Textures that are added to the currently opened scene. The materials will be of type AxFSVBRDF.

LBNL Report

Ocean is able to read LBNL reports. It only supports ASCII files and it will process one file at a time.

Each imported file will create material a specular BSDF with a mixed tabulated inlaw. The data read in the LBNL report will fill the angular spectrums.