This chapter describes the use and features of the Export plug-in.
Export Plug-In Features
Method of Use
Executing from MAXScript
Errors and Warnings
The Export plug-in includes a feature for outputting intermediate files to a specified folder.
To output data for particular nodes only (including lower nodes in the hierarchy), select the nodes you want to output. When outputting the entire scene, it is not necessary to select nodes.
To display the Options window, run NW4C Export with Setting.
To output the intermediate file, specify the appropriate options and click Export or Apply. Unlike Export, Apply does not close the Options window after output. The option settings that exist at the time of output are automatically recorded as the current options.
Options related to outputting intermediate files.
Sets the output target.
Specify All to export the entire scene, or Selection to export only the selected nodes and any lower nodes in the hierarchy.
Specify the name of intermediate file. (Omit the file extension.)
Clicking the Scene button to the right sets the current scene name. Clicking the Node button sets the name of the selected node (the topmost node in the selected hierarchy).
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 File Path.
Texture files are output to the Textures folder located inside the folder specified by File path.
Select this option when transferring intermediate file data to CreativeStudio. It is not possible to select Output 3D Intermediate Files and Use Creative Studio at the same time.
For details on using Creative Studio, see the NintendoWare for CTR CreativeStudio manual.
Turn this option on and specify the path of a CMDL file to merge that specified CMDL file.
The following information gets merged:
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.
The physique and default skin pose are determined based on the biped figure mode and bone skin pose. Sometimes turning this option on will correctly output data for which skinning cannot be correctly output otherwise.
When using this option, you must set bones used by the physique and skin and a skin pose for all associated parents. Even if biped and bone are combined, be absolutely sure to set a skin pose for bones.
Specifies the range of animation to output (that is, the start frame and end frame).
Selecting All outputs the full range of animation in 3ds Max (Animation Start/End).
Selecting Range allows the start frame and end frame to be entered as numeric values. Note: If the entered start frame is smaller than the Animation Start value in 3ds Max, this Animation Start value will be used as the starting frame. Similarly, if the entered end frame is larger than the Animation End value in 3ds Max, this Animation End value will be used as the ending frame.
If attributes are being animated, the start frame value will be output to the CMDL file.
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.
This allows data optimization while outputting data from 3ds Max to intermediate files. Options for this optimization process are set here.
Specifies the node compression mode to use for the entire model. The load due to both the matrix computations and the amount of memory used can be reduced by lowering the number of nodes.
What gets compressed are the nodes (bones) output to the intermediate file; the data in 3ds Max is not changed.
Currently, node compression is supported for CMDL files only.
| Mode | Description |
| None | Do not compress nodes. The hierarchical structure in 3ds Max is output as-is without any compression. |
| 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. 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. |
| 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. |
Unite Below Node has been deprecated.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 degree of precision to use for vertex data when converting to binary data.
If a fixed-point number is used, the amount of data is less than when a floating-point number is used, but precision is lowered.
Specifies the precision to use for vertex 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.
Specifies the precision to use for normal vector.
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.
Specifies the precision to use for 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.
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 on Max3ds | |
|
|
| 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 rendering process load goes down, 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 to 0 when not using vertex lighting and user uniforms. |
These are animation-related options.
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 0.5 fractional 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 option is selected, data for loop playback is output.
If this option is cleared, data for one-time playback is output.
Animation curve data created using this option varies when animation curve data is created automatically from baked data.
If enabled, skeletal animations are stored in frame format.
If disabled, 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 start frame value 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 animation curve data is created automatically from baked data, a key for each frame (in the units specified by Frame Precision) is created and the key for the below tolerance value specified here is deleted by the maximum differential value when performing Hermite interpolation. 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 character 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 allowable value for errors in each color value and alpha value of a color or scene animation.
This value is the allowable value for errors for color values between 0 and 1 in 3ds Max after they have been multiplied by 255.
To input or output the option settings as a C3ES (CTR 3D Export Settings) file, use the NW4C Settings menu item in the Options window.
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. When the scene is opened, the option settings that were saved in the scene data are loaded. 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 with the scene. Furthermore, option settings are not loaded when scene data is opened.
Regardless of whether Save/Load Scene Settings is on or off, option settings at the time an intermediate file was last output are saved as a default settings file.
In addition, this default settings file is loaded at time of next startup.
The default settings file is saved under the name nw4cmax.c3es in the plug-in settings folder C:\Documents and Settings\[user_name]\Local Settings\Application Data\Autodesk\3dsmax\[max_version]\jpn\plugcfg.
To delete the option settings saved in the scene data, click Reset Scene Settings.
To delete the option settings that were saved in the scene data, click Delete Scene Settings. However, this only works if you clear Save / Load Scene Settings and then save the scene data. If you do not save the scene data, the option settings are retained.
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.
If an error or warning occurs during export, it will be output to the listener window.
Some errors are also displayed in a message box.
The error list as currently implemented is presented below in alphabetical order.
When an error is detected, the Export process halts.
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_ROOT. If the environment variable NW4C_ROOT is not defined correctly, correct the definition and restart 3ds Max.
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.
Nodes affected by skinning are not output. This error arises when Export Target is set as selection and nodes affected by skinning are not selected, or when no envelope has been assigned to a vertex even though a skinning modifier and Physique modifier are being applied.
This error occurs if the path for the CMDL file to be merged is left blank or if the filename contains illegal characters.
There is no active node to be output.
This error occurs when the output specifications for the intermediate file are all cleared, or when only the output specifications for texture data are selected but there is no texture to output.
This error occurs if the Export option Output File Name is left blank or if the filename contains illegal characters.
This error occurs if the Export option Output Folder is left blank or if the filename contains illegal characters.
More than one vertex color exists for the user vertex attribute of the given number. For example, this error would occur if there were vertex colors with the names nw4cUser0 and nw4cUser0_b for the same single object. Either delete the unnecessary vertex colors or change their names.
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.
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.
The Warning List, as it is currently implemented, is presented below in alphabetical order.
The Export process will continue, even if a warning is detected.
The specified output range exceeds the playback range of 3ds Max. The output range is changed to fit within the playback range of 3ds Max.
No material has been set for a node being output. A dummy material is output.
The allocated texture does not exist. If a path is included in the file name for the texture allocated for a material, the image saved in the path is accessed during output. This error occurs when no image exists on the path. Furthermore, if the texture file name does not include a path, images in the directory where the current max file exists are accessed.
This error is issued if more than three textures are set for a material. Make sure the number of textures used by a material is three or less.
This error occurs when UV data used to calculate the tangent used by an anisotropic reflection shader cannot be found.
The channel n map is set in the objects for which a map channel n does not exist.
Because normal output cannot occur in this state, output is performed by forcibly pasting the UV information for map channel 1.
A material name output to the intermediate file was changed because two or more materials had the same name.
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 texture name contains illegal characters. Illegal characters are converted to an underscore (_) and output as such.
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 CTEX file to be output.
The only texture maps that can be used are mipmaps, normal maps and composite maps.
A normal vector that has length 0 exists. Lighting effects will not be carried out normally. Fix this using some means like the Edit normal modifier or a smoothing group.
Billboard settings are not output when the Convert to Model option is turned ON.
CONFIDENTIAL