7. ShapeNode

(1) ShapeNode

u32 shape_type Specifies the Shape type. As of this time, the following flags are defined:

SHAPE_TYPE_CLEAR	0x00000000
SHAPE_TYPE_AA		0x00000001
SHAPE_TYPE_RA		0x00000002
SHAPE_TYPE_ZB		0x00000004
SHAPE_TYPE_CULL_BACK	0x00000010
SHAPE_TYPE_CULL_FRONT	0x00000020
SHAPE_TYPE_CULL_BOTH	0x00000030

SHAPE_TYPE_CLEAR clears the shape type.

SHAPE_TYPE_AA performs anti-aliasing.

SHAPE_TYPE_RA performs reduced aliasing.

SHAPE_TYPE_ZB performs Z buffering.

SHAPE_TYPE_CULL_BACK performs back face culling.

SHAPE_TYPE_CULL_FRONT performs front face culling.

SHAPE_TYPE_CULL_BOTH always performs culling.

The SHAPE_TYPE_AA flag and the SHAPE_TYPE_RA flag cannot be specified together at the same time. Further, you only specify one of the SHAPE_TYPE_CULL_* flags.

If you want to specify the shape type for anti-aliasing, Z-buffering and back face culling, you would set the flags as shown below:


SHAPE_TYPE_AA | SHAPE_TYPE_ZB | SHAPE_TYPE_CULL_BACK

The following flag has been added since NIFF2.0:

SHAPE_TYPE_USE_VTX_ALPHA_FOR_FOG	0x00000100

Set this flag when you will be using vertex alpha with Fog. Normally, when you use Fog, the vertex alpha is not output when you convert from NIFF to N64. But if you set this flag, the vertex alpha will be forcibly output even when you use Fog.
u32 kind_of_node_for_geometry NIFF2.0 makes it possible to link three kinds of nodes with shape_tri_link. These are the TriGroup node, the Envelope node, and the ClusterShape node.
By setting any one of the following tags in the data, shape_tri_link will indicate the index number from the pertinent list.

TAG_TRI_GROUP           0x00080100
TAG_ENVELOPE            0x00220100
TAG_CLUSTER_SHAPE       0x00280100

For the TAG_TRI_GROUP tag, shape_tri_link describes the TriGroup index number.
For the TAG_ENVELOPE tag, shape_tri_link describes the Envelope index number.
For the TAG_CLUSTER_SHAPE tag, shape_tri_link describes the ClusterShape index number.
u32 external_mat_file_name_index When the Mat node references an external file, that file name is described with an ExternalNameList index number.

Please do not include the directory name etc. when describing the file name.

In this case, specify shape_mat_link = 0xffffffff.

If an external file is not referenced, please describe with 0xffffffff.

u32 external_mat_name_index When the Mat node references an external file, the Mat name name is described with an ExternalNameList index number.

In this case, specify shape_mat_link = 0xffffffff.

If an external file is not referenced, please describe with 0xffffffff.

Go to the data chunk