Nintendo Confidential

10. Tex Node


(1) Tex Node Description (English)

u32 tex_filter Specifies the macro for N64 texture filtering. The following flags have been defined:

NIFF2_TEX_FILTER_POINT		0x00000000
NIFF2_TEX_FILTER_BILERP		0x00000001
NIFF2_TEX_FILTER_AVERAGE	0x00000002

Please set TEX_FILTER_BILERP as the default.
u32 use_perspective_correction Sets texture perspective correction ON/OFF. The following flags have been defined:

NIFF2_NO_PERSPECTIVE_CORRECTION	0x00000000
NIFF2_PERSPECTIVE_CORRECTION	0x00000001

Please set PERSPECTIVE_CORRECTION as the default value.
u32 mipmap_level Specifies the MipMap texture level.

0 <= mipmap_level <= 7

If MipMap is not used, please specify the following flag:


NIFF2_NO_MIPMAP	0x00000000

The maximum level value for MipMap images created on the NIFF->N64 converter is specified by TexImg -> mipmap_max_level.
u32 use_color_palette When color index texture needs to be used, one of the following needs to be specified:

1. As in NIFF 1.0, create the color index texture automatically using the NIFF->N64 converter,

2. Specify the color index texture using the index texture image and color palette added in NIFF 2.0.

The following flags have been defined:

NIFF2_NO_USE_COLOR_PALETTE	0x00000000
NIFF2_USE_COLOR_PALETTE		0x00000001

If using the the NIFF->N64 converter (as in NIFF 1.0), please specify NIFF2_NO_USE_COLOR_PALETTE.

If using the color index texture image and color palette added in NIFF 2.0, please specify NIFF2_USE_COLOR_PALETTE.

In the latter case, the tex_tile_img_index in TexDataArea points to a CiImgList index number, and tex_tile_img_num indicates the total number of CiImg that are used.

u32 external_tex_img_num Specifies the total number of TexImg that are referenced as external files.

When a TexImg is referenced as an external file, all TexImg must be referenced as an external file.

If this is the case, please specify tex_img_index = 0xffffffff, tex_tile_img_num = 0x0.

In addition, when color index texture is used, ColorPalette is also referenced as an external file.

If TexImg is not referenced as an external file, please specify 0x0.

u32 color_palette_index In the case of use_color_palette = NIFF2_USE_COLOR_PALETTE, the color palettes that are used are specified by a ColorPaletteList index number.

This area is not used when use_color_palette = 0.

In the case of TEX_ANIM_OFF, specify color_palette_index(0) only.

u32 tlut_palette_number When a 4bit color index texture is used and a 256-color palette is specified, specify it to the offset value of the palette that is divided by 16. Normally, it is set to 0x0.

If NIFF2_NO_USE_COLOR_PALETTE = 0x00000000, this field is not used.

And, if 8bitCI texture (256 colors) is used as TexImg, this field will always be 0x0.

If 4bitCI texture and 16-color-palette are used, please set the value of this field to 0x0.

When TEX_ANIM_OFF, set to tlut_palette_number(0).

u32 external_tex_img_file_name_index When Texture Image is referenced as an external file, the file name is specified by an ExternalNameList index number.

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

This area is not specified if there is no external file reference.

u32 external_tex_img_name_index When Texture Image is referenced as an external file, the name of the TexImg that is referenced is specified by an ExternalNameList index number.

This area is not specified if there is no external file reference.

u32 external_color_palette_file_name_index When ColorPalette is referenced as an external file, the file name is specified by an ExternalNameList index number.

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

This area is not specified if there is no external file reference.

In the case of NIFF2_NO_USE_COLOR_PALETTE = 0x00000000, this field is not specified.

u32 external_color_palette_name_index When ColorPalette is referenced as an external file, the ColorPalette name is specified by an ExternalNameList index number.

This area is not specified if there is no external file reference.

In the case of NIFF2_NO_USE_COLOR_PALETTE = 0x00000000, this field is not specified.

See Data Chunk

Back to Index


Copyright 1998, 1999 NINTENDO Co., Ltd. All rights reserved.
Copyright 1998, 1999 MONEGI CORPORATION All rights reserved.