export

The export section defines how an object should be exported to a file or files. The export will be performed after clicking the export icon (arrow pointing down) in the main window.

For each export, you may set fixed values for any subset of parameters, which will be applied for the duration of the export only. You may also specify image files to load for a subset of input images and cubemaps. The syntax is:

export <export specification> : <parameter1>(<value1>), <parameter2>(<value2>), <image1>(<filename1.png>);

Currently, there are the following five export types available. Additional ones may be available via extensions.

Image file export

An image, cubemap, model image, or the initial frame of an animation can be exported to a PNG or TIFF file. If the image is full_range and the TIFF format is used, the exact floating-point values will be stored. The syntax is:

export png(<image>, <filename.png>);
export tiff(<image>, <filename.tif>);

Image sequence export

An animation (including animated cubemap, model animation and particle system animation) or feedback can be exported as a sequence of PNG or TIFF images. The file name must contain the question mark symbol, which will be replaced by the numeric index of the image in the sequence. The framerate (in frames per second) as well as the total length of the animation (in seconds) must be specified. The syntax is:

export png_sequence(<animation>, <filename_?.png>, <framerate>, <length>);
export tiff_sequence(<animation>, <filename_?.tif>, <framerate>, <length>);

Image for each export

If you need an effect applied to multiple images in the same directory, you may use the "foreach" variant of image export. This is similar to image file export, but you have to include the question mark symbol in the output filename, and in the filename of at least one input image. (However, it cannot be in the name of a directory!) This represents a wildcard that matches any substring. All input files matching the template will be then loaded one by one, and exported with the output filename wildcard matching the input. If there are multiple input file templates, the export will be performed only when a matching file is found for all inputs. The syntax is:

export png_foreach(<output_image>, <output/?.png>) : <input_image>(<input/?.png>);
export tiff_foreach(<output_image>, <output/?.tif>) : <input_image>(<input/?.tif>);

WAV export

A sound can be exported as a WAV (PCM) file. The length in seconds must be specified. The syntax is:

export wav(<sound>, <filename.wav>, <length>);

Vertex list export

The vertices of a model can be exported into a text file, formatted as a C-style array of floating point values – the fragment data. The syntax is:

export vertex_list(<model>, <filename.txt>);

This export is not applicable if vertices are specified as animated.