Chapter 2 Nodes

2-2. Links to Nodes in NIFF

5. Handling of Materials in NIFF (#1)

In NIFF, material nodes are made so that they can be linked from object nodes, shape nodes, and part nodes. In addition, if several materials are liked in hierarchical links, the material at the bottom level is given priority. If a material is not set at the bottom level, the parent material attributes take over. In addition, the settings in a material node are set so that a primitive color is not used, either the vertex color or the triangle color is enabled. Vertex colors and triangle colors are set with Color nodes.

Consider the links as illustrated below.

Figure: Example of Using Material Nodes in Hierarchical Links

In NIFF data, the material attributes take over at the bottom level. Consequently, in the above figure, the attributes of Mat_0 are assigned to the Part_0 node on the Shape_0 node. The attributes of Mat_1 are assigned to the Part_1 node on the Shape_0 node, and the attributes of Mat_2 are assigned to the Shape_1 node. However, regarding color, if the various nodes are set up so that a primitive color is not used, the color in the respective color node will be used.

When performing lighting, apex color data cannot be used in Nintendo 64. Consequently, even in NIFF data, without using the apex color as it is, combine triangles with the same color value as parts and use the color value of the material node for them.