Skip to content

Conditions File Format

Ben Heasly edited this page Jul 26, 2013 · 20 revisions

RenderToolbox3 uses a conditions file to organize variables that manipulate the parent scene. Some variables control the rendering process and these use special keyword names. Other variables are user-defined and have arbitrary names. Every variable gets a list of values, and the number of values determines how many variants of the scene should be rendered.

Layout

The conditions file should be a plain text file with a tabular format. Columns are tab-separated and declare variables for manipulating the parent scene. Rows are separated by new lines, and each row contains a set of values for each variable.

A typical conditions file would look like this:

imageName     sceneFile          foo   bar   myLightingSpectrum
% night time
nightCafe     myCafeScene.dae    1     0     moonLight.spd
nightPark     myParkScene.dae    0     1     moonLight.spd
nightHarbor   myHarborScene.dae  1     0     moonLight.spd
% day time
dayCafe       myCafeScene.dae    1     0     dayLight.spd
dayPark       myParkScene.dae    0     1     dayLight.spd
dayHarbor     myHarborScene.dae  1     0     dayLight.spd

The first row contains variable names: imageName and sceneFile are keywords that would control the rendering process. foo, bar, and myLightingSpectrum represent user-defined variables.

Subsequent rows contains one value per variable. In this example, each variable has 6 values, representing 6 rendering conditions. The parent scene would be manipulated to produce a family of 6 renderer-native scene files and renderings.

Comments

Any line that begins with a % character is ignored as a comment (except the first line). For example:

imageName     sceneFile          foo   bar   myLightingSpectrum
% night time
nightCafe     myCafeScene.dae    1     0     moonLight.spd
nightPark     myParkScene.dae    0     1     moonLight.spd
% the harbor scene file is broken
%nightHarbor   myHarborScene.dae  1     0     moonLight.spd

Keyword Variables

Variables with keyword names affect RenderToolbox3 batch processing:

  • sceneFile specifies the scene to render for each condition.
  • renderer specifies which renderer should render the scene ("PBRT" or "Mitsuba").
  • adjustmentsFile specifies a renderer adjustmentsFile, which includes scene elements that Collada doesn't know about.
  • imageName specifies a base name for the output image (default is numbered images).
  • imageHeight specifies the height in pixels of the output image
  • imageWidth specifies the width in pixels of the output image
  • mappingsFile specifies a mappings file, which associates variables with parts of the scene.
  • groupName specifies which blocks of mappings to use from the mappings file.

All of the keyword variables are optional. All of them besides imageName and groupName can be specified by other means when invoking batch processing utilities. When a variable is specified more than once, the value in the conditions file takes precedence.

See Adjustments Files for more about adjustments files. See Mappings File Format for more about mappings files.

User-Defined Variables

User-defined variables can have arbitrary names. It's probably a good idea if they contain only alphanumeric characters.

Clone this wiki locally