1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html xmlns="http://www.w3.org/1999/xhtml">
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>Data Creation Plug-Ins</title>
8</head>
9<body>
10<h1>Data Creation Plug-Ins</h1>
11<p>The data creation plug-ins are a group of plug-ins that aid in the creation of data for NintendoWare.</p>
12<p>
13They are use primarily to configure NintendoWare attributes for nodes and materials in 3ds Max, and to perform searches for settings.
14</p>
15<p>
16Data creation plug-ins are run either from NW4C in the main menu or NW4C Material in the Material Editor.
17</p>
18<p>
19<a href="#kind">Types of Data-Creation Plug-Ins</a><br /> <a href="#add_mat_attr">Configuring Settings for Each Material</a><br />
20</p>
21
22<h2><a id="kind">The Types of Data Creation Plug-Ins</a></h2>
23<p>The following table shows a list of data creation plug-ins.</p>
24<table class="arguments"><tbody><tr>
25
26<td>Plug-In Name</td>
27<td>Description</td>
28</tr>
29<tr>
30<td valign="top"><a href="#mat_attr">NW4C Set Material Attribute</a></td>
31<td>Sets attributes for materials.</td>
32</tr>
33<tr>
34<td valign="top"><a href="#render_priority">NW4C Set Render Priority</a></td>
35<td>Sets the polygon rendering priority for materials.</td>
36</tr>
37
38<tr>
39<td valign="top"><a href="#no_compress_node">NW4C Set No Compress Node</a></td>
40<td>Sets the node compression disable flag for nodes.</td>
41</tr>
42<tr>
43<td valign="top"><a href="#billboard">NW4C Set Billboard</a></td>
44<td>Sets a billboard for nodes.</td>
45</tr>
46<tr>
47<td valign="top"><a href="#combineGroup">NW4C Set Combine Group</a></td>
48<td>Sets a combine group for nodes.</td>
49</tr>
50<tr>
51<td valign="top"><a href="#forceExportKey">NW4C Set Force Export Key</a></td>
52<td>Sets the forced output of animation keys for nodes.</td>
53</tr>
54
55
56<tr>
57<td valign="top"><a href="#user_data">NW4C Set User Data</a></td>
58<td>Allows user data to be set for nodes, cameras, and/or lights.</td>
59</tr>
60
61
62</tbody></table>
63
64
65
66
67<h2 id="mat_attr">Plug-In for Setting Material Attributes (NW4C Set Material Attribute)</h2>
68<p>Sets the NintendoWare material attributes for materials. Note that the settings made with this plug-in are not applied to what is shown on the 3ds Max screen.</p>
69<p><B>Set Material Attribute</B> can be configured in either of the following ways:</p>
70<br />
71
72<h3>Settings by Individual Material</h3>
73<p>See the section <a href="#add_mat_attr">Configuring Settings for Each Material</a> below.</p>
74<br />
75
76<h3>Settings for Multiple Materials at Once</h3>
77<p>
78Execute <B>NW4C → NW4C Set Material Attribute</B> to display the window shown below.<br /> You can use this window to change the settings for multiple materials simultaneously or to search for materials. You can select the materials assigned to objects by selecting multiple objects.
79</p>
80<p>
81Materials whose names are displayed in <B>Selected Material</B> become the settings target. Changes made now to the contents of set items are reflected in those items. The settings can be changed for more than one material simultaneously. The settings are not changed for items that that are not updated.
82</p>
83
84<center><p><img src="images/SetMaterialAttr.gif" alt="SetMaterialAttr" /></p></center>
85<p>
86Enter the search criteria in the <CODE>Search</CODE> field. Click <B>Search</B> to search through the materials registered in the Material Editor and display the names of pertinent materials in the <CODE>Selected Material</CODE> field. The name of the material selected inside the <CODE>Target</CODE> field becomes the settings target, and its name is displayed in the <CODE>Set</CODE> field.
87</p>
88<p>If the <B>and</B> radio button located to the left of the <B>Search</B> button is selected, a search is made for the materials which have the same attributes. If the <B>or</B> radio button is selected, a search is made for materials with at least one of the same attributes. If no radio buttons are selected, attributes are excluded from search conditions.
89</p>
90
91
92<iframe id="CommonMaterialAttribute" src="../../common/CommonMaterialAttribute.html" frameborder="0" scrolling="auto" width="100%" height="850"></iframe>
93
94
95
96
97
98<h2 id="render_priority">Plug-In for Setting the Rendering Priority of Polygons (NW4C Set Render Priority)</h2>
99<p>Configures information for polygon rendering priority for materials. Note that the settings made with this plug-in are not applied to what is shown on the 3ds Max screen.</p>
100<p>Set Render Priority can be configured in either of the following ways:</p>
101
102<h3>Settings by Individual Material</h3>
103<p>See the section <a href="#add_mat_attr">Configuring Settings for Each Material</a> below.</p>
104<br />
105
106<h3>Settings for Multiple Materials at Once</h3>
107
108<p>
109To display the window shown below, execute <B>NW4C → NW4C Set Render Priority</B>.<br /> You can use this window to change the settings for multiple materials simultaneously or to search for materials.
110</p>
111<center><p><img src="images/SetPriority.gif" alt="<CODE>SetPriority</CODE>" /></p></center>
112<br />
113<p>
114Enter the search criteria in the <CODE>Search</CODE> field. Click <B>Search</B> to search through the materials registered in the Material Editor and display the names of pertinent materials in the <CODE>Target</CODE> field. The name of the material selected inside the <CODE>Target</CODE> field becomes the settings target, and its name is displayed in the <CODE>Set</CODE> field.
115</p>
116<p>
117Select <strong>Don't care</strong> (that is, no specified rendering priority) in the <strong>Search</strong> field, or select a conditional specification and then click the <strong>Search</strong> button to display the pertinent materials. The following conditions can be selected: under (&lt;), below (&lt;=), exactly (=), above (&gt;=), and over (&gt;). below), equal (= : exactly), over (&gt;= : above), over(&gt; : over). Integers from 1 to 255 can be specified for the numeric value.<br /> If you select <b>All Material</b>, all materials currently in use will be displayed in the <CODE>Target</CODE> field.<br />
118</p>
119
120<p>
121The <CODE>Target</CODE> field can display a list that shows names of the materials that match the search conditions specified in the <CODE>Search</CODE> field, and the drawing priority of the materials.<br />
122
123</p>
124
125<p>
126The settings target is the material whose name is displayed in <B>Selected Material </B> of the <CODE>Set</CODE> field. Changes made now to the contents of set items are reflected in those items. The settings can be changed for more than one material simultaneously. The settings are not changed for items that that are not updated.
127</p>
128<p>
129
130
131Select the material you want to edit from the list by clicking. Click again to edit the value of &quot;Render Priority.&quot; To specify a numeric value, enter an integer from 1 to 255 and confirm with the Enter key. Entering 0 is treated as &quot;Don't care.&quot; Polygons associated with materials of lower value will be rendered first. If there is more than one material with the same value, the order in which the polygons are rendered is indeterminate (that is, it will depend on the rendering routine).
132</p>
133
134
135
136<h2 id="no_compress_node">Plug-In for Disabling Node Compression (NW4C Set No Compress Node)</h2>
137<p>Sets a flag so objects and nodes are not compressed even if the node compression feature is enabled. It is also possible to search for settings.<br /> To display the window, click NW4C → NW4C Set No Compress Node.</p>
138<center><img src="images/SetNoCompressNode.gif" alt="SetNoCompressNode" border="0" /></center>
139<p><strong>Setting Attributes</strong></p>
140<p>When an object or node is selected (multiple selections are possible), the <strong>Set</strong> field displays current settings for the selected node(s). If multiple selections were made, the setting for the node selected first is displayed.<br /> The flag for disabling node compression can be changed by clicking the combo box. It is possible to make multiple selections and change all selected nodes at once.<br /> If <strong>Compress this node if possible</strong> is set, compression will be performed when the node compression function is enabled. This is the default.<br /> If <B>Don’t compress this node</B> is set, compression will never be performed even if the node compression function is enabled.<br /> A different node can be set by selecting it without closing the window.</p>
141
142<p><strong>Searching for Attributes</strong></p>
143<p>Select a <strong>Search</strong> field check box and click the <strong>Search</strong> button to select the corresponding objects or nodes.</p>
144
145
146
147<h2 id="billboard">Plug-In for Setting Billboards (NW4C Set Billboard)</h2>
148<p>Sets a billboard for nodes. However, the settings are not reflected in the Work View of 3ds Max. It is also possible to search for settings.</p>
149<p>To display the window, click NW4C → NW4C Set Billboard.</p>
150<center><img src="images/SetBillboard.gif" alt="SetBillboard" border="0" /></center>
151<br />
152
153<p><strong>Billboard Coordinates</strong></p>
154<p>
155The billboard feature is suitable for use when the z direction of local coordinates for a node is being used for the view direction.<BR> However, because the coordinate system under 3ds Max is different from the NintendoWare coordinate system, be sure to create so that surfaces facing in the view direction under 3ds Max represent the -y axis direction under the local coordinate system.<BR> This can be set easily using origin adjustment or X form reset.
156</p>
157<center><img src="images/billboard-axis.gif" alt="billboard-axis" border="0" /></center>
158<br />
159
160<p><strong>Setting Attributes</strong></p>
161<p>When a node is selected (multiple selections are possible), the <strong>Set</strong> field displays current settings for the selected node(s).<br /> If multiple selections were made, the settings get displayed for the node that was selected first.</p>
162<p>Billboard mode can be changed by clicking the combo box. If multiple nodes are selected, they can all be changed at once.</p>
163
164<p>In the following description, the z-axis corresponds to the -y-axis under 3ds Max and the Y-axis corresponds to the z-axis under 3ds Max. </p>
165<iframe id="CommonBillboard" src="../../common/CommonBillboard.html" frameborder="0" scrolling="auto" width="100%" height="250px"></iframe>
166
167<p><strong>Searching for Attributes</strong></p>
168<p>Select a <B>Search</B> field check box and click the <B>Search</B> button to select the corresponding nodes. If multiple check boxes have been selected, a search is made for nodes that satisfy any of the settings.
169</p>
170<br />
171
172<h2 id="combineGroup">Plug-in for Setting Combine Group (NW4C Set Combine Group)</h2>
173<p>Sets the group by number when combining meshes for nodes. <BR> When setting a combine group, meshes that exist underneath nodes with different numbers are not combined. <BR> (For details on mesh combines, click <a href="../../common/CommonMeshCombine.html">Here</a>.)<br> It is also possible to search for settings.<br /> To display the window, click NW4C → NW4C Set No Compress Node.</p>
174<center><img src="images/SetCombineGroup.gif" alt="SetCombineGroup" border="0" /></center>
175<p><strong>Setting Attributes</strong></p>
176<p>
177When an object or node is selected (multiple selections are possible), the <strong>Set</strong> field displays current settings for the selected node(s). If multiple selections were made, the setting for the node selected first is displayed.<br /> It is possible to make multiple selections and change all selected nodes at once.<br />
178</p>
179<p>
180If <strong>Don't Care</strong> is selected, the value of the parent node is inherited. If the parent also has been set to <strong>Don't Care</strong> the combine group is not exported. This is the default.<br /> Values in the range of 0-255 can  be set for Combine Group.<br />
181</p>
182<p>
183If you select multiple nodes and press <strong>Set Sequential</strong>, the node hierarchy will be configured from shallow to deep while incrementing the count one at a time from the specified value. If the value exceeds 255, a warning will display and the configuration process will not proceed.
184</p>
185
186<p><strong>Searching for Attributes</strong></p>
187<p>
188Select <strong>Don't care</strong> (that is, no specified combine group) in the <strong>Search</strong> field, or select a conditional specification and then click the <strong>Search</strong> button to display the pertinent materials. The following conditions can be selected: under (&lt;), below (&lt;=), exactly (=), above (&gt;=), and over (&gt;). below), equal (= : exactly), over (&gt;= : above), over(&gt; : over). Integers from 0 to 255 can be specified for the numeric value.<br />
189</p>
190
191<h2 id="forceExportKey">Plug-in for setting the forced output of animation keys (NW4C Set Force Export Key)</h2>
192
193<p>This plug-in sets the forced output of animation keys for nodes. It is also possible to search for settings.<br />
194
195From the NW4C menu, run NW4C Set Force Export Key to display a window.</p>
196<center><img src="images/SetForceExportKey.gif" alt="SetForceExportKey" border="0" /></center>
197<p>Selected file nodes are displayed in the <strong>Selected Nodes</strong> column.</p>
198
199<p><strong>Setting Attributes</strong></p>
200<p>When a node is selected (multiple selections are possible), the <strong>Set</strong> field displays current settings for the selected node(s).<br>If multiple selections were made, the setting for the node selected first is displayed.<br />
201
202Animation key output settings can be changed by clicking the check box. If multiple nodes are selected, they can all be changed at once.</p><br />
203<ul>
204  <li><strong>Force Export Translate Key</strong></li>
205  <li><strong>Force Export Rotate Key</strong></li>
206  <li><strong>Force Export Scale Key</strong>
207    <p>These options specify whether to forcibly output the Translate, Rotate, and Scale value keys of skeletal animations. The default setting is OFF.<br /> If turned ON, at least one key will be output even if there is no animation or the value is the same as the bind pose. If turned OFF, no keys will be output for a skeletal animation if there is no animation or the value is the same as the bind pose.
208    </p>
209  </li>
210  <li><strong>Force Export Visibility Key</strong>
211    <p>Specifies whether to forcibly output node visibility keys. The default setting is OFF.<br /> If set to ON, at least one key will be exported even if there is no animation.  If set to OFF, keys are not exported to the model animation file if there is no animation.
212    </p>
213  </li>
214</ul><br />
215
216<p>A different node can be set by selecting it without closing the window.</p>
217
218<p><strong>Searching for Attributes</strong></p>
219<p>Select the <B>Search</B> field check box and click the <B>Search</B> button to select the corresponding nodes. If the <B>and</B> radio button located to the left of the <B>Search</B> button is selected, a search is made for the materials which have all of the same attributes. If the <B>or</B> radio button is selected, a search is made for nodes with at least one of the same attributes. Items for which no check boxes are selected are excluded from search conditions.</p>
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238<h2 id="user_data">Plug-in for Setting User Data (NW4C Set User Data)</h2>
239<p>This function sets user data for a node.<BR> From the NW4C menu, run NW4C Set User Data to display the window.</p>
240
241<p><img src="images/SetUserData1.gif" alt="SetUserData1" border="0" /></p>
242
243<p><strong>Setting Attributes</strong></p>
244<p>If <strong>only one</strong> mode is selected, current settings for the selected node are shown in the window. <br /> The lower part of the window displays a list of configured user data.
245</p>
246<ul>
247<li><strong>Name</strong>
248  <p>The name of the user data.</p>
249</li>
250<li><strong>Type</strong>
251  <p>The type of the user data.<BR> <B>String</B> is a character type, <B>Integer</B> is an integer type, and <B>Float</B> is a real number type.</p>
252</li>
253<li><strong>Size</strong>
254  <p>The size of the user data buffer.<br /> Indicates the number of characters when data is character type, or the number of values when the data is integer or real number type.</p>
255</li>
256<li><strong>Value</strong>
257  <p>The content of user data.<br /> If the display of data cannot fit on the screen, the undisplayed part will be omitted and displayed as &quot;...&quot;.</p>
258</li>
259</ul>
260
261<p>New user data can be added by clicking the <strong>Add</strong> button.<BR> The name and content of existing user data can be changed by selecting an item in the list and clicking <strong>Edit</strong>.<br /> Selected user data can be deleted by selecting an item in the list and clicking <strong>Delete</strong>.<br />
262
263The order of user data can be changed by selecting an item in the list and clicking <strong>Move Up</strong> or <strong>Move Down</strong>.<br /> To set a different node, select it without closing the window. <br /> A user data entry window can be displayed by clicking Add or Edit.</p>
264<p><img src="images/SetUserData2.gif" alt="SetUserData2" border="0" /></p>
265<ul>
266<li><strong>Name</strong>
267  <p>Enter the name of user data. Double-byte characters and half-space kana characters cannot be used. Symbols other than the hyphen (-), underscore (_), and period (.) cannot be used.</p>
268
269  </li>
270<li><strong>Type</strong>
271  <p>Specifies the type of user data. <B>String</B> is a character type, <B>Integer</B> is an integer type, and <B>Float</B> is a real number type.</p>
272  </li>
273
274<li><strong>String or Number</strong>
275  <p>If <B>Type</B> is <B>String</B>, enter the characters.「&lt;」、「&gt;」、「&amp;」, single quotes, and double quotes cannot be used. If <B>Type</B> is <B>Integer</B> or <B>Float</B>, enter a numeric value.<BR> More than one string or numeric value can be entered by delimiting with a carriage return. (Only one value per row can be entered.)<BR> <br />There are limitations on values that can be entered in the case numeric values.
276  </p>
277  <ul>
278      <li><strong>Integer</strong>
279        <p>-2,147,483,648 から 2,147,483,647</p>
280      </li>
281      <li><strong>Float</strong>
282        <p>
283            Saves a Float value in a floating-point format.<BR> The allowable input range is plus-minus 1e30 to 1e-6.<BR> ( 1e30 -&gt; 100000000・・・&lt;30 zeros&gt;  1e-6 -&gt; 0.000001 )<br /> Precision is up to the first 6 digits.<BR> <br />Example
284        </p>
285        <ul>
286            <li>If you enter 1234.1234, the result is 1234.12</li>
287            <li>If you enter 0.0000001, the result is 0.0</li>
288        </ul>
289        <p>
290            In addition, if you enter a very large or very small number, it will be displayed in exponential notation. Exponential notation represents numbers in the form (base)e(exponent), or base * 10 to the power of the exponent.<BR> <br />Example
291        </p>
292        <ul>
293            <li>If you enter 12300000000, the result is 1.23e+010</li>
294            <li>If you enter 0.0000123, the result is 1.23e+005</li>
295        </ul>
296      </li>
297  </ul>
298</li>
299</ul>
300<p>User data can be added or changed by clicking <strong>OK</strong>. An error is displayed in a message box if an illegal name, string, or numeric value is entered.</p>
301
302
303
304
305
306
307
308
309<h2 id="add_mat_attr">Configuring Settings for Each Material</h2>
310<p>
311The NintendoWare data creation plug-ins have been designed to allow the search and configuring of multiple materials simultaneously.
312</p>
313<p>
314However, you can also configure the NintendoWare material information separately for each material in the Material Editor. To do so, follow this procedure:
315</p>
316<p>
317To add material information for NintendoWare, select a material and execute Add Material Attribute from the NW4C menu of the Material Editor.
318</p>
319<center><img src="./images/add_mat_attr.gif" alt="add_mat_attr" /></center>
320<br />
321
322<p>
323The information shown below gets added automatically when you use the aforementioned plug-in. This is a way to directly change the settings for individual materials.<br /> To delete the NintendoWare information that has been added to a material, execute Delete Material Attribute from the NW4C menu.
324</p>
325<center><img src="./images/add_mat_attr_2.gif" alt="add_mat_attr_2" /></center>
326<br />
327
328<p>
329User data can also be set for materials.<BR> A configuration window is displayed if a material is selected and <B>Set Material User Data</B> is executed from the <B>NW4C </B>menu of the material editor. For information on how to make settings, see <a href="#user_data">Plug-In for Setting User Data (NW4C Set User Data)</a>.
330</p>
331<center><img src="images/SetUserData3.gif" alt="SetUserData3" /></center>
332
333
334<p>
335If material settings have been made under [Multi/Sub-Material], the same material information is output for all sub-materials. <BR> Also, different material information can be set for each sub-material by setting separete material information for each sub-material.<BR> Multi/sub-material information is output if material information has not been set for sub-materials.<br />
336</p>
337
338<p>
339The setting or deletion of additional information specific to NintendoWare will not effect the Work View or data configuration under 3ds Max.<br /> <br />
340</p>
341
342<h2 id="using_maxscript">Making Settings Using MAXScript</h2>
343<p>
344Instead of making setting using the data creation plug-in, you can also use MAXScript.<BR> <B>Note:</B> For details on MAXScript, see the MAXScript reference included with 3ds Max.<br /> <B>Note:</B> Internal changes to settings values may not always update for real-time display on 3ds Max.
345</p>
346
347<p><strong>Settings for Nodes</strong></p>
348<p>The Plug-in for Disabling Node Compression and Billboard Setting Plug-in are used to make settings for nodes.</p>
349<pre>/** Example of adding to Box01 **/
350-- Gets custom attributes from a node
351local nodeAttr = $Box01.custAttributes[&quot;NW4C Node Custom Attribute&quot;]
352-- Adds only if custom attributes are not already set
353if nodeAttr == undefined do
354(
355  nodeAttr = nw4c_node_custom_attribute()
356  append $Box01.custAttributes nodeAttr
357)
358
359/** Example of changing setting values **/
360$Box01.noCompress = true
361
362/** Example of deleting **/
363deleteItem $Box01.custAttributes &quot;NW4C Node Custom Attribute&quot;
364</pre>
365<br />
366<table class="arguments"><tbody>
367<tr><td>Plug-In Name</td><td>Item</td><td>Values that can be set</td></tr>
368<tr><td>Setting for disabling node compression</td><td>noCompress</td><td>true, false</td></tr>
369<tr><td>Billboard setting</td><td>billboardType</td><td>0:Off, 1:World, 2:World Viewpoint, 3:Screen, <br /> 4:Screen Viewpoint, 5:Y Axial, 6:Y Axial Viewpoint</td></tr>
370<tr><td>Combine Group Settings</td><td>combineGroup</td><td>-1: Don't Care, 0-255: Combine group</td></tr>
371<tr><td>Forced animation key output (Scale)</td><td>exportScaleKey</td><td>true, false</td></tr>
372<tr><td>Forced animation key output (Rotate)</td><td>exportRotateKey</td><td>true, false</td></tr>
373<tr><td>Forced animation key output (Translate)</td><td>exportTranslateKey</td><td>true, false</td></tr>
374</tbody></table>
375<br /> <br />
376<p><strong>Settings for Materials</strong></p>
377<p>The Plug-in for Setting Material Attributes and the Plug-in for Setting the Rendering Priority of Polygons are used to make settings for materials.</p>
378<pre>/** Example of adding to Box01 material**/
379-- Gets custom attributes from the material
380local mtlAttr = $Box01.material.custAttributes[&quot;NW4C Material Custom Attribute&quot;]
381-- Adds only if custom attributes are not already set
382if mtlAttr == undefined do
383(
384  mtlAttr = nw4c_mtl_custom_attribute()
385  append $Box01.material.custAttributes mtlAttr
386)
387
388/** Example of changing setting values **/
389$Box01.material.fragmentLighting = true
390
391/** Example of deleting **/
392deleteItem $Box01.material.custAttributes &quot;NW4C Material Custom Attribute&quot;
393</pre>
394<br />
395<table class="arguments"><tbody>
396<tr><td>Plug-In Name</td><td>Item</td><td>Values that can be set</td></tr>
397<tr><td>Material attribute setting</td><td>faceCulling</td><td>0:Back Face, 1:Front Face, 2:Always, 3:Never</td></tr>
398<tr><td>Material attribute setting</td><td><CODE>fragmentLighting</CODE></td><td>true, false</td></tr>
399<tr><td>Material attribute setting</td><td>vertexLighting</td><td>true, false</td></tr>
400<tr><td>Material attribute setting</td><td>compress</td><td>0:Compress if possible, 1:Don’t compress</td></tr>
401<tr><td>Material attribute setting</td><td>blendMode</td><td>
4020: Auto, 1: Opaque, 2: Alpha Test, 3: Translucent, 4: Add, 5: Sub, 6: Multiply</td></tr>
403<tr><td>Polygon Rendering Priority Setting</td><td>renderPriorityType</td><td>0:Don't care, 1:Use renderPriority</td></tr>
404<tr><td>Polygon Rendering Priority Setting</td><td>renderPriority</td><td>1(High Priority) - 255(Low Priority)</td></tr>
405</tbody></table>
406<br />
407
408
409<p><br /></p>
410<hr><p>CONFIDENTIAL</p></body>
411</html>