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<link rel="stylesheet" href="css/manpage.css" type="text/css">
7<title>Modeling</title>
8</head>
9<body>
10
11<h1>Modeling</h1>
12
13<p>This chapter describes procedures and precautions for creating models using NintendoWare with Softimage.</p>
14<p>
15<a href="#node">Nodes</a><br> <a href="#null">Null</a><br> <a href="#object">Implicit Objects</a><br> <a href="#chain">Chains</a><br> <a href="#polygon_m">Polygon Meshes</a><br>
16
17
18<a href="#material">Materials</a><br> <a href="#texture">Textures</a><br> <a href="#envelope">Envelopes</a><br>
19
20</p>
21
22<h2><a name="node">Nodes</a></h2>
23<p>Softimage nodes support Model, Null, Skeleton (root, bone, effector), and Polygon Mesh.</p>
24
25<h3><a name="node_name">Node Names</a></h3>
26<p>
27Although under Softimage it is possible to give the same name to more than one node as long as the model node of the parent differs, nodes having the same name must not exist inside an <CODE>cmdl</CODE> file.<BR> Hence, there is a possibility of duplicate names whenever more than one Model node exists. If more than one node with the same name is present, the node highest in the hierarchy is output using that name, but other nodes with that name are output with an underscore and a number (such as &quot;_1&quot; and &quot;_2&quot;) appended to the end. If more than one node exists at the same hierarchical depth, they are output in alphabetical order.
28</p>
29
30<h3><a name="root_node">Root Nodes</a></h3>
31<p>
32There is always one root node in a <CODE>cmdl</CODE> file.<br> For this reason, one Model node is output as-is as a root node. 3D objects (not belonging to the Model node) immediately below <CODE>Scene_Root</CODE> are output together as a single root node having the name <CODE>nw4r_root</CODE>.
33
34<p>
35<table border="1" class="arguments"><tbody><tr><td>
36Be sure to set 1 for the environmental variable NW4C_NOT_REMOVE_INEFFECTIVE_NODE if you want to restore output specifications for Nw4cRoot used in 0.5.4 and earlier versions.
37</td></tr></tbody></table>
38</p>
39
40</p>
41
42<h3><a name="center">Node Centers</a></h3>
43<p>
44When exporting, the center of each node is recognized as the local coordinate origin. If a Pivot is moved or rotated in Softimage or if it has animations, it may not export properly.
45</p>
46
47<h3><a name="bise_node">Node visibility</a></h3>
48<p>
49Outputs the status of the visibility property of each node (View display/hide (View Visibility)).
50</p>
51
52<h3><a name="no_out_node">Nodes Not Output</a></h3>
53<p>
54Control objects (icons related to dynamics such as gravity and wind) and deformation icons for things like lattices and waves are not output. In addition, nodes below control objects are not output.<br>
55</p>
56
57
58
59<h3><a name="hierarchical">Hierarchical (Softimage) Scaling</a></h3>
60<p>
61Although it is possible in Softimage to turn settings on and off at the node level (inside Local Transform Properties), as with Classic Scaling of SOFTIMAGE|3D, these properties are set for the entire model.<br> If hierarchical scaling is turned on for all nodes to be output to the intermediate file, they are output with this feature turned on. If all nodes are turned off, they are output with this feature turned off. An error is output if there is a mixture of nodes having this feature turned on or off.<br>
62</p>
63<p><img src="images/Hierarchical1.gif" border="0"></p>
64
65
66
67<h2><a name="null">Null</a></h2>
68
69<p>Output as a single node.</p>
70
71<h2><a name="object">Implicit objects</a></h2>
72
73<p>An implicit object is a dummy object used to control envelopes and animations that is often used for character rigging. Implicit objects are output as a single node.</p>
74
75<h2><a name="chain">Chains</a></h2>
76
77<p>
78Elements of a chain used to configure a skeleton (root, bone, effector) are each output as a node.<br> Although chains can be created by either the <CODE>SI3D</CODE> method or <CODE>XSI</CODE> method in Softimage, the Export plug-in supports either method.<br> The chain to be drawn can be switched using Create &gt; Skeleton &gt; SI3D Skeleton Drawing.
79</p>
80<p><img src="images/Chain1.gif" border="0"></p>
81
82<h2><a name="polygon_m">Polygon Mesh</a></h2>
83
84<p>Output as a single node.</p>
85
86<h3 id="polygon_type">Polygon Shapes</h3>
87<p>
88When polygons are output to the intermediate file, the Export plug-in operates internally to divide the polygons into triangles for output.
89</p>
90
91<h3 id="vertex">vertex</h3>
92<p>
93The 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.
94</p>
95
96
97
98
99
100
101
102
103
104
105
106
107<h3><a name="top_color">Vertex color</a></h3>
108
109<p>
110The vertex color of models for which a vertex color has been set can be output to the intermediate file.<br> Only the first vertex color is supported by the Export plug-in.<br><br>
111
112In Softimage, vertex colors cannot be applied only partially to an object. The entire object must have a vertex color.<br>
113
114<br>
115
116The alpha component of a vertex color is reflected at time of output because it is handled differently by CTR and Softimage.<BR> If the output option <B>Invert VertexColor Alpha</B> is selected, the alpha is inverted and the value under Softimage is output as-is.<BR>
117<p>
118Under Softimage, It is possible  to apply the vertex color to rendering by connecting the Vertex_rgba node. However, the output is made as described above due to the differences in how the alpha component is handled compared with CTR. Since the Exporter does not check if the <CODE>Vertex_rgba</CODE> node is connected, be sure to connect the <CODE>Vertex_rgba</CODE> node only when you want to apply the vertex color to the rendering screen shown under Softimage.<br><br> <img src="images/vcol_rgba1.gif" border="0"><br> <br>
119
120In addition, you can control the format of the vertex color that is output by attaching a suffix to the vertex color property name.<br> Output in RGB format by appending <strong>_rgb</strong> to the end of the name, or output in RGBA format by appending <strong>_rgba</strong> to the name.<br> <br> If nothing is appended, it is output in  RGBA format.<br> If nothing is appended the four elements RGBA will be output even if you are not using the vertex color alpha. So in order reduce the data size when you are not using the vertex color alpha, append _rgb to the name so only the three elements RGB are output.<br> <br> The vertex color property name is located as shown below:<br>
121
122<img src="images/vcol_prop.gif" border="0"><br>
123
124<h3 id="user_attr">User Vertex Attributes</h3>
125<p>If a vertex color property having any of the following names exists, the color of that vertex color property 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>
126<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 &quot;nw4cUser0_s&quot; if you want to output the 0th user vertex attribute as a 16-bit integer.</p>
127<p>Four components (RGBA) are output by default for the number of data components per vertex.<BR> In addition, if a <strong>2</strong> is included before the letter indicating precision in the suffix of the vertex color property name, the number of data components per vertex is 2. For example, be sure to set the color set name to &quot;nw4cUser1_2f&quot; if you want to output the 1st user vertex attribute as a 2-component 32-bit floating point number. Similarly, use &quot;_2s&quot; for 16-bit integers and &quot;_2b&quot; for 8-bit integers.</p>
128
129
130
131
132<p></p>
133
134<h3><a name="vectore">Normal Vectors</a></h3>
135
136<p>
137In Softimage, there is a normal usually held by the object and a user normal. The user normal can be set using the <CODE>XSI_UserNormalEditing</CODE> plug-in (XSISDK/examples/workgroup/Addons/XSI_UserNormalEditing).<br> Under Softimage 2010, this can also be set using the <strong>User Normal Adjustment Tool</strong>.<BR> Normally, the regular object normal is output, but the user normal is output for objects that have user normals (that have <CODE>Cluster - User_Normal_Cluster</CODE>).<br>
138
139<h3><a name="instance">Instances</a></h3>
140
141<p>
142If instances are used, they are exported in the same state as instantiated instances.<br>
143</p>
144<p>
145Envelope model instances are not supported.
146</p>
147
148<h3><a name="clone">Clones</a></h3>
149
150<p>
151If clones are used, they are output as-is as separate objects. Since materials can also hold unique materials, material processing identical to regular objects is performed.
152</p>
153
154
155
156
157
158
159
160
161
162
163
164<h3 id="render_priority">Polygon Rendering Order</h3>
165<p>
166  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="data_plugins.html#render_priority">NW4C Set Render Priority plug-in</a>. <br>
167</p>
168
169
170<h2><a name="material">Material</a></h2>
171
172<h3><a name="material_name">Material Names</a></h3>
173
174<p>
175One material per group that shares the same material is output to the intermediate file.<BR> The name set under Softimage is output in the intermediate file as-is.<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 ( &quot;_1&quot;, &quot;_2&quot; and so forth). <br> If the same material is used by an object without vertex color and an object with vertex color, it is output as different materials. Materials used in nodes that are exported first are exported with their original names, whereas materials used with nodes that are exported later are exported with an underscore and a numeral appended to their names.<br>
176</p>
177
178<h3><a name="material_kind">Material Types</a></h3>
179
180<p>
181Converts shader nodes to be connected to the surface node of the material node. Also converts Lambert (or Simple Lambert), Phong (or Simple Phong), Blinn shader (or Simple Blinn), constants and anisotropic.<br> → (See Texture <a href="#Render_tree">Render Tree</a>)
182</p>
183
184<h3><a name="material_attr">Valid Attributes</a></h3>
185
186<p>The following attributes are reflected in the intermediate files.</p>
187<ul>
188<li><strong>Diffuse Color</strong> → Diffuse Color <br>Outputs black color when<CODE> Diffuse - Enable</CODE> is off.</li>
189<li><strong>Diffuse Ambient</strong> → Ambient color<br>Always outputs white.</li>
190<li><strong>Specular - Color</strong> → Specular Color <br>Outputs data without a specular component when there is no specular element or when <CODE>Specular - Enable</CODE> is off.
191<li><strong>Incandescence - Color</strong> → Emission color <br>Outputs the value of color multiplied by Incandescence - Intensity. When <CODE>Incandescence - Enable</CODE>, the color black is output.<br>
192<li><strong>Specular attenuation(Shiny) </strong>(Phong shaders only) → Specular lookup table</li>
193  <br> <img src="images/Diffuse_Color1.gif" border="0"> <br>
194</li>
195<br>
196<li><strong>Transparency . Mix color . Color</strong> → Alpha <br>Becomes opaque when <CODE>Transparency - Enable</CODE> is off. Outputs the Alpha value if <CODE>Transparency - Enable</CODE> is on and <CODE>UseAlpha</CODE> is also on.<br> Outputs the Red value for Color if <CODE>UseAlpha</CODE> is off. Invert is also reflected in the value at this time.<br> Output as opaque if there is no <CODE>Transparency</CODE> element in the material.<br> <br> <img src="images/Max_Color1.gif" border="0" width="384" height="283"> <br>
197  </li>
198</ul>
199
200<br>
201
202<h3><a name="anisotropic_tangent">Tangent information when using the anisotropic shader</a></h3>
203<p>
204Tangent information is required in order to use the anisotropic shader.<BR> Tangent information is generated from vertex UV data. However, the UV data used to generate it is determined according to the following rules. A check is made if textures are connected in the order <strong>Diffuse</strong> -&gt; <strong>Ambient</strong> -&gt; <strong>Specular</strong> -&gt; <strong>Transparency</strong> -&gt; <strong>LayerTexture</strong>. The UV data referenced by the first valid texture found is used.<br> However, the UV data referenced by the normal map is used if there is a normal map.<BR> If no valid texture is found, tangent information is not output.
205</p>
206
207<h3><a name="global_material">Global Materials and Local Materials</a></h3>
208
209<p>
210If a global material and a local material both exist for a single polygon object, both materials are output.<br> Having more than one local material is also supported.
211</p>
212
213
214
215
216<h2><a name="texture">Textures</a></h2>
217
218<h3><a name="texture_name">Texture Names</a></h3>
219
220<p>
221The texture's filename minus the extension is exported as the texture name. Do not use double-byte characters or half-width kana in a texture file name.<br>
222
223
224<h3><a name="texture_node">Texture Nodes</a></h3>
225
226<p>
227A single texture and texture layer is supported.<br> For the texture layer, up to three textures are supported.<br>
228
229</p>
230
231<h3><a name="multi_uv">Multi-UV</a></h3>
232<p>If more than one texture is connected to a material, only the texture coordinate being used is output to the intermediate file. Because there can be as many as three textures per material, there can also be as many as three texture coordinates.</p>
233
234<h3><a name="texture_file">Texture Files and Formats</a></h3>
235<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 image 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>
236<ul>
237<li>If all texels are opaque:
238	<ul>
239	<li>If R = G = B  in all texels → LA8</li>
240	<li>If there are texels in which it is not the case that R = G = B     → RGB565</li>
241	</ul>
242</li>
243<li>If there are transparent or translucent texels:
244	<ul>
245	<li>If R = G = B  in all texels → LA8</li>
246	<li>If there are texels for which R = G = B is not true → RGBA4</li>
247	</ul>
248</li>
249</ul>
250<p>HILO8 is used for the format for normal map textures without additional information.</p>
251
252
253<h3><a name="texture_attr">Valid Attributes</a></h3>
254
255<p>The following attributes are reflected by texture-related properties:</p>
256<ul>
257<li><strong>Texture Repeat and Texture Arrays</strong><br> Repeat display of textures and configuration of texture arrays are performed using the Texture Projection property editor.<br> <br> <img src="images/texture_attr1.gif" border="0"><br> <br> The texture repeat display is set using Wrapping.<br> In Softimage, even though there are repeat display settings (WrapU, WrapV) used for hardware rendering of material properties, the Export plug-in references the Wrapping attribute (used for software rendering) of the texture projection property.<br> <br> <CODE>ScalingU</CODE>, <CODE>ScalingV</CODE>, <CODE>RotationW</CODE>, <CODE>TranslationU</CODE>, and <CODE>TranslationV </CODE>of the UVW Transformation are output to an intermediate file. Texture SRT and repeat are possible using the UVW Transformation without having to change the texture coordinate set for the vertex.<br> <br> Parameters other than for UVW Transformation (<CODE>ScalingW</CODE>, <CODE>RotationU</CODE>, <CODE>RotationV</CODE>, and <CODE>TranslationW</CODE>) are not reflected in the intermediate file. If values other than initial values are set for these parameters, the display shown in Softimage might not match that shown in NW4C.<br> Furthermore, the <CODE>Scaling</CODE>, <CODE>Rotation</CODE>, and <CODE>Position</CODE> parameters of <CODE>Texture_Support</CODE> are not referenced. If values other than initial values are set for these parameters, the display shown in Softimage might not match that shown in NW4C .<br> In addition, if a material is shared by more than one object in Softimage and the same texture is applied, be sure to always set the target object specification included in the <B>Texture Projection </B>parameters of the <CODE>Image </CODE>node to <CODE>All </CODE>before performing editing. An error results if a different texture array and repeat setting is used for each object. If you want to use a different texture array and repeat setting for each object, be sure to set a different material for each object.<br> <br>
258
259</ul>
260<p>
261<table border="1" class="arguments"><tbody><tr><td>
262There is no support for <B>Mirror</B>. If you want mirrored display of textures, configure the settings using 3DEditor (CreativeStudio).
263</td></tr></tbody></table>
264</p>
265
266
267
268<h3><a name="Render_tree">Render Tree</a></h3>
269
270<p>The following parameters are convertible for the structure of the render tree:</p>
271<ul>
272<li>Shader nodes to be connected to the surface node of the material node are output.<br> In addition, Lambert (or Simple Lambert), Phong (or Simple Phong), Blinn shader (or Simple Blinn), Constants and Anisotropic are output. (See (1) below.)</li>
273<li>A specular lookup table is output when Phong or Blinn are applied.<BR> With Phong, the table is created by referencing the <B>Specular attenuation (Shiny)</B> parameter.<BR>With Blinn and Anisotropic, a fixed table is output.</li>
274<li>Textures directly connected to the diffuse, ambient, specular, or transparency parameter of the shader node above are output. (See (3) and (4) below.)</li>
275<li>Textures connected to transparency are not output when the same texture for any of diffuse, specular or ambient is connected to transparency.</li>
276<li>Up to three can be set in a texture layer. (See (3) below.)</li>
277<li>If a vertex color is set, the vertex color is output, regardless of whether there is a Vertex_rgba node. (See (2) below.)</li>
278<li>If a texture is applied through a Mixer node, the texture (or textures) connected to the Mixer node are output. (See (5) below.)</li>
279</ul>
280<br/>
281<ol>
282	<li><a name="Render_1">When using a color material only</a></li><p>
283    A shader value is output for <CODE>diffuse</CODE>, <CODE>specular</CODE>, and <CODE>incandescence</CODE>.<br> If color animation is set for<CODE>diffuse</CODE>, <CODE>specular</CODE>, and <CODE>incandescence</CODE>, the file can be output as a material color animation (cmata) file. If the shader does not have a <CODE>specular</CODE> element, the color black is output.<br> In the example shown in the figure below, a shader color is output for <CODE>diffuse</CODE>, and black is output because there is no <CODE>specular </CODE>element. <br> <br> <img src="images/Render_tree1.gif" border="0"> <br> <br>
284	</p>
285	<li><a name="Render_2">When a vertex color is set</a></li><p>
286	If a vertex color is set for a model, the vertex color is output to the intermediate file whether or not the Vertex_rgba node has been connected. <br> If the Vertex_rgba node has been connected to diffuse or ambient, a fixed color (white for diffuse and ambient and black for specular) is output for that color element.<BR> Furthermore, if some node is connected to <CODE>diffuse </CODE>and/or <CODE>specular</CODE>, the element(s) are not output to the <CODE>cmata</CODE> file, even if color animation is set for them.<br> In the example shown in the figure below, vertex color is output, and white is output for <CODE>diffuse</CODE>, whereas black is output for <CODE>specular</CODE>. Even if color animation has been set to <CODE>diffuse</CODE>, the element is not output to the <CODE>cmata</CODE> file.<br> <br> <img src="images/Render_tree21.gif" border="0"> <br> <br> If the Vertex_rgba node is connected as shown in the example in the figure, the vertex color can be confirmed on the rendering screen in Softimage. In addition, the alpha component of the vertex color can be assigned to transparency by configuring for transparency input and turning Use Alpha on. However, be sure to turn Invert on because CTR handles alpha in the opposite way from Softimage.<br> <br> <img src="images/Render_tree22.gif" border="0"> <br> <br> <img src="images/Render_tree23.gif" border="0"> <br>
287	</p>
288	<li><a name="Render_3">When a texture layer is used</a></li><p>
289	Colors can be freely set, even for diffuse, ambient, and specular, by setting a texture for the texture layer.<br> In the example shown in the figure below, a shader color is output for diffuse and ambient while a texture is being applied. Black is output, since there is no specular element. <br> <img src="images/Render_tree31.gif" border="0"><br> <br>Up to three textures can be connected to the texture layer.<br>
290
291
292    <br>
293
294
295	<li><a name="Render_4">When a texture is not using a texture layer</a></li><p>
296	A texture is output, even when the Image node is directly connected to diffuse the shader.<br> <br> <img src="images/Render_tree41.gif" border="0"> <br> <br> As in the example shown in the figure, it is possible to assign the alpha component of the texture image to transparency by setting transparency input and turning on Use Alpha. Settings can be confirmed on the rendering screen in Softimage. However, be sure to turn Invert on because CTR handles alpha in the opposite way from Softimage.<br> <br> <img src="images/Render_tree42.gif" border="0"> <br> <br> <img src="images/Render_tree23.gif" border="0"> <br> <br>
297	</p>
298    <li><a name="Render_5">When a Mixer node is being used</a></li>
299    <p>
300	As an example other than those described above, multiple textures connected to the Mixer node are output if a node such as Mix_2colors or Mix_8colors is connected to diffuse and multiple textures have been set.<br> Output is made in the same manner as when multiple textures have been set using the texture layer.<br> Even if ambient and diffuse are connected to multiple parameters at this time, Mixer nodes are output only once.<BR> Also, only one Mixer node can be used within a material.<BR> In the example shown in the figure below, output is made with test_tga, connected to color1 of Mix_8colors, and f_pic, connected to color2 of Mix_8colors, applied as textures.<br> <br> <img src="images/Render_tree5.gif" border="0">
301
302</ol>
303
304
305<table border="1" class="arguments"><tbody><tr><td>
306Parameters may not be reflected normally if set outside the range given in documentation.
307</td></tr></tbody></table>
308<br>
309
310<h3><a name="nrm_map">Normal mapping</a></h3>
311<table border="1" class="arguments"><tbody><tr><td>
312CTR uses tangent space normal textures.
313</td></tr></tbody></table>
314<p>
315
316The determination about setting a normal map is based on the existence of the connections to <strong>BumpMap</strong> input of the material node.<br><br> The normal map takes the texture specified by the <strong>ImageClip</strong> node, detected by going through <strong>BumpMap</strong> -&gt; <strong>XSINormalMap</strong> -&gt; <strong>XSIModelMap</strong> -&gt; <strong>Image</strong> input. The normal map outputs the texture in the <strong>RGBA8</strong> format. Additional information of the texture is not reflected.
317</p>
318<img src="images/NormalMap2.gif" border="0"> <br>
319
320<br>
321
322
323<h2><a name="envelope">Envelope</a></h2>
324
325<h3><a name="weight_value">Weight value</a></h3>
326
327<p>
328The Export plug-in supports envelope model output.<br> The envelope weight (weight value) set for each vertex is output to the intermediate file as a value ranging from 1 to 100% (where the fractional part is rounded to the nearest integer). An error is output if a negative value less than zero or a positive value greater than 100 is set, or if values that do not add up to 100% are set. (However, this excludes errors of less than 1%.)<BR> <br> Up to four weights can be set for a single vertex. If more than four weights are set, only four weights will be used in order of largest, and other weights will be ignored.
329</p>
330
331
332
333
334
335
336
337
338
339
340<br><br>
341<hr><p>CONFIDENTIAL</p></body>
342</html>
343