9. MatNode

(1) MatNode

float ambient_red
float ambient_green
float ambient_blue
float ambient_alpha
ambient color

0 ambient_* 1

If the user will not be setting the values, please set 1.0 as the default for all values.

float emission_red
float emission_green
float emission_blue
float emission_alpha
emission color

0 emission_* 1

float diffuse_red
float diffuse_green
float diffuse_blue
float diffuse_alpha
diffuse color

0 diffuse_* 1

If the user will not be setting the values, please set 1.0 as the default for all values.

u32 external_local_light_file_name_index When local light 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.

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

u32 external_local_light_name_index When local light references and external file, that Light name is described with an ExternalNameList index number.

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

u32 external_tex_num Describes the external file reference Tex number.
u32 prim_color_anim_num Describe the PrimColorAnim number if animating primitive colors. If not animating, please set prim_color_animation_num = 0x0. Also note that if animation is being done, the normal prim_red, prim_green, prim_blue, prim_alpha are not used.
u32 external_tex_file_name_index When Tex references an external file, the referenced file name is specified with an ExternalNameList index number.

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

This field is not described when an external file is not referenced (external_tex_num = 0).

u32 external_tex_name_index When Tex references an external file, that Tex name is described with an ExternalNameList index number.
PrimColorAnim This is the area describing the primitive color for each key. The are is not described when prim_color_anim_num = 0x0.
*_for_fog *_for_fog data in a Mat node indicate the attributes to be handled in scenes which use fog. The contents of the data are similar to those data without _for_fog attached.

Go to the data chunk

(2) PrimColorAnim, PrimColorAnimForFog
u32 interpolation_type Describes the interpolation type from this key to the next. The following flags are defined:

NIFF2_INTERPOLATION_TYPE_CONST		0x00000000
NIFF2_INTERPOLATION_TYPE_LINEAR		0x00000002

NIFF2_INTERPOLATION_TYPE_CONST retains the data from this key to the next key.
NIFF2_INTERPOLATION_TYPE_LINEAR performs linear interpolation from this key to the next key.

Please set the same value for each interpolation_type inside every PrimColorAnim and PrimColorAnimForFog.

u32 key Describes the Key value.
float prim_color_anim_red
float prim_color_anim_green
float prim_color_anim_blue
float prim_color_anim_alpha
primitive color

0 prim_color_anim_* 1

Go to the data chunk