# Arnold Scene Source files

You are viewing an old version of this page. View the current version.

Version 2

native scene definition format, stored in human-readable, editable ASCII files that can later be rendered outside of CINEMA 4D with kick (a multi-platform, command-line utility) or used for rendering via procedurals.

## ASS Export Dialog

C4DtoA lets you save scenes to .ass files. The ASS export dialog can be accessed from Plugins > C4DtoA > ASS Export:

The dialog shows Arnold related options and frame settings described below.

#### Arnold Scene Source files

The path where the archive (.ass) will be saved to. Numbers in a path recognized as frame padding and automatically replaced with # characters. For example if you select /path/to/test_0004.ass from a sequence in the file dialog, /path/to/test_####.ass will be shown in the filename field. If you want to use static numbers instead you have to replace the padding manually.

#### Arnold Scene Source files

Set to Procedural when the exported ASS file is meant to be loaded in an Arnold Procedural (stand-in).

#### Arnold Scene Source files

Defines the objects to be exported:

• All: Export all objects (geometries, lights, etc.) from the scene.
• Selected: Export only the selected objects.
• Selected individually: Export the selected objects to separate ASS files. The object name is added to the file name as a suffix (e.g. myexport_Sphere.assmyexport_Cube.ass, etc.)

#### Arnold Scene Source files

Exports the scene directly to gzip-compressed files with the .ass.gz extension. You can expect compression rates in the 4-5x range (compared to full ASCII form, obviously there will be a lower compression ratio if the binary encoding option is being used).

#### Arnold Scene Source files

Specify whether binary encoding is used to compress large arrays (bigger than 16) containing float in their components. They are encoded into a more compact ASCII representation (b85), leading to smaller files and faster load times, whilst still being mostly human-readable.  In addition, the binary encoding has exact 32-bit precision, whereas without this binary output floating point values are truncated into at most 8 ASCII digits (e.g. 1234.5678). The encoded arrays are indicated by prefixing the array type with "b85" as in the example below. POINT2, POINT, and VECTOR arrays are encoded. 16 float

polymesh

{

name mymesh

nsides 54 1 UINT  3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4

 4 4 4 4 4 3 3 3 3 3 3 3 3 3

vlist 47 1 b85POINT

 LJ4iv4THCEE/NV4/1nPCvhpuBkEMk10/LJ4iv2uf+kDVzHI/36OGvhkc/kD9+Fs/LGenvtmU8EDqJVo/l1cGv+Ij50D1 ...

#### Arnold Scene Source files

Internally, Arnold creates shape nodes from procedural nodes (usually on demand). 'Expand procedurals' expands the nodes before doing the Ass export. Therefore when saving .ass file you will get all of the nodes that have been created by the procedural.

#### Arnold Scene Source files

Exports the whole hierarchy of the selected objects (instead of manually selecting all children).

#### Arnold Scene Source files

Available in Procedural mode. When enabled the exported objects are replaced with an Arnold Procedural object pointing to the ASS file.

#### Arnold Scene Source files

Specifies which of the following node types are included in the ASS export:

• Option
• Cameras
• Lights
• Shapes
• Drivers
• Filters

#### Frame range

Specifies the range of frames to be exported:

• Use render settings: frames specified for render (Render Setting / Output) will be exported.
• Current frame: exports only the current frame.
• Custom: exports frames specified by the Frame start/end/step settings.

#### Arnold Scene Source files

Specifies the start frame of the sequence to be exported in custom mode.

#### Arnold Scene Source files

Specifies the end frame of the sequence to be exported in custom mode.

#### Arnold Scene Source files

The increment between the frames to be exported in custom mode.

#### Arnold Scene Source files

Writes the ASS file(s) to the disc.

## Arnold Scene Source files

Besides the above dialog ASS export can be executed from the command line as well via the -arnoldAssExport parameter followed by the export options. Note that you have also use the -nogui parameter to disable the user interface.

For example, the following command exports frame range 10-20 of myscene.c4d to myscene.ass on Window:

c:\Program Files\MAXON\CINEMA 4D R16\CINEMA 4D.exe -nogui -arnoldAssExport "scene=c:\path\to\myscene.c4d;filename=c:\path\to\myscene.ass;startFrame=10;endFrame=20"

Note that the export runs in the background, therefore, you have no output in the console. You can redirect the output of the call to a file using the > directive:

c:\Program Files\MAXON\CINEMA 4D R16\CINEMA 4D.exe -nogui -arnoldAssExport "scene=c:\path\to\myscene.c4d;filename=c:\path\to\myscene.ass;startFrame=10;endFrame=20" > export.log 2>&1

The following options are available by the arnoldAssExport parameter:

• scene: path to the C4D scene file to export. This parameter is mandatory.
• filename: path of the output .ass file. If not given .ass file is exported next to the c4d scene file.
• compressed: if given the scene is exported directly to gzip-compressed files (.ass.gz).
• asciiAss: if given values exported to a standard text format, if not given (default) binary encoding is used.
• expandProcedurals: if given procedurals will be expanded before exporting the scene.
• mask: specifies which Arnold node types are included in the .ass export. See the AtNodeEntry page of the Arnold API for the available node types.
• exportType: specifies which objects are exported. Possible values are:
• 0: all
• 1: selected
• 2: selected individually
• startFrame: specifies the start frame to be exported. When not given scene's render settings will be used.
• endFrame: specifies the end frame to be exported. When not given scene's render settings will be used.
• frameStep: specifies the increment between frames. When not given scene's render settings will be used.
• camera: you can override active scene camera by this option by specifying the name of the camera. Note that camera names must be unique otherwise always the first camera with the same name is used.

## Arnold Scene Source files

ASS export is implemented as a command which means it can be called from scripts as well. using the CallCommand() function with id of 1029993. Export options can be defined via a document setting.

For example, the following python script exports frame range 10-20 to myscene.ass:

import c4d

ARNOLD_ASS_EXPORT = 1029993

def main():
options = c4d.BaseContainer()
options.SetFilename(0, "c:\\path\\to\\myscene.ass")
options.SetInt32(6, 10)
options.SetInt32(7, 20)
doc.GetSettingsInstance(c4d.DOCUMENTSETTINGS_DOCUMENT).SetContainer(ARNOLD_ASS_EXPORT, options)

c4d.CallCommand(ARNOLD_ASS_EXPORT)

if __name__=='__main__':
main()

List of available option ids can be found in C4DtoA/res/c4d_symbols.h header file. They are the following:

• 0 (Filename) filename: path of the output .ass file. If not given .ass file is exported next to the c4d scene file.
• 1 (Bool) | compressed: if true the scene is exported directly to gzip-compressed files (.ass.gz).
• 2 (Bool) | bounding box: if true bounding box of the scene are added to the ASS meta data.
• 3 (Bool) | binary: if true binary encoding is used.
• 4 (Bool) | expand procedurals: if true procedurals will be expanded before exporting the scene.
• 5 (Int32) | mask: specifies which Arnold node types are included in the .ass export. See the AtNodeEntry page of the Arnold API for the available node types.
• 6 (Int32) | start frame: specifies the start frame to be exported. When not given scene's render settings will be used.
• 7 (Int32) | end frame: specifies the end frame to be exported. When not given scene's render settings will be used.
• 8 (Int32) | step frame: specifies the increment between frames. When not given scene's render settings will be used.
• 11 (Int32) | export objects: specifies which objects are exported. Possible values are:
• 0: all
• 1: selected
• 2: selected individually
• 12 (Bool) | replace with Arnold Procedural: replaces the exported objects with an Arnold Procedural pointing to the ASS file.

• No labels