NUT (File Format)

From Wexos's Wiki
(Redirected from NUT)
Jump to navigationJump to search

NUT (Namco Universal Texture) is a texture format used in Super Smash Bros 4 for Wii U.

File Format

Header

The file starts with a 0x18 byte long header:

Offset Type Description
0x00 Char[4] File magic Always NTWU (Namco Texture Wii U) or NTP3 (Namco Texture Playstation 3).
0x04 UInt16 Unknown. Usually seen as 0x020E.
0x06 UInt16 Number of textures.
0x08 UInt32 Unknown.
0x0C UInt32 Unknown.

GIDX

Offset Type Description
0x00 UInt32 Total size. Size of this entry plus the total image data size.
0x04 UInt32 Unknown.
0x08 UInt32 Total image data size in bytes, including the main image and all mipmaps.
0x0C UInt16 Size of this entry in bytes.
0x0E UInt16 Unknown.
0x10 UInt16 Number of mipmaps.
0x12 UInt16 Image format.
0x14 UInt16 Image width in pixels.
0x16 UInt16 Image height in pixels.
0x18 UInt32 Unknown.
0x1C UInt32 Unknown.
0x20 UInt32 Image data offset.
0x24 UInt32 Mipmap data offset.
0x28 UInt32 Surface info offset.
0x2C UInt32 Unknown.
0x30 UInt32 Image data size in bytes.
0x34 UInt32 Mipmap data size in bytes.
0x38 UInt32 Unknown.
0x3C UInt32 Unknown.
0x40 UInt32 Unknown.
0x44 UInt32 Unknown. Only seen as 0x20.
0x48 UInt32 Unknown. Only seen as 0x10.
0x4C UInt32 Unknown.
0x50 Char[4] Section magic. Always GIDX in ASCII.
0x54 UInt32 Unknown. Only seen as 0x10.
0x58 UInt32 Unknown.
0x5C UInt32 Unknown.

Surface Info

Offset Type Description
0x00 UInt32 Texture dimension.
0x04 UInt32 Texture width in pixels.
0x08 UInt32 Texture height in pixels.
0x0C UInt32 Texture depth in pixels.
0x10 UInt32 Number of mipmaps.
0x14 UInt32 Texture format.
0x18 UInt32 AA mode.
0x1C UInt32 Usage.
0x20 UInt32 Data length. Length of texture data in bytes.
0x24 UInt32 Data pointer. Set at runtime.
0x28 UInt32 Mipmaps data length. Length of mipmaps data in bytes.
0x2C UInt32 Mipmaps pointer. Set at runtime.
0x30 UInt32 Tile mode.
0x34 UInt32 Swizzle value.
0x38 UInt32 Alignment.
0x3C UInt32 Pitch.
0x40 UInt32[13] Mipmap offsets. An array of 13 offsets for each mipmap, relative to the start of the mipmap data.
0x74 UInt32 First mipmap ID.
0x78 UInt32 Number of available mipmaps.
0x7C UInt32 First slice ID.
0x80 UInt32 Number of available slices.
0x84 Byte[4] Component Selector, determines which texture color channels are used for each target channel. The bytes map to the Red, Green, Blue and Alpha channel and can receive one of the following channels.
Value Name Description
0 R The channel will receive the red values of the texture.
1 G The channel will receive the green values of the texture.
2 B The channel will receive the blue values of the texture.
3 A The channel will receive the alpha values of the texture.
4 0 The channel will always have a value 0.
5 1 The channel will always have a value 1.
0x88 UInt32[5] Texture registers. 5 registers used to describe the texture.

Tools

The following tools can handle NUT files:

  • (none)