1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html> 3<head> 4<META http-equiv="Content-Type" content="text/html; charset=utf-8"> 5<META http-equiv="Content-Style-Type" content="text/css"> 6<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 9.0.0.0 for Windows"> 7<link rel="stylesheet" href="css/manpage.css" type="text/css"> 8<title>Modeling</title> 9</head> 10<body> 11 12<h1>Modeling</h1> 13<p>This chapter describes procedures and precautions for creating models using NintendoWare with Maya.</p> 14<p> 15<a href="#node">Nodes</a><br> <a href="#polygon">Polygons</a><br> <a href="#nurbs">NURBS</a><br> <a href="#subdiv">Subdivision Surfaces</a><br> <a href="#material">Materials</a><br> <a href="#texture">Textures</a><br> <a href="#skinning">Skinning</a><br> 16</p> 17 18<h2 id="node">Nodes</h2> 19<p>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 <B>transform </B>nodes and <B>joint </B>nodes.<br> In the intermediate file for a skeletal model, the <B>nodes</B> of Maya are exported as bones. 20</p> 21 22<h3 id="node_name">Node Names</h3> 23<p>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. <br> 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 "<strong>_1</strong>" and "<strong>_2</strong>") 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.</p> 24 25<h3 id="root_bone">Root Bone</h3> 26<p>Only one root bone exists for a single skeletal model when using intermediate files.<br> 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 <strong>nw4c_root</strong>.</p> 27 28<h3 id="no_out_node">Nodes Not Output</h3> 29<p>Transform nodes and joint nodes are not output when the <strong>Template</strong> attribute is selected or when these nodes are not shown in the display layers. (The exception is influence objects, which are output.)<br> Child nodes of nodes that are not output will also not be output.<br> Transform nodes that do not have children (such as a locator or an empty group) are not output. When the <B>Template </B> attribute or the <CODE>Intermediate Object</CODE> attribute is set for a mesh node, the parent transform node is output as a meshless node. (Polygon data is not output.)<br> Nodes are not output if the display layer <B>Shading </B>attribute is turned off (Always show wireframes).<br> Blend-shape target objects are not output.</p> 30<table border="1" class="arguments"> 31 <tbody> 32 <tr> 33 <td>Nodes whose compression enable flag has been set using the <a href="NW4C_SetNoCompressNode.html">NW4C Set No Compress Node plug-in</a> will always be output, regardless of the above conditions.</td> 34 </tr> 35 </tbody> 36</table> 37<h3 id="compress_node">Compression Feature for Nodes Not Required for Model Display</h3> 38<p>Setting the Export plug-in option <a href="export.html#options_compress_node">Compress Node</a> to <strong>Cull Useless Node</strong> allows nodes other than those not output above but which are also not needed to display the model to be compressed for output. <br> 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 <B>Unite Compressible Node</B>.</p> 39 40<h3 id="transform">Transform Nodes</h3> 41<p>This section describes attributes that require particular attention.</p> 42<ul> 43<li><strong>Pivot:</strong> 44 <p>We recommend using the same value for Rotate Pivot and Scale Pivot. If these values differ, the amount of animation data may grow immensely.<br> 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.</p> 45</li> 46<li><strong>Shear</strong> 47 <p>Set Shear to (0, 0, 0). Correct output is impossible unless (0, 0, 0) is used.</p> 48</li> 49<li><strong>Rotate Order</strong> 50 <p>We recommend xyz for the Rotate Order. If a rotate order other than xyz is used, the amount of animation data may increase.</p> 51</li> 52<li><strong>Rotate Axis</strong> 53 <p>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.</p> 54</li> 55<li><strong>Inherits Transform</strong> 56 <p>Be sure to turn <B>Inherits Transform</B> on. If it is off, correct output is not possible. As an exception, it is all right to turn <B>Inherits Transform</B> off for shape transform nodes if skinning has been set.</p> 57</li> 58<li><strong>Visibility</strong> 59 <p>If <B>Visibility</B> 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 <B>Visibility</B> off.</p> 60</li> 61</ul> 62 63<h3 id="joint">Joint Nodes</h3> 64<p>This section describes attributes that require particular attention.</p> 65<ul> 66<li><strong>Rotate Order</strong> 67 <p>We recommend xyz for the Rotate Order. If a rotate order other than xyz is used, the amount of animation data may increase.</p> 68</li> 69<li><strong>Rotate Axis</strong> 70 <p>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.</p> 71</li> 72<li><strong>Inherits Transform</strong> 73 <p>Be sure to turn <B>Inherits Transform</B> on. If it is off, correct output is not possible.</p> 74</li> 75<li><strong>Joint Orient</strong> 76 <p>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.</p> 77</li> 78<li><strong>Segment Scale Compensate</strong> 79 <p>Take care not to change the value given by Segment Scale Compensate when outputting cmdl files and/or cskla files.</p> 80</li> 81</ul> 82 83<h3 id="billboard">Billboard</h3> 84<p>(Currently not set.)</p> 85<!-- p>ビルボードは transform ノードに対して <a href="set_billboard.html">NW4C Set Billboard プラグイン</a>で設定します。<br> ただし、Maya の画面上には反映されません。</p --> 86 87<!-- h3 id="scene_node">カメラ/ライト/フォグのノード</h3> <p>(現在は出力できません)</p> <p>カメラ/ライト/フォグのノードは csca ファイルにのみ出力されます。<br> 通常のノードをカメラ/ライト/フォグのノードの子にしても、カメラ/ライト/フォグのノードの移動・回転・スケールは反映されません。<br> 通常のノードの動きをカメラ/ライト/フォグのノードに追従させたい場合は、ペアレント(Parent)コンストレインなどを使用してください。</p --> 88 89<h2 id="polygon">Polygons</h2> 90 91<h3 id="polygon_type">Polygon Shapes</h3> 92<p>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.</p> 93<ol> 94 <li>Polygons where all vertices do not lie in the same plane.</li> 95 <li>Concave polygons (polygons that have internal angles of 180 degrees or more).</li> 96 <li>Polygons with holes in them.</li> 97</ol> 98<p><img src="images/InvalidPolygon1.gif" border="0"></p> 99<p>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. <!--<br> スキニングを設定したシェイプの四角形以上のポリゴンで、影響するノード数が最大行列パレット数より多い場合、三角形分割して出力されます。--></p> 100 101<h3><a name="vertex">vertex</a></h3> 102<p> 103The number of vertices that can be exported to an intermediate file is greater than the number possible on the DCC tool. Although this differs depending on the mesh structure, it is three times the maximum number of triangular polygons. 104</p> 105 106<h3 id="vertex_color">Vertex color</h3> 107<p>Only one vertex color is supported per vertex. <BR> When multiple color sets are configured, colors from the current color set will be output.</p> 108<p>The precision of output data when the suffix for a color set name is <strong>_f</strong> is 32-bit floating point precision. If the suffix is <strong>_s</strong>, 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.</p> 109<p>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.)</p> 110<p>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.)</p> 111 112<h3 id="user_attr">User Vertex Attributes</h3> 113<p>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.<BR> 「<strong>nw4cUser0</strong><br><strong>nw4cUser1</strong><br><strong>nw4cUser2</strong><br> (only the U is uppercase)<br> The color set can be freely used by any game as a user vertex attribute.</p> 114<p>The precision of output data is 32-bit floating point if the suffix of the above color set name is <strong>_f</strong>, 16-bit integer precision if the suffix is <strong>_s</strong>, and 8-bit integer precision if the suffix is <strong>_b</strong> 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.</p> 115<p>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.<BR> In addition, if the component type is RGB or RGBA and a <strong>2</strong> 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.</p> 116 117<h3 id="instance">Instances</h3> 118<p>If instances are used, they are exported in the same state as substantiated instances.<br> However, instances of models for which skin has been configured are not supported.</p> 119 120<h3 id="proxy_shape">Proxy Shapes</h3> 121<p>Transformed animations that use proxy shapes created with "Subdiv Proxy" (for example, skinning) cannot be exported.</p> 122 123<h3 id="effective_mesh">Number of Valid Nodes</h3> 124<p>Only one valid mesh nodes with the <strong>Intermediate Object</strong> 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 <strong>Edit Deformers</strong> > <strong>Display Intermediate Objects</strong> has been run with objects set for skinning.</p> 125 126<h3 id="render_priority">Polygon Rendering Order</h3> 127<p>Under NintendoWare, a group of polygons assigned the same material is called a <EM>mesh</EM>.<BR> The rendering order of meshes can be controlled using the render priority set for the material.<BR> The rendering priority is set using the <a href="NW4C_SetRenderPriority.html">NW4C Set Render Priority plug-in</a>. <br></p> 128 129<h2 id="nurbs">NURBS</h2> 130<p>NURBS surfaces and NURBS curves cannot be exported. <br> Convert NURBS surfaces to polygons using <B>NURBS to Polygons</B>, 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.</p> 131 132<h2 id="subdiv">Subdivision Surfaces</h2> 133<p>Subdivision surfaces cannot be exported. Convert subdivisions to polygons using <B>Subdiv to Polygons</B>, then export.</p> 134 135<h2 id="material">Material</h2> 136 137<h3 id="material_name">Material Names</h3> 138<p>In the intermediate files, one material is exported for each shading group.<br> 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).</p> 139 140<h3 id="material_shader">Shader Types</h3> 141<p>When not using specular, use the <strong>Lambert</strong> shader. <br> When using specular, use the <strong>Blinn</strong>, <strong>Phong</strong>, <strong>Phong E</strong>, or <strong>Anisotropic</strong> 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.)</p> 142 143<h3 id="material_attr">Valid Attributes</h3> 144<p>The following attributes are reflected in the intermediate files.</p> 145<ul> 146<li><strong>Color (Color)</strong> → Diffuse color (RGB components)</li> 147<li><strong>Transparency</strong> (R component) → Diffuse color (A component)</li> 148<!-- li><strong>アンビエントカラー(Ambient Color)</strong> → アンビエントカラー(RGB 成分)</li --> 149<li><strong>Incandescence</strong> → Emission color (RGB components)</li> 150<li><strong>Specular Color</strong> → Specular color 0 (RGB components)</li> 151<li><strong>Cosine Power</strong>(Phong shaders only) → Specular lookup table</li> 152</ul> 153<p>Also, you can set attributes for NintendoWare using the <a href="NW4C_SetMaterialAttr.html">NW4C Set Material Attribute plug-in</a>. (1, 1, 1, 0) is always output for the ambient color in the intermediate file.<br> If a file node is connected to the Color attribute, the <STRONG>Color Gain</STRONG> 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 <CODE>layeredTexture</CODE> node is connected to the Color attribute, the <strong>Color Gain</strong> 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 <strong>Alpha Gain</strong> 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 <strong>Diffuse</strong> 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.</p> 154 155<h2 id="texture">Textures</h2> 156 157<h3 id="texture_name">Texture Names</h3> 158<p>The texture's filename minus the extension is exported as the texture name.</p> 159 160<h3 id="texture_node">Texture Nodes</h3> 161<p><CODE>file</CODE> nodes (single texture) and <CODE>layeredTexture</CODE> nodes (multi texture) can be used as textures. <br> Up to three file nodes can be connected to a <CODE>layeredTexture</CODE> node. (Up to two when normal mapping is used.)<BR> Procedure textures, such as checker and ramp, cannot be exported in their original form. Use <B>Convert to File Texture</B> to convert them to file nodes, then export them. Connect file nodes (<CODE>layeredTexture</CODE> nodes) to the material's <STRONG>Color</STRONG> attribute. Set the mapping method in the <STRONG>Create Render Node</STRONG> window to <STRONG>Normal</STRONG>. (<STRONG>As projection</STRONG> and <STRONG>As stencil</STRONG> are not supported.) PSD file textures (<CODE>psdFileTex</CODE> nodes) cannot be exported.</p> 162 163<h3 id="texture_file">Texture Files and Formats</h3> 164<p>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.<br> 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 <I>NintendoWare for CTR Photoshop Plug-in Manual</I>. <br> 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. <BR> 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.<BR> When using TGA files that have additional information, the texture format used is the one specified in the additional information. <br> 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.</p> 165<ul> 166<li>If all texels are opaque: 167 <ul> 168 <li>If R = G = B in all texels → LA8</li> 169 <li>If there are texels in which it is not the case that R = G = B → RGB565</li> 170 </ul> 171</li> 172<li>If there are transparent or translucent texels: 173 <ul> 174 <li>If R = G = B in all texels → LA8</li> 175 <li>If there are texels for which R = G = B is not true → RGBA4</li> 176 </ul> 177</li> 178</ul> 179<p>HILO8 is used for the format for normal map textures without additional information.</p> 180 181<h3 id="texture_attr">Valid Attributes</h3> 182<p>The following <CODE>place2dTexture</CODE> node attributes are reflected in intermediate files: <strong>Translate Frame</strong>, <strong>Rotate Frame</strong>, <strong>Mirror U</strong>, <strong>Mirror V</strong>, <strong>Wrap U</strong>, <strong>Wrap V</strong>, and <strong>Repeat UV</strong>. Be sure to set the Coverage attribute of the place2dTexture node to (1, 1), Offset to (0, 0), and Rotate UV to 0.</p> 183<p>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.</p> 184 185<h3 id="texture_uv">UV Limitations</h3> 186<p>Be sure that UV is set for polygons that have surfaces applied. <!--Maya 上では UV のない面はテクスチャが表示されませんが、CTR にはそのような機能はありません。--></p> 187 188<h3 id="multi_uv">Multi-UV</h3> 189<p>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.<BR></p> 190<p>If a single material has been assigned to multiple objects, be sure to share texture and UV set combinations among all objects.<BR> 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.</p> 191 192<h3 id="nrm_map">Normal mapping</h3> 193<p>To set normal mapping, connect the <CODE>file</CODE> node via the bump2 node to the material's <strong>Bump Mapping</strong> (the <strong>normalCamera</strong> attribute) and use the Image Name of the <CODE>file</CODE> node to specify a texture for normal mapping. Use a tangent space texture for the normal map texture. Be sure to set the <strong>Use As</strong> attribute of the bump2d node to <strong>Tangent Space Normals</strong>.</p> 194<p>A normal map texture can be created using [<B>Lighting/Shading</B>] > [<B>Transfer Maps</B>]. Be sure to set the <strong>Map Space</strong> option for map transfer to <strong>Object Space</strong>. When the <strong>Connect maps to shader</strong> option is selected and the <strong>Connect maps to</strong> option is set to <strong>Assigned shader</strong>, the created texture is automatically connected to the bump mapping of the target material.</p> 195<p>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).</p> 196<p>When setting normal mapping, tangents are calculated from the UV set of the normal map texture and then output.</p> 197 198<h2 id="skinning">Skinning</h2> 199 200<h3 id="skin_bind">Skinning Settings</h3> 201<p>Animation using smooth skinning is supported. Animation using rigid skinning is supported. <br> Set smooth skinning with [<B>Skin</B>] > [<B>Bind Skin</B>] > [<B>Smooth Bind</B>].</p> 202<table border="0" class="arguments"><tbody><tr><td> 203Do not do any of the following operations after performing Bind Skin. 204<ul> 205<li>Operations that change the number of vertices.</li> 206<li>Change the Rotate Order or Segment Scale Compensate of nodes affecting the skinning.</li> 207</ul> 208</td></tr></tbody></table> 209<p><br>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 <B>Edit</B>, <B>Delete by Type</B>, <B>Non-Deformer History</B>.<br> Vertex positions may also be changed after performing Bind Skin. However, <CODE>tweak</CODE> nodes must be upstream of <CODE>skinCluster</CODE> nodes. Normally, <CODE>tweak</CODE> nodes are created upstream of <CODE>skinCluster</CODE> nodes, but if the deformer order is changed in the window opened by the popup menu ([<B>Inputs</B>] > [<B>All Inputs</B>]), tweak nodes could be downstream of skinCluster nodes.</p> 210<p>If skinning is set, the cmdl file's Translate, Rotate, and Scale are output in the bind pose state.</p> 211<p>If you want to change the <B>Translate</B>, <B>Rotate</B> and <B>Scale</B> settings of the parent node of an object set for skinning, turn off <B>Inherits Transform</B> for the transform nodes of that object.</p> 212<p>Do not change the names of original mesh nodes (~Orig) created after performing Bind Skin.</p> 213<p>Make sure that skinning weight values for a single vertex add up to 1.<BR> If all vertices have a weight value of 1.0 for each respective node, the drawing process load is reduced.</p> 214<table border="1" class="arguments"><tbody><tr><td> 215Up 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. 216</td></tr></tbody></table> 217<!-- table border="1" class="arguments"><tbody><tr><td> アクション出力モードでは、スキニングのシェイプとスケルトンは<strong>同じ階層構造内</strong>に存在する必要があります。 </td></tr></tbody></table> <p><br></p --> 218<table border="1" class="arguments"><tbody><tr><td> 219Do not use multiple bind poses. When binding multiple objects to the same skeleton, use a common bind pose. 220</td></tr></tbody></table> 221 222<h3 id="skin_detach">Cancel Skinning</h3> 223<p>Normally, you should set the <strong>History</strong> option of Detach Skin to <strong>Delete History</strong>. If you set the History option to <STRONG>Keep History</STRONG>, weight values can be retained, but if you perform Detach with this setting, skinCluster nodes will only be invalid but not completely detached.</p> 224<table border="0" class="arguments"><tbody><tr><td> 225After performing Detach with the Keep History setting, do not perform any operation that changes the vertex count. 226</td></tr></tbody></table> 227<p><br>After performing Detach with the Keep History setting, you may perform operations such as changing the bind pose.</p> 228 229<h3 id="skin_influence">Influence Objects</h3> 230<p>Influence objects are exported as transform nodes. (Polygons are not exported.)<br> When running <B>Add Influence</B>, set the <strong>Use Geometry</strong> option to <STRONG>OFF</STRONG>.</p> 231 232<h3 id="skin_proj_map">Skinning and UV Projection Mapping</h3> 233<p>If you use UV projection mapping (Planar Mapping, Cylindrical Mapping, Spherical Mapping, or Automatic Mapping) after binding skin, be sure to set the <strong>Insert Before Deformers</strong> option to <STRONG>ON</STRONG> for each projection mapping.</p> 234 235<h3 id="skin_combine">Combine After Skinning</h3> 236<p>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.</p> 237 238<h3 id="skin_cmdl">Polygon Shapes Exported to the cmdl File</h3> 239<p>When skinning has been set, polygons in bind pose are exported to the cmdl file.</p> 240 241<p><br><br></p> 242<hr><p>CONFIDENTIAL</p></body> 243</html>