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>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">Data Creation Plug-In Types</a><br />
20
21</p>
22
23<h2><a name="kind">Data Creation Plug-In Types</a></h2>
24<p>The following table shows a list of data creation plug-ins.</p>
25<table class="arguments"><tbody><tr>
26<tr>
27<td>Plug-In Name</td>
28<td>Description</td>
29</tr>
30<tr>
31<td valign="top"><a href="#mat_attr">NW4C Set Material Attribute</a></td>
32<td>Sets attributes for materials.</td>
33</tr>
34<tr>
35<td valign="top"><a href="#render_priority">NW4C Set Render Priority</a></td>
36<td>Sets the polygon rendering priority for materials.</td>
37</tr>
38
39<tr>
40<td valign="top"><a href="#no_compress_node">NW4C Set No Compress Node</a></td>
41<td>Sets the node compression disable flag for nodes.</td>
42</tr>
43<tr>
44<td valign="top"><a href="#billboard">NW4C Set Billboard</a></td>
45<td>Sets a billboard for nodes.</td>
46</tr>
47<tr>
48<td valign="top"><a href="#combineGroup">NW4C Set Combine Group</a></td>
49<td>Sets a combine group for nodes.</td>
50</tr>
51
52</tr>
53</tbody></table>
54
55
56
57
58<h2><a name="mat_attr">Plug-In for Setting Material Attributes (NW4C Set Material Attribute)</a></h2>
59<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>
60<p><B>Set Material Attribute</B> can be configured in either of the following ways:</p>
61<br />
62
63<h3>Settings by Individual Material</h3>
64<p>See the section <a href="#add_mat_attr">Configuring Settings for Each Material</a> below.</p>
65<br />
66
67<h3>Settings for Multiple Materials at Once</h3>
68<p>
69Execute <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.
70</p>
71<p>
72Materials 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.
73</p>
74
75<center><p><img src="images/SetMaterialAttr.gif" alt="SetMaterialAttr" /></p></center>
76<p>
77Enter 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.
78</p>
79<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.
80</p>
81
82<ul>
83  <li><strong>Face Culling</strong>
84  <p>Specifies the faces for culling polygons.<BR> <strong>Back Face</strong> culls the back face and displays only the front face, <strong>Front Face</strong> culls the front face and displays only the back face, <strong>Always</strong> does not display either face, and <strong>Never</strong> displays both faces. The default is Back Face.
85  </p>
86  <p>
87  <strong><font color="#ff0000"><B>Always </B>(do not show either face) is not supported at runtime. It is handled as <B>Front Face</B> (show only back face).<br /> <B>Always </B> will be deprecated from Nintendo Ware 1.2.0.</font></strong>
88  </p>
89
90  </li>
91  <li><strong>Fragment Lighting</strong>
92  <p>Specifies whether to use fragment lighting. The default is <B>On</B>.</p>
93
94  </li>
95  <li><strong>Vertex Lighting</strong>
96  <p>Specifies whether to use vertex lighting. The default is off.<br /> If set to ON, because the maximum number of matrix palettes goes down, the drawing process load increases when using skin models with many nodes that are being influenced.</p>
97
98  </li>
99  <li><strong>Compress</strong>
100  <p>
101  <strong>This feature has not been implemented yet. The value set is not saved.</strong><br /> Sets a flag to prevent compression.<br /> If set to <strong>Compress if possible</strong>, compression is used if the attributes are the same as other materials. This is the default.<br /> If set to <B>Don’t compress</B>, the material is output as an independent material without compression even if the attributes are the same as other materials.</p>
102  </li>
103
104  <li><strong>Blend Mode</strong>
105    <p>Specifies the material's Translucent Setting. <br /> If set to <STRONG>Auto</STRONG>, the PE is set automatically to either Opaque or Translucent, based on what is optimal given the material, vertex color and texture alpha.<BR> The default is <B>Auto</B>. If Auto does not result in the desired translucency setting, specify a setting other than Auto for the PE.<BR> <B>Opaque</B> sets the PE to standard opaque rendering.<BR> <B>Alpha Test</B> sets the PE to standard mask rendering.<BR> <B>Translucent</B> sets the PE to standard translucent rendering.<BR> Setting <strong>Add</strong> results in settings for an additive translucent image.<br /> Setting <strong>Sub</strong> results in settings for a subtractive translucent image.<br /> Setting <strong>Multiply</strong> results in settings for a multiplicative translucent image.<br />
106    </p>
107    <p><strong>Details about Auto</strong> <br />PE is set to Translucent in the following cases. In all other cases it is set to Opaque.
108    <ul>
109    <li>The opacity of the material is not 100.</li>
110    <li>A texture has been set for the opacity.</li>
111    <li>Vertex alpha is being used.</li>
112    </ul>
113
114
115    </p>
116</li>
117
118
119</ul>
120<br />
121
122
123
124
125
126<h2><a name="render_priority">Plug-In for Setting the Rendering Priority of Polygons (NW4C Set Render Priority)</a></h2>
127<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>
128<p>Set Render Priority can be configured in either of the following ways:</p>
129
130<h3>Settings by Individual Material</h3>
131<p>See the section <a href="#add_mat_attr">Configuring Settings for Each Material</a> below.</p>
132<br />
133
134<h3>Settings for Multiple Materials at Once</h3>
135
136<p>
137To 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.
138</p>
139<center><p><img src="images/SetPriority.gif"></p></center>
140<br />
141<p>
142Enter 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.
143</p>
144<p>
145Select <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 />
146</p>
147
148<p>
149The <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 />
150
151</p>
152
153<p>
154The 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.
155</p>
156<p>
157
158
159Select 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).
160</p>
161
162
163
164<h2><a name="no_compress_node">Plug-In for Disabling Node Compression (NW4C Set No Compress Node)</a></h2>
165<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>
166<center><img src="images/SetNoCompressNode.gif" alt="SetNoCompressNode" border="0" /></center>
167<p><strong>Setting Attributes</strong></p>
168<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>
169
170<p><strong>Searching for Attributes</strong></p>
171<p>Select a <strong>Search</strong> field check box and click the <strong>Search</strong> button to select the corresponding objects or nodes.</p>
172
173
174
175<h2><a name="billboard">Plug-In for Setting Billboards (NW4C Set Billboard)</a></h2>
176<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>
177<p>To display the window, click NW4C → NW4C Set Billboard.</p>
178<center><img src="images/SetBillboard.gif"border="0"></center>
179<br />
180
181<p><strong>Billboard Coordinates</strong></p>
182<p>
183The 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.
184</p>
185<center><img src="images/billboard-axis.gif"border="0"></center>
186<br />
187
188<p><strong>Setting Attributes</strong></p>
189<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>
190<p>Billboard mode can be changed by clicking the combo box. If multiple nodes are selected, they can all be changed at once.</p>
191
192<p>
193Setting <strong>Off</strong> results in a standard display (with no billboard). This is the default.<br /> Setting <strong>World</strong> displays by rotating the z axis (-y direction under 3ds Max, the same inferred hereafter) to be parallel with the view axis.<BR> Setting <strong>World Viewpoint</strong> displays by rotating the z axis to point in the view direction.<br />
194
195Setting <strong>Screen</strong> displays by rotating the z axis is parallel with the view axis and the y axis (z axis under 3ds Max, the same inferred hereafter) matches the screen's upper direction.<BR> Setting <strong>Screen Viewpoint</strong> displays by rotating so that the z axis points in the view direction and the y axis matches the screen's upper direction.<br /> Setting <strong>Y Axial</strong> display by rotating only the y axis so the z axis is parallel to the view axis.<br /> Setting <strong>Y Axial Viewpoint</strong> displays by rotating only the y axis so the z axis point in the view direction.<br />
196</p>
197<p>
198Modes other than <B>Screen</B> and <B>Screen Viewpoint</B> are affected by the rotation of parent nodes.<br /> A different node can be set by selecting it without closing the window.
199</p>
200
201<p><strong>Searching for Attributes</strong></p>
202<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.
203</p>
204<br />
205
206<h2><a name="combineGroup">Plug-in for Setting Combine Group (NW4C Set Combine Group)</a></h2>
207<p>By specifying a combine group for nodes you can set the range that will be integrated upon optimization.<br /> To display the window, click NW4C → NW4C Set No Compress Node.</p>
208<center><img src="images/SetCombineGroup.gif" alt="SetCombineGroup" border="0" /></center>
209<p><strong>Setting Attributes</strong></p>
210<p>
211When 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 />
212</p>
213<p>
214If <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 />
215</p>
216<p>
217If 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.
218</p>
219
220<p><strong>Searching for Attributes</strong></p>
221<p>
222Select <strong>Don't care</strong> (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 />
223</p>
224
225
226<h2><a name="add_mat_attr">Configuring Settings for Each Material</a></h2>
227<p>
228The NintendoWare data creation plug-ins have been designed to allow the search and configuring of multiple materials simultaneously.
229</p>
230<p>
231However, you can also configure the NintendoWare material information separately for each material in the Material Editor. To do so, follow this procedure:
232</p>
233<p>
234To add material information for NintendoWare, select a material and execute Add Attribute from the NW4C menu of the Material Editor.
235</p>
236<center><img src="./images/add_mat_attr.gif" alt="add_mat_attr" /></center>
237<br />
238
239<p>
240The 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 Attribute from the NW4C menu.
241</p>
242<center><img src="./images/add_mat_attr_2.gif" alt="add_mat_attr_2" /></center>
243<br />
244<p>
245If 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 />
246</p>
247
248<p>
249The setting or deletion of additional information specific to NintendoWare will not effect the Work View or data configuration under 3ds Max.<br /> <br />
250</p>
251
252<h2><a name="using_maxscript">Making Settings Using MAXScript</a></h2>
253<p>
254Instead 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.
255</p>
256
257<p><strong>Settings for Nodes</strong></p>
258<p>The Plug-in for Disabling Node Compression and Billboard Setting Plug-in are used to make settings for nodes.</p>
259<pre>
260/** Example of adding to Box01 **/
261-- Gets custom attributes from a node
262local nodeAttr = $Box01.custAttributes[&quot;NW4C Node Custom Attribute&quot;]
263-- Adds only if custom attributes are not already set
264if nodeAttr == undefined do
265(
266  nodeAttr = nw4c_node_custom_attribute()
267  append $Box01.custAttributes nodeAttr
268)
269
270/** Example of changing setting values **/
271$Box01.noCompress = true
272
273/** Example of deleting **/
274deleteItem $Box01.custAttributes &quot;NW4C Node Custom Attribute&quot;
275</pre>
276<br />
277<table class="arguments"><tbody>
278<tr><td>Plug-In Name</td><td>Item</td><td>Values that can be set</td></tr>
279<tr><td>Setting for disabling node compression</td><td>noCompress</td><td>true, false</td></tr>
280<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>
281<tr><td>Combine Group Settings</td><td>combineGroup</td><td>-1: Don't Care, 0-255: Combine group</td></tr>
282</tbody></table>
283<br /> <br />
284<p><strong>Settings for Materials</strong></p>
285<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>
286<pre>
287/** Example of adding to Box01 material**/
288-- Gets custom attributes from the material
289local mtlAttr = $Box01.material.custAttributes[&quot;NW4C Material Custom Attribute&quot;]
290-- Adds only if custom attributes are not already set
291if mtlAttr == undefined do
292(
293  mtlAttr = nw4c_mtl_custom_attribute()
294  append $Box01.material.custAttributes mtlAttr
295)
296
297/** Example of changing setting values **/
298$Box01.material.fragmentLighting = true
299
300/** Example of deleting **/
301deleteItem $Box01.material.custAttributes &quot;NW4C Material Custom Attribute&quot;
302</pre>
303<br />
304<table class="arguments"><tbody>
305<tr><td>Plug-In Name</td><td>Item</td><td>Values that can be set</td></tr>
306<tr><td>Material attribute setting</td><td>faceCulling</td><td>0:Back Face, 1:Front Face, 2:Always, 3:Never</td></tr>
307<tr><td>Material attribute setting</td><td><CODE>fragmentLighting</CODE></td><td>true, false</td></tr>
308<tr><td>Material attribute setting</td><td>vertexLighting</td><td>true, false</td></tr>
309<tr><td>Material attribute setting</td><td>compress</td><td>0:Compress if possible, 1:Don’t compress</td></tr>
310<tr><td>Material attribute setting</td><td>blendMode</td><td>
3110: Auto, 1: Opaque, 2: Alpha Test, 3: Translucent, 4: Add, 5: Sub, 6: Multiply</td></tr>
312<tr><td>Polygon Rendering Priority Setting</td><td>renderPriorityType</td><td>0:Don't care, 1:Use renderPriority</td></tr>
313<tr><td>Polygon Rendering Priority Setting</td><td>renderPriority</td><td>1(High Priority) - 255(Low Priority)</td></tr>
314</tbody></table>
315<br />
316
317
318<p><br /></p>
319<hr><p>CONFIDENTIAL</p></body>
320</html>