# Brdf1

Keywords: BRDF

## Summary

This scene demonstrates use of the various options for attributing objects with bidirectional reflectance distribution function (BRDF) surface properties.

## Related Materials

The following demos, manuals and tutorials can provide additional information about the topics at the focus of this demo:

- Related Demos

  - N/A

- Related Manuals

  - Surface Properties Manual

- Related Tutorials

  - N/A

## Details

This scene contains a series of example materials that have examples for configuring a variety of diffuse (Lambertian) and specular materials. These material configurations include examples of the following:

- The Mirror radiometry solver.

- The Shell Target model.

- The Ward model.

## Important Files

This section highlights key files important to the simulation.

### Geometry

The geometry of the scene is completely defined in the `geometry\demo.odb` file using built-in geometry primitives (boxes, spheres, cylinders, etc.).

### Materials

The materials are described in the `materials/demo.mat` file. The table below summarizes the materials used in the scene:

Table 1. BRDF Materials
ID | Material | Rad Solver | BRDF Model
--- | --- | --- | ---
2 | Perfect Reflector | Mirror | N/A
10 | Lambertian White | Simple | Ward
11 | Lambertian Black | Simple | Ward
500 | Glossy Red Paint | Simple | Shell Target (method=0)
510 | Glossy Red Paint | Simple | Shell Target (method=1)
520 | Glossy Red Paint | Simple | Shell Target (method=2)
600 | Gold, shiny | Simple | Shell Target (method=0)
610 | Gold, slightly dull | Simple | Shell Target (method=1)

The "Perfect Reflector" material uses the specialized Mirror radiometry solver, which models a perfect mirror. As such, it does not need any surface material properties defined.

The lambertian materials use the Ward BRDF to described spectrally flat reflectors that have no specular component.

The variants of the "glossy red paint" and "gold" use the Shell Target BRDF model to describe more complex BRDFs. The various variants are differentiated by the spectral interpolation method, which is discussed in greater detail here.

All of the materials (except the mirror-like material) use the Simple radiometry solver with the "low" setting, which does a good job of capturing the contributions of these well behaved BRDFs.

## Setup

There are two simulation scenarios in this demo:

1. A single-frame simulation

2. A multi-frame (video) simulation

### Running the Single-Frame Simulation

This single-frame simulation produces a single image file. To run the simulation, perform the following steps:

1. Run the DIRSIG `demo.jsim` file

2. Load the resulting `demo-t0000-c0000.img` file in the image viewer.

### Running the Multi-Frame Simulation

The multi-frame simulation produces 51 image files. To run the simulation, perform the following steps:

1. Run the DIRSIG `spint.jsim` file

2. Load the resulting `demo-t0000-c0000.img`, `demo-t0000-c0001.img`, etc. files in the image viewer.

## Results

### Single-Frame Simulation

The single-frame simulation produces the single-frame simulation shown below:

Figure 1. Output of the single-frame simulation (two percent scaling).

### Multi-Frame Simulation

The output of the multi-frame simulation is 51 individual image files. The frames can be scaled and encoded into a video format for viewing using a variety of 3rd party software tools (ffmpeg, mpeg_encode, etc.).

Figure 2. Animation of the multi-frame "spin" collection.

### DIRSIG5 Notes

Maximum sample count observed is 3344 using the "reference" convergence criteria June 21, 2017 for demo.sim for dirsig5 5.0.6 (r1477M)