This chapter describes the use and features of the Export plug-in.
Export Plug-In Features
Single Output Mode and Animation Range Output Mode
Methods for Use
Errors and Warnings
Batch Export
The Export plug-in has the following features:
The Export plug-in has two processing modes: single output mode and animation range output mode.
Animation Range is a feature for setting animation sequences in scenes for export.
Whereas single output mode only allows a single model and single animation (up to one for each type of intermediate file) to be output, animation range output mode allows multiple models and multiple animations to be output at once.
Single Output Mode | Animation Range Output Mode | |
Model | Allows output of a single model. If there is more than one root node under Maya, they will be gathered under the node provided by NW4C_FORBANNER_ROOT and output as a single model. |
More than one model can be output at once. Separate models are output for each root node under Maya. |
Animation | A single animation can be output. The animation range is set using the Export options Start / End Frame. |
More than one animation can be output at once. By setting animation ranges to root nodes, animation data will be exported for each animation range. |
Filename | Filename and extension specified in the Export option Output File Name. | Model file names use the form <root node name>.cmdl, while animation file names use the form <root node name>__<animation range name>.<extension> (where two underscores follow the root node name). However, if an animation range is not set for the root node, the name takes the form <root node name>.<extension>. |
Toggle between single output mode and animation range output mode using the Export option Process Mode.
Animation ranges are set using the NW4R Set Animation Range plug-in.
In animation range output mode, if an animation range has not been set for a root node, the settings specified by the Export options Start / End Frame and Loop are applied to that root node.
Even if the Export option for node compression is enabled, the root node name used in Maya is always used for the file name when the mode is animation range output mode. Illegal characters are converted to underscores.
In animation range output mode, skinning shapes and skeletons must exist within the same hierarchical structure. |
Scene animation objects (cameras, lights) do not support animation ranges. Even when the mode is animation range output mode, only one CCAM file or CLGT file is exported with the name as given by the Export option Output File Name (i.e., specified name.ccam or specified name.clgt).
The following figure illustrates an example of a possible node configuration in Maya and the result of output (node configuration and list of files).
Node Configuration In Maya |
![]() |
The nw4c_AnimRangeCtrl node saves the animation range settings and is not output.
To output specific nodes only, select the nodes to output in Maya. Even nodes below the selected node are output.
When outputting the entire scene, it is not necessary to select nodes.
To display the NW4C Export option window, click NW4C → NW4C Export with Setting.
To output an intermediate file, specify the appropriate options and click on the Export or Apply button. Unlike the Export button, the Apply button does not close the option window after output.
Maya internally records option settings used at the time of output as its current options. You can also save option settings by scene and input/output option settings using a C3ES (CTR 3D Export Settings) file. (For details, see Managing Option Settings.)
To output the file using the current options without opening the Options window, click NW4C → NW4R Export.
By executing Edit → Save Settings in the Option window you can save the option settings without exporting the intermediate file. (Scenes are also saved if Save / Load Scene Settings is selected). Option settings can be returned to their default values by executing Edit → Reset Settings.
Options related to outputting intermediate files.
Specifies the processing mode.
Select Single for single output mode, or Animation Range for animation range output mode.
Specifies the output target.
Selecting All outputs all active nodes in the scene.
Selection outputs only the selected nodes and nodes below them.
Specifies the name of intermediate file (excluding the extension). Characters that cannot be used in file names are double-byte characters, half-space kana characters, equals signs (=), and semicolons (;).
When @node
is entered, the selected node's name is used in the intermediate file name. If multiple selections are made, the top node's name in the hierarchy is used.
To set the current scene name, click the Scene button on the right. To set the name of the selected node or, if more than one node is selected, the top node in the hierarchy, click Node. Clicking the Node button without selecting a node will set the name of top node in alphabetical order.
Select this option when outputting an intermediate file to a particular folder.
Specify the folder to which the intermediate file should be output using the option Output Folder.
Texture files are output to the Textures
folder located inside the folder specified under Output Folder.
Double-byte characters, half-space kana characters, equal signs (=), and semicolons (;) cannot be used when specifying output folder.
If the specified folder is not in Output Folder, that folder is created and output.
If Output Folder is not specified as a full path, the folder will be created beneath the current project folder.
Environment variables can be used for Output Folder. The environment variable will be written as %NAME% or $NAME.
Select this option when transferring intermediate file data to CreativeStudio. It is not possible to select Output Intermediate Files and Use Creative Studio at the same time.
For details on using CreativeStudio, see the NintendoWare for CTR CreativeStudio Manual.
Enable this option and specify the path of a CMDL file to merge that file.
You cannot use double-byte characters, half-space kana characters, equal signs (=), and semicolons (;) when specifying the CMDL file path. If the specified CMDL file path is not a full file path, it will be relative from the current project folder.
Environment variables can be used in the path for Merge cmdl File. The environment variable will be written as %NAME% or $NAME.
In animation range output mode, what gets used is the Merge cmdl File configured for each root node by the NW4C Set Animation Range plug-in.
If this configured Merge cmdl File has been de-selected, the Export option Merge cmdl File is used instead.
The following information gets merged:
If turned ON, files dependent on the cmdl file specified for Merge cmdl File are copied during merging.
These are general options available for intermediate files.
Specifies the magnification ratio by which the model's vertex coordinates and Translate value should be multiplied.
Specifies the range (start frame and end frame) of the animation to be output.
Selecting All outputs the full range of animation on Maya (Animation Start/End).
Selecting Playback outputs the playback range of animation in Maya (Playback Start/End). Selecting Range allows the start frame and end frame to be entered as numeric values.
If attributes are animated, the value specified here for the position of the Start Frame is output to the CMDL file.
Be sure to specify the same mode for the end frame of a loop animation as for the start frame.
Animation playback for the frame before the Start Frame and the frame after the End Frame is not guaranteed.
If this option is selected, the namespace part of node names and material names is removed and then data is output. In animation range output mode, the namespace part of the file name is also removed.
If this option is cleared, the namespace part is output. Each colon (:) is converted to an underscore (_).
For example, if the node name under Maya is model:final:head
and this option is selected, data is output using the name head
; however, if this option is cleared, data is output using the name model_final_head
.
If duplicate names arise as a result of removing the namespace part, names will be changed according to the same rule used when more than one node (or material) has the same name.
This option specifies the type of intermediate file to be output.
The value of HasSkinningMatrix
in the intermediate file will differ depending on whether the CMDL file and the CSKLA file are output at the same time, or only the CSKLA file is output. This is because vertex processing is omitted when the CMDL file is not output in order to shorten the processing time. Nothing is affected by the differing values for HasSkinningMatrix
.
You can optimize data using CreativeStudio when outputting intermediate files from Maya. Optimization-related options are specified here.
Mode | Description |
None | Do not compress nodes. Outputs the hierarchical structure used in Maya as is. |
Cull Useless Node | Deletes the nodes that are not required to display the model located at the end of the hierarchical structure and then exports. This is useful for models that use skinning. Notes for which the uncompressible flag has been set are not compressed. |
Cull Uninfluential Node | In addition to the processing performed when Cull Useless Node is specified, nodes whose matrices can be merged are merged and output. Generally, the number of nodes are reduced even more than with Cull Useless Node, but the following limit is placed on the Scale value. An uneven Scale value (a scale value where X, Y, and Z are not the same) must not be set for nodes that have children. Segment Scale Compensate must be set for the node. A model may not be displayed correctly if compression is performed on a node that does not observe this limitation or on any children of such a node. All frames must respect the limitation described above when a scale value is being animated. Notes for which the uncompressible flag has been set are not compressed. |
Unite Compressible Node | Nodes for which the uncompressible flag has been set are gathered. Do not select this mode when using skinning. The same scale-related limitations apply here as they do for Cull Uninfluential Node. |
Unite All Node | Gathers nodes and outputs all polygons using global coordinates. (Name of the root node is used for node name.) Do not select this mode when using skinning. The same scale-related limitations apply here as they do for Cull Uninfluential Node. |
Specifies that the material be compressed.
No compression is performed if None is specified. If Compress Same Material is specified, materials that have the same attribute are compressed and gathered for output.
Materials for which Compress has been set to Don’t compress using the plug-in for setting material attributes (NW4C Set Material Attribute) are not compressed.
Optimize Primitive optimizes polygon primitives and then outputs.
This reduces the drawing process load compared to when set to OFF.
Optimization is made to adjust the arrangement of triangles to increase the hit rate of the vertex cache inside the GPU.
The degree of improvement varies depending on data content and rendering conditions.
Improvement in performance can be expected under conditions where vertex processing has become a bottleneck.
Conversion from a skeletal model (skin model) to a model is performed if set to ON.
Conversion from a skeletal model (or skin model) to a model
Models have a simpler structure than skeletal models and can be handled more efficiently by the actual hardware.
During model conversion, all bones are combined and skeleton information (the hierarchical structure) is lost.
Skeleton information is destroyed, making it impossible to use skeletal animation and billboarding.
Regarding the eliminated of the disable SkeletalModel-Simplification option
This option is for setting the precision and format to use when converting vertex data to binary data.
Specifies the precision of vertex coordinates, the normal vector, and texture coordinates.
Setting Float stores the position as a 32-bit floating-point number.
Setting Short stores the position as a 16-bit integer number.
Setting Byte stores the position as an 8-bit integer number.
The tangent is stored using the same precision specified for the normal.
These are model-related options.
Selects how the skinning mode for export is determined.
Mode | Description |
None If Possible | Behaves the same as 1.0.0 and previous versions. (Default value) For meshes that are to be skinned, the skinning is not performed if all vertices reference only a single bone. Otherwise, Rigid Skinning is performed if each vertex references only a single bone, and Smooth Skinning is performed if each vertex references two or more bones. |
Rigid Skinning | New behavior introduced from 1.1.0. This can be more efficient, but problems of compatibility can also arise. For meshes that are to be skinned, Smooth Skinning is performed if each vertex references two or more bones, and otherwise Rigid Skinning is performed. |
Selection Criteria (for deciding which would be the better selection)
If there no problems with compatibility, try the Rigid Skinning mode.
If you can confirm that drawing is more efficient, select Rigid Skinning mode.
Example of valid data: Node configuration In Maya $(NW4C_FORBANNER_ROOT)/SampleData/Graphics/DccPlugin/Maya/ForDocument/RigidSkinning_Box.mb |
|
![]() |
![]() |
Selects how to apply visibility animations.
Mode | Description |
Bind By Index | Applies visibility animations based on numbers. The visibility animations may not be applied correctly if node compression has been conducted. |
Bind By Name | Applies visibility animations based on names. |
If you need to maintain compatibility with older intermediate files, specify Bind By Index. If compatibility is not required, specify Bind By Name. |
Note: Plans call for eliminating this function in the next release. Do not specify this option.
The reason for its elimination is given below.
Enabling this option allows correct lighting of models whose XYZ scaling is non-uniform, but increases the drawing process load. Because the maximum number of matrix palettes goes down, the drawing process load ultimately increases when using skin models with many nodes that are being influenced. If disabled, the drawing process load decreases, but models whose XYZ scaling is non-uniform cannot be lighted correctly.
This setting specifies the number of uniform registers used for vertex lighting and user uniform. The setting value ranges from 0 to 57 (0 to 54 if Non-Uniform Scale is ON).
Because the number of uniform registers is limited, they are shared by skinning, vertex lighting and user uniforms. The number of uniform registers that can be used for skinning is therefore determined based on the number of lights used for vertex lighting and the number of user uniforms. The larger the value specified, the lower the number of uniform registers available for skinning and the higher the load associated with drawing skin models. The specific value to set is given by Number of vertex lights × 6 + Number of user uniforms. Vertex lights are not included in the case of hemispherical lighting. Check with the lead project programmer for the number of vertex lights and user uniforms. Set 0 when not using vertex lighting and user uniforms. |
These are animation-related options.
If this option is selected, animation curve data is created automatically from baked data and output for all animations.
If this option is cleared, the animation curve in Maya is output as is whenever possible. Parts that cannot be output as is are automatically created and output from baked data.
Specifies frame precision when animation curve data is automatically created from baked data.
If 1.0 is set, data is baked at the integer frame level.
If 0.5 is set, data is baked at the integer frame level.
If 0.2 is set, data is baked at the 0.2 fractional frame level.
If 0.1 is set, data is baked at the 0.1 fractional frame level.
Increasing precision can more accurately reproduce animations that vary discontinuously at a fractional frame timing, but the amount of time required for output increases.
If this is selected, the data are exported as looped playback data.
If this is cleared, the data are exported as one-time playback data.
If selected, skeletal animations are stored in frame format.
If cleared, skeletal animations are stored in key format.
The playback process load is lower with frame format than key format, but the amount of data is greater than usual.
For skeletal animation, the quantization precision can be set to one of 10 levels, ranging from 0 to 9.
The quantization setting only influences the content of the binary file.
The animation curve data output to the intermediate file is not affected.
You thus need to be remember that the result cannot be evaluated until it is checked on the actual hardware viewer.
Acceptable Tolerance Values for Scale / Translate
Compression Quality | Acceptable Tolerance Values | Comments |
---|---|---|
0 | ∞ | Always quantize to minimum volume format. |
1 | 0.40 | -- |
2 | 0.30 | -- |
3 | 0.20 | -- |
4 | 0.10 | Recommended value for start of adjustment |
5 | 0.06 | -- |
6 | 0.03 | -- |
7 | 0.01 | -- |
8 | 0.005 | -- |
9 | 0 | Never quantize. |
The acceptable tolerance value is set the same for the NW4R exporter.
Acceptable tolerance for Scale/Translate is determined in proportion to the maximum amplitude of the curve (the difference between the maximum and minimum values). In other words, the greater the variation in values for an animation, the easier it is to tolerate large errors in actual values.
Acceptable Tolerance Values for Rotate
Compression Quality | Acceptable Tolerance Values | NW4R conversion | Comments |
---|---|---|---|
0 | ∞ | ∞ | Always quantize to minimum volume format. |
1 | 0.50 | 0.025 | -- |
2 | 0.40 | 0.020 | -- |
3 | 0.30 | 0.015 | -- |
4 | 0.20 | 0.010 | Recommended value for start of adjustment |
5 | 0.10 | 0.005 | -- |
6 | 0.05 | 0.0025 | -- |
7 | 0.01 | 0.0005 | -- |
8 | 0.005 | 0.00025 | -- |
9 | 0 | 0 | Never quantize. |
For Rotate, the acceptable tolerance is determined not in terms of proportion, but by actual values. It takes the value specified by the NW4R exporter. This is done so the setting is the same as for NW4R conversion,
Note: The settings values shown in the table may change in the future.
This option specifies the allowable range of errors when animation curve data is optimized.
If the maximum difference between the value for start frame and the value used for every other frame remains below the allowable value specified here, the animation is assumed to be fixed and output is made using only the value for the start frame.
When automatically creating animation curve data from baked data, a key for each frame is created in the units specified by Frame Precision, and the key used for the allowable value as specified here by the maximum value for errors during Hermite correction is deleted. The smaller the allowable value for differentials, the greater the animation precision; however, as the number of keys grows larger, the amount of animation curve data also increases.
This is the allowable value for errors related to the Translate, Rotate, and Scale values used for skeletal animation.
Node Rotate is specified in units of degree.
Node Translate is the allowable value for errors related to the value prior to multiplying by Magnify.
This is the allowable value for errors related to the Translate, Rotate, and Scale values used for texture and SRT animation.
Texture Rotate is specified in degrees.
This is the tolerance value for errors in each color value and alpha value of a color animation.
This value is the allowable value for errors for color values between 0 and 1 in Maya after they have been multiplied by 255.
Use the item in the option window's NW4C Settings menu to save option settings by scene or input/output option settings using a c3es (CTR 3D Export Settings) file.
If Save / Load Scene Settings is selected (the default), the option settings used the last time an intermediate file was output will be saved as scene data when a scene is saved. (Internally, these option settings are saved to the script node named nw4cExpDialog_Setting1
.) Option settings saved for scene data are loaded when a scene is opened. (Be sure to select the Open Scene... option Execute Script Nodes.) The current option settings remain if option settings were not saved with the scene data. Furthermore, an option setting is loaded when a scene for which option settings have been saved is imported. If Save / Load Scene Settings is cleared, no option settings are saved as scene data. Furthermore, option settings are not loaded when scene data is opened.
Clicking Delete Scene Settings deletes the script node used to save option settings.
To output option settings to a C3ES file, click Save Settings to r3es File. Option settings will be output when an output file name is specified on the file selection window. If the extension of the output file is other than .c3es
, .c3es
will be added automatically.
Click Load Settings from c3es File to enter option settings from a C3ES file. Option settings will be input when an input file name is specified on the file selection window. Option settings are saved in the scene if Save / Load Scene Settings has been selected in the NW4C Settings menu.
The error that occurs during the output will be displayed in Output Window and in Script Editor.
Errors that deserve particular attention are described in alphabetical order.
CreativeStudio has not been correctly installed.
CreativeStudio must be installed in the folder tools\CreativeStudio
, located beneath the folder defined by the environment variable NW4C_FORBANNER_ROOT
. If the environment variable NW4C_FORBANNER_ROOT
is not defined correctly, correct it and restart Maya.
The animation range output mode file name (<root node name>__<animation range name>) is duplicated.
The animation range name for one model is duplicated.
Serial blend processing cannot be used for blend shapes. Be sure to clear the In-Between option when creating blend shapes.
More than one target object has been registered with the same name for blend shape. Configure it such that the base object and all target objects have unique names. To register the same shape as a separate target object, use a target object with a different name.
This error is generated when the blend shape target object and the base object differ in terms of the number of vertices, number of surfaces, or number of vertices per surface.
Cannot get the size of image due to invalid data in the texture file.
This error occurs when the file does not exist, cannot be opened, or cannot be overwritten.
CreativeStudio has failed to start. Be sure to check CreativeStudio error output.
This error is generated when animation layers are being used with texture pattern animation, but the list of textures to be output by the NW4C Set Frame Extension List plug-in has not been set. When using animation layers, be sure to set the list of textures to be output by the NW4C Set Frame Extension List plug-in.
This error is generated when expressions are being used with texture pattern animation, but the list of textures to be output by the NW4C Set Frame Extension List plug-in has not been set. When using expressions, always be sure to set the list of textures to be output by the NW4C Set Frame Extension List plug-in.
This error occurs when the list of textures output for texture pattern animation as set using the NW4C Set Frame Extension List plug-in is incorrect. Be sure to correct the list using the NW4C Set Frame Extension List plug-in.
A polygon with holes in it exists. Divide into triangles under Maya and output.
Nodes affected by skinning are not output. This error is issued in the following cases (1) the Export option Export Target is set to Selection but nodes affected by skinning have not been selected; (2) the Template attribute is selected for the node affected by skinning; (3) the nodes are hidden in the display layer. Furthermore, in animation range output mode, skinning shapes and skeletons must exist within the same hierarchical structure.
Multiple bind poses are in use. Detach the skin and use a common bind pose to re-bind each object.
There is no active node to be output. If you want to output only the locator, use the NW4C Set No Compress Node plug-in to set the node compression disable flag.
This error occurs when all output specifications for the intermediate file are cleared, or when only the output specification for texture data is selected but there is no texture to output.
A shading group has not been connected to the object. Be sure to allocate a material.
This error occurs when the Export option Output File Name is @node
, but no nodes are selected.
When using batch export, you must specify the -Node option for keyword Scene in the c3be file.
This error occurs if the Export option Output File Name is left blank or contains illegal characters.
This error occurs if the Export option Output Folder is left blank or contains illegal characters.
More than one color set corresponding to user vertex attributes having the same number exist. This may be issued, for example, when color sets having the names "nw4cUser0" and "nw4cUser0_b" both exist for the same object. Either delete unnecessary color sets or change their names.
This error occurs if the file node's image name is empty, or if the file name of the texture to be used for the texture pattern animation is not in the name.#.ext
format (where #
is a numeric value, and ext
is a file extension).
Be sure to specify an appropriate texture file.
A texture has a size whose height and width cannot be handled by CTR. Height and width must both be set to a power of two equal to or greater than 8 and equal to or less than 1024.
TGA file contents are invalid.
This error occurs when three or more textures are being used with a single material.
After this message a set of mesh and material names is specified. If this combination were drawn the number of vertices would exceed the limit (of 65,535 vertices). If this error occurs, divide up the pertinent mesh to get the appropriate size.
The combination of textures and UV sets differs depending on the object. For details, refer to the description of Multi UV.
This error occurs when the number of vertices of an object for which skinning or blend shape animation is set differs from the number of vertices of the original mesh node (~Orig) as a result of an operation that changed the number of vertices. For skinning, either re-bind after detaching and deleting the history, or use Edit → Delete by Type → Non-Deformer History.
This error occurs when there are vertices whose total skinning weight is less than 1.0. Be sure to correct the weight value.
Note that if the Normalize Weights attribute of the skinCluster
node is selected, the total is automatically adjusted to 1.0 when the weight value is changed.
The number of bones used by a polygon exceeds the maximum number of bones that can be referenced by a primitive.
If an error occurs, adjust the Max Reserved Uniform Registers option to decrease the number of uniform registers being reserved.
An out-of-bounds value has been specified for the Max Reserved Uniform Registers option.
The setting value must range from 0 to 57 (from 0 to 54 when the Non-Uniform Scale option is ON.
If a warning occurs during the output, it will be displayed in the Output Window and in Script Editor.
Warnings which should be paid particular attention are described in alphabetical order.
This warning occurs when Use Frame Extension is selected for a file
node and something other than an animation curve or expression is connected to the frame extension. The texture pattern animation is not output.
There is a mesh without the required texture-tangent settings among meshes being applied by the same material. Revise code so that meshes being applied by the same material have the same vertex attributes.
There is a mesh without the required vertex color among meshes being applied by the same material. Revise code so that meshes being applied by the same material have the same vertex attributes.
NURBS surfaces cannot be output. Output as a locator.
Subdivision surfaces cannot be exported. Output as a locator.
UV coordinates have not been set for the surface to which the texture has been bound. UV coordinates for each vertex of the surface are output as U = 0, V = 0.
The deformer is disabled. (The Node State attribute is HasNoEffect.) Animation using the deformer cannot be output.
Not even one file node is connected to the layeredTexture
node. Output is made as if no texture has been bound.
This warning is output when a texture corresponding to the value of Frame Extension has not been output for a particular frame. Of the textures files to output, the one closest to the Frame Extension value is used as pattern animation data.
To stop this warning from appearing, either correct the animation curve or forcibly specify the texture to be output using the NW4C Set Frame Extension List plug-in.
The animation includes frames whose Frame Offset attribute for the file node is other than 0. Note that texture pattern animation is not output correctly in this case.
The transform
node is something other than a skinned shape but the Inherits Transform attribute is cleared. Objects will not display correctly if this is not selected.
A material name output to the intermediate file was changed because two or more materials had the same name. This warning is generated when a single material has been connected to more than one shading group.
No materials are connected to the shading group. When this warning occurs, the plug-in performs output by automatically adding the default material (named DummyMaterial) to the intermediate file.
This warning occurs when two or more nodes have the same name, when illegal characters are included in a node name, or when the node name to be output to the intermediate file is changed.
The filename to be output is changed when the output filename includes illegal characters.
Procedural textures such as checker and ramp cannot be output as is, so they are ignored. First, convert to a file using Convert to File Texture, then output.
Projection mapping with a Projection utility is used. The texture is not output.
PSD file textures (psdFileTex nodes) are not output, so they are ignored.
A shader not supported by the Export plug-in is being used. When this warning occurs, the plug-in performs output by automatically adding default material to the intermediate file.
Because the Shear attribute of the transform node has a value other than 0, correct output is impossible. Be sure to either execute Freeze Transformations or to set the Shear attribute to (0, 0, 0).
Stencil mapping is being used. The texture is not output.
For the texture pattern animation, there is no texture file corresponding to Frame Extension. Of the texture files to output, the one closest to the Frame Extension value is used as the pattern animation data.
The texture name contains illegal characters. Illegal characters are converted to an underscore (_
) and output as such.
Two or more mesh nodes exist below the transform node. Only one mesh node is output.
There are two or more texture files with the same filename as the export target, but in different folders or with a different extension. Make sure that there is only one RTEX file to be output.
A normal vector that has length 0 exists. Lighting effects will not be carried out normally. Be sure to correct this using Set Vertex Normal or Set to Face.
CONFIDENTIAL