Chapter 3 Binary Format

3-1.Binary Format Overview

The format of the binary NIFF file is outlined in the following table.

FileHeader
SceneList
EnvList
CamList
LightList
ObjList
ShapeList
VtxList
TriList
ColorList
VectorList
StList
PartList
MatList
TextureList
TexImgList
AnimList
CollisionList
SwitchList
NameList

Figure: Binary Format for NIFF File

By dividing information concerning a single scene into blocks as illustrated above, fewer errors occur when editing a file. Also, when linking a given node to a different node, it is possible to extend the link from multiple nodes to a common node, since the format taken specifies index numbers in the list.

One of the important elements of the game application is using a combination of common materials and textures while taking ROM efficiency and memory efficiency into consideration. Therefore, it is possible to create commonly referenced data with the NIFF file and increase memory efficiency through conversions. Also, it is now possible to efficiently expedite the operation with commonly used nodes consolidated into one, when data is changed midway.

However, the various types of data in NIFF are designed so that, as much as possible, there is no loss when outputting from CG tools. Therefore, the data cannot be used during a game application in that format. The function of the converter used to create a runtime database is responsible for determining how this data will be managed efficiently. Consequently, application developers must design a converter with consideration given to data management without redundancy.

NIFF also provides a Nintendo Extension Block and a User Extension Block within each list. These are both blocks used to expand functions - a block that Nintendo uses for function expansion and a block that users and CG tool manufacturers use for function expansion. Utilizing these blocks, it is possible to create a data area which is not established beforehand.