-
Notifications
You must be signed in to change notification settings - Fork 2
Overview
RenderToolbox3 is a set of Matlab tools that facilitates 3D rendering with physically-based renderers.
A particular focus is on easy manipulation of surface spectral reflectances, surface materials, and illuminant spectral power distributions. One target application for the toolbox is visual psychophysics, where often manipulating these variables is of experimental interest.
Above, the renderer PBRT rendered a dragon scene, 4 times, with the dragon's material as a variable.
RenderToolbox3 prescribes a workflow that includes 3D modeling of a parent scene, batch processing of the scene to produce a family of renderer-native scene files, rendering with a physically-based renderer to produce a family of renderings, and image processing of the renderings to produce viewable images and do other analyses.
The workflow involves a few different applications and files.
Most scenes start life in a 3D modeling application, which allows the user to define a 3D scene which contains a camera, lights, shapes, and materials. The modeling application also lets the user save a scene file.
RenderToolbox3 uses Collada scene files. Collada is an XML-based, open standard for specifying 3D models.
Blender is a nice, open-source 3D modeling application that can export Collada files. We developed RenderToolbox3 with Blender in mind.
RenderToolbox3 has a "batch renderer", which runs in Matlab. The batch renderer can manipulate a Collada parent scene and produce a family of renderer-native scene files, each of which may differ by parameter values.
Parameters and values are defined in a "conditions file" and a "mappings file".
The conditions file is a user-defined text file that uses the RenderToolbox3 Conditions File Format. It contains variables and values which can modify the scene or affect how the scene is rendered. It also determines how many variants of the scene to render.
The mappings file is a user-defined text file that uses the RenderToolbox3 Mappings File Format. It specifies how to take variables from the conditions file and apply them to elements of the parent scene. For example, a variable named "surfaceReflectance" could be applied to a material, and a variable named "lightSpectrum" could be applied to a light source.
RenderToolbox3 can use two different physically-based renderers: PBRT and Mitsuba. Both are open-source. The RenderToolbox3 batch processing utilities can produce native scene files for either renderer.
RenderToolbox3 works with sampled spectra, as opposed to RGB colors. This requires special multi-spectral builds of the renderers. We have pre-built versions of PBRT, and Mitsuba which should work with OS X 10.6 or later. We also have instructions for Building Renderers.
The RenderToolbox3 rendering utilities produce mat-files that store multi-spectral images in units of radiance. This facilitates comparisons of renderings produced by the two renderers, and other analyses.
Multi-spectral data files are rich in information, but difficult to visualize. RenderToolbox includes image processing utilities for converting multi-spectral data to sRGB images and montages, and other "sensor images" that calculated with arbitrary color matching functions. These utilities are largely based on utilities from the Psychophysics Toolbox.
A montage of 24 "Color Checker" dragons represents the typical RenderToolbox3 workflow:
- 3D Modeling The scene was modeled in Blender and saved in a Collada file, which included a camera, lights, a floor, walls, and a 3D dragon model.
- Batch Processing A conditions file specified 24 "Color Checker" colors. A mappings file associated the colors with the dragon's surface material. Batch processing utilities produced a family of 24 renderer-native scene files, one for each color.
- Rendering Each renderer produced 24 multi-spectral data files, one for each color.
- Image Processing For each renderer, the family of 24 multi-spectral data files was condensed into a single sRGB montage.
Above, PBRT rendered a dragon scene, 24 times, with the dragon's color as a variable.
Above, Mitsuba rendered a dragon scene, 24 times, with the dragon's color as a variable.
You can find instructions for Installing RenderToolbox3 and Getting Started here on the wiki.


