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, 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 image, animation, or cubemap can be exported as a sequence of numbered PNG or TIFF files. If the subject is animated, framerate and total time must be specified. If it is static, frame count and a control variable must be specified, which will vary between individual frames of the sequence. The control parameter must be an integer or float, its value will start at 0, and will be incremented by 1, unless set differently by an optional additional argument.
The file name must contain the question mark symbol, which will be replaced by the numeric index of the image in the sequence. A string of multiple question marks can be used to specify the number of digits. The syntax is:
export png_sequence(<animation>, <filename_?.png>, <framerate>, <length>); export tiff_sequence(<animation>, <filename_?.tif>, <framerate>, <length>); export png_sequence(<image>, <filename_?.png>, <control parameter>, <frame count>); export tiff_sequence(<image>, <filename_?.tif>, <control parameter>, <frame count>);
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>);
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 vertex list, generator, or the output of a model's vertex shader (the fragment data) can be exported into a text file, formatted as a C-style array of floating point values. The syntax is:
export vertex_list(<subject>, <filename.txt>);