This chapter describes procedures and precautions for creating models using NintendoWare with Maya.
Nodes
Polygons
NURBS
Subdivision Surfaces
Materials
Textures
Skinning
The term "node" is used in this manual to indicate a unit that makes up the hierarchical structure of a 3D model. In Maya, this corresponds to transform nodes and joint nodes.
In the intermediate file for a skeletal model, the nodes of Maya are exported as bones.
Although it is possible to assign the same name to more than one node in Maya as long as the parent node differs, node names must not be duplicated in the intermediate file.
If more than one node having the same name is present, the node deepest in the hierarchy will be output using that name, but other nodes with that node name will be output with an underscore and a number (such as "_1" and "_2") appended to the end. If more than one node with the same name exists at the same hierarchical depth, the node displayed nearest the top of the list when Scene Hierarchy is used as the Sort Order under Outliner will be output using that node name.
Only one root bone exists for a single skeletal model when using intermediate files.
If there are multiple root nodes on Maya, the plug-in will output them to the intermediate file by grouping them together and adding a node having the name nw4c_root.
Transform nodes and joint nodes are not output when the Template attribute is selected or when these nodes are not shown in the display layers. (The exception is influence objects, which are output.)
Child nodes of nodes that are not output will also not be output.
Transform nodes that do not have children (such as a locator or an empty group) are not output. When the Template attribute or the Intermediate Object
attribute is set for a mesh node, the parent transform node is output as a meshless node. (Polygon data is not output.)
Nodes are not output if the display layer Shading attribute is turned off (Always show wireframes).
Blend-shape target objects are not output.
Nodes whose compression enable flag has been set using the NW4C Set No Compress Node plug-in will always be output, regardless of the above conditions. |
Setting the Export plug-in option Compress Node to Cull Useless Node allows nodes other than those not output above but which are also not needed to display the model to be compressed for output.
For topographical data and other cases where a hierarchical structure is unnecessary, you can collect all the nodes for output as a single node by setting the Compress Node option to Unite Compressible Node.
This section describes attributes that require particular attention.
We recommend using the same value for Rotate Pivot and Scale Pivot. If these values differ, the amount of animation data may grow immensely.
The Scale Pivot is treated as the origin for local coordinates when the intermediate file is output. Correct output is not possible if the pivot is not fixed and uniform for all frames. Do not animate the pivot.
Set Shear to (0, 0, 0). Correct output is impossible unless (0, 0, 0) is used.
We recommend xyz for the Rotate Order. If a rotate order other than xyz is used, the amount of animation data may increase.
We recommend setting the Rotate Axis to (0, 0, 0). If a rotate axis other than (0, 0, 0) is used, the amount of animation data may increase.
Be sure to turn Inherits Transform on. If it is off, correct output is not possible. As an exception, it is all right to turn Inherits Transform off for shape transform nodes if skinning has been set.
If Visibility is turned off for a transform node, all nodes lower in the hierarchy will be hidden from view. If you want to hide just the polygon objects in a particular hierarchical layer, turn mesh node Visibility off.
This section describes attributes that require particular attention.
We recommend xyz for the Rotate Order. If a rotate order other than xyz is used, the amount of animation data may increase.
We recommend setting the Rotate Axis to (0, 0, 0). If a rotate axis other than (0, 0, 0) is used, the amount of animation data may increase.
Be sure to turn Inherits Transform on. If it is off, correct output is not possible.
We recommend that Joint Orient be set to (0, 0, 0). If a rotate axis other than (0, 0, 0) is used, the amount of animation data may increase.
Take care not to change the value given by Segment Scale Compensate when outputting cmdl
files and/or cskla
files.
(Currently not set.)
Polygons that have the shapes described below cannot be displayed correctly on the CTR, so be sure to divide them into triangles in Maya before output.
Polygons that end up in the above shapes as a result of skinning or blend shape transformations should be divided into triangles in Maya and then exported.
Only one vertex color is supported per vertex.
When multiple color sets are configured, colors from the current color set will be output.
The precision of output data when the suffix for a color set name is _f is 32-bit floating point precision. If the suffix is _s, it is 16-bit integer precision. For any other suffix, 8-bit integer precision is used. For example, be sure to use a color set name like "colorSet_f" if you want to output as a 32-bit floating point value.
The number of data components per vertex is 3 components if the color set component type is RGB, and four components for RGBA. (Note that 0 is output for R, G and B if the component type is A.)
If the current color set is a color set for a user vertex attribute and other color sets for the vertex color exist, they are output as vertex colors. (If there is more than one color set for the vertex color, the first color set is output in alphabetical order.)
If a color set having any of the following names exists, the color of that color set can be output as a user vertex attribute.
「nw4cUser0
nw4cUser1
nw4cUser2
(only the U is uppercase)
The color set can be freely used by any game as a user vertex attribute.
The precision of output data is 32-bit floating point if the suffix of the above color set name is _f, 16-bit integer precision if the suffix is _s, and 8-bit integer precision if the suffix is _b or there is no suffix. For example, be sure to set the color set name to "nw4cUser0_s" if you want to output the 0th user vertex attribute as a 16-bit integer.
The number of components of data per vertex is one component (A) if the color set component type is A, three components (RGB) if the component type is RGB, and four components (RGBA) if the component type is RGBA.
In addition, if the component type is RGB or RGBA and a 2 is included before the letter indicating precision in the suffix of the color set name, the number of data components per vertex is 2. For example, be sure to set the color set name to "nw4cUser1_2f" if you want to output the 1st user vertex attribute as a 2-component 32-bit floating point number. Similarly, use "_2s" for 16-bit integers and "_2b" for 8-bit integers.
If instances are used, they are exported in the same state as substantiated instances.
However, instances of models for which skin has been configured are not supported.
Transformed animations that use proxy shapes created with "Subdiv Proxy" (for example, skinning) cannot be exported.
Only one valid mesh nodes with the Intermediate Object attribute set off should be placed under a given transform node. Normally there is only one valid mesh node in any event, but in certain cases there is more than one valid mesh node, such as after Edit Deformers > Display Intermediate Objects has been run with objects set for skinning.
Under NintendoWare, a group of polygons assigned the same material is called a mesh.
The rendering order of meshes can be controlled using the render priority set for the material.
The rendering priority is set using the NW4C Set Render Priority plug-in.
NURBS surfaces and NURBS curves cannot be exported.
Convert NURBS surfaces to polygons using NURBS to Polygons, then export. When an animated NURBS object is converted to a polygon, the polygon object will also be animated in Maya, but on the CTR console it will be fixed to the Start Frame state. In this case, delete the polygon object's history and set animation for the polygon object.
Subdivision surfaces cannot be exported. Convert subdivisions to polygons using Subdiv to Polygons, then export.
In the intermediate files, one material is exported for each shading group.
If a single material is connected with multiple shading groups, the material used with the first exported node is exported with its original name, but the names of other materials are exported with an underscore and a numeral appended to them ( "_1", "_2" and so forth).
When not using specular, use the Lambert shader.
When using specular, use the Blinn, Phong, Phong E, or Anisotropic shaders. When using an anisotropic shader, tangent data is output even if normal mapping has not been set. (If there is a texture for color, the tangent is calculated from the UV set of the texture in the highest layer. If there is no texture for color, the tangent is calculated from the current UV set.)
The following attributes are reflected in the intermediate files.
Also, you can set attributes for NintendoWare using the NW4C Set Material Attribute plug-in. (1, 1, 1, 0) is always output for the ambient color in the intermediate file.
If a file node is connected to the Color attribute, the Color Gain attribute of the file node will be applied to the RGB components of the diffuse color. The file node's Color Offset attribute is not reflected. If a layeredTexture
node is connected to the Color attribute, the Color Gain attribute of the file node connected to the topmost layer will be applied to the RGB components of the diffuse color. For Transparency attributes, only the R component of RGB is reflected in the diffuse color's alpha. The G and B components are ignored. If a file node is connected to the Transparency attribute, the Alpha Gain attribute of the file node will be reflected in the alpha component of the diffuse color. The file node's Alpha Offset attribute is not reflected. The Diffuse attribute is not reflected in the intermediate file. If you want the brightness in Maya to be close to that displayed on the CTR, set the Diffuse attribute to 1.0.
The texture's filename minus the extension is exported as the texture name.
file
nodes (single texture) and layeredTexture
nodes (multi texture) can be used as textures.
Up to three file nodes can be connected to a layeredTexture
node. (Up to two when normal mapping is used.)
Procedure textures, such as checker and ramp, cannot be exported in their original form. Use Convert to File Texture to convert them to file nodes, then export them. Connect file nodes (layeredTexture
nodes) to the material's Color attribute. Set the mapping method in the Create Render Node window to Normal. (As projection and As stencil are not supported.) PSD file textures (psdFileTex
nodes) cannot be exported.
If you use TGA files that have additional information for NintendoWare, the format and texture data recorded in that additional information will be applied to intermediate files.
Currently, TGA files that have additional information can be created using the NintendoWare for CTR Photoshop plug-in. For instructions on using the NintendoWare for CTR Photoshop plug-in, see NintendoWare for CTR Photoshop Plug-in Manual.
In addition to TGA files that have additional information, all textures of file types that support file nodes can be used. Note, however, that mipmaps cannot be used in this case.
Both the height and width of the texture image must be set to a power of two equal to or greater than 8 and equal to or less than 1024.
When using TGA files that have additional information, the texture format used is the one specified in the additional information.
When using texture files that do not have additional information, the format is determined automatically based on the following rules. At this time, a value of 255 for the 8-bit alpha value of the texture file represents opaque, 0 represents transparent, and a value from 1 to 254 is taken as a translucent texel.
HILO8 is used for the format for normal map textures without additional information.
The following place2dTexture
node attributes are reflected in intermediate files: Translate Frame, Rotate Frame, Mirror U, Mirror V, Wrap U, Wrap V, and Repeat UV. Be sure to set the Coverage attribute of the place2dTexture node to (1, 1), Offset to (0, 0), and Rotate UV to 0.
Attributes of layeredTexture nodes are not reflected in intermediate files. In the case of a material texture, the texture combiner outputs under settings where only the topmost layer is displayed.
Be sure that UV is set for polygons that have surfaces applied.
When there are multiple UV sets, only the UV sets used by the texture are output as the intermediate file's texture coordinates. Because there can be as many as three textures per material, there can also be as many as three texture coordinates.
If a single material has been assigned to multiple objects, be sure to share texture and UV set combinations among all objects.
For example, if "Tex1" and "Tex2" both use the same UV set "uvSet1" for a given object, then "Tex1" and "Tex2" must use the same UV set, "uvSet1", for other objects as well. The UV set name may differ as long as the combination of textures using the same UV set matches.
To set normal mapping, connect the file
node via the bump2 node to the material's Bump Mapping (the normalCamera attribute) and use the Image Name of the file
node to specify a texture for normal mapping. Use a tangent space texture for the normal map texture. Be sure to set the Use As attribute of the bump2d node to Tangent Space Normals.
A normal map texture can be created using [Lighting/Shading] > [Transfer Maps]. Be sure to set the Map Space option for map transfer to Object Space. When the Connect maps to shader option is selected and the Connect maps to option is set to Assigned shader, the created texture is automatically connected to the bump mapping of the target material.
Set the UV winding order used for normal mapping all to clockwise (forward). Lighting will not be performed correctly on the CTR if the UV winding order is set to counter-clockwise (backward).
When setting normal mapping, tangents are calculated from the UV set of the normal map texture and then output.
Animation using smooth skinning is supported. Animation using rigid skinning is supported.
Set smooth skinning with [Skin] > [Bind Skin] > [Smooth Bind].
Do not do any of the following operations after performing Bind Skin.
|
If you need to do any of the above operations, use Detach Skin first. When the number of vertices has been changed, output can be made possible also by using Edit, Delete by Type, Non-Deformer History.
Vertex positions may also be changed after performing Bind Skin. However, tweak
nodes must be upstream of skinCluster
nodes. Normally, tweak
nodes are created upstream of skinCluster
nodes, but if the deformer order is changed in the window opened by the popup menu ([Inputs] > [All Inputs]), tweak nodes could be downstream of skinCluster nodes.
If skinning is set, the cmdl file's Translate, Rotate, and Scale are output in the bind pose state.
If you want to change the Translate, Rotate and Scale settings of the parent node of an object set for skinning, turn off Inherits Transform for the transform nodes of that object.
Do not change the names of original mesh nodes (~Orig) created after performing Bind Skin.
Make sure that skinning weight values for a single vertex add up to 1.
If all vertices have a weight value of 1.0 for each respective node, the drawing process load is reduced.
Up to four nodes per vertex can be set to a weight value other than zero. If the weight value is divided among five or more nodes, this is reflected in the intermediate file for up to four nodes in the order of largest weight value. |
Do not use multiple bind poses. When binding multiple objects to the same skeleton, use a common bind pose. |
Normally, you should set the History option of Detach Skin to Delete History. If you set the History option to Keep History, weight values can be retained, but if you perform Detach with this setting, skinCluster nodes will only be invalid but not completely detached.
After performing Detach with the Keep History setting, do not perform any operation that changes the vertex count. |
After performing Detach with the Keep History setting, you may perform operations such as changing the bind pose.
Influence objects are exported as transform nodes. (Polygons are not exported.)
When running Add Influence, set the Use Geometry option to OFF.
If you use UV projection mapping (Planar Mapping, Cylindrical Mapping, Spherical Mapping, or Automatic Mapping) after binding skin, be sure to set the Insert Before Deformers option to ON for each projection mapping.
If you combine skinned objects while History is enabled, the skinning animation will display in Maya but can no longer be output to CTR. In this case, delete the history and reset skinning.
When skinning has been set, polygons in bind pose are exported to the cmdl file.
CONFIDENTIAL