TextureAsset document with its name, a 180-byte header resource (kind, format, size, mips, group), and a chunk with the pixels. The game has 25,719 textures.
Kinds
Every volume the game ships has one mip, so Studio writes volumes with one.
Formats
The game keeps its 2D textures in 17 formats, and its arrays, cubes and volumes in a few more: 28 pairs of kind and format in all. Most are block compressed:
The others are uncompressed: one-channel formats (
R8, R16, R16F), R10G10B10A2 (the colour grade tables), and 8-bit colour.
You do not choose a format when you replace a game texture: the new pixels are written in the game texture’s own format. A picture for a texture of your own (a prop’s or a map’s material) is written in the format its slot takes.
A one-channel format keeps the red channel of your picture, as BC4 does. Paint a mask in red, or in grey.
Names say what the channels hold
The letters at the end of a texture’s name, and of the material slot it fills, say what each channel holds:C is colour, NY a normal map. Others pack several values into one picture, such as OSK and MSK; what each letter means depends on the shader that reads it (on a face layer, O is opacity and S smoothness). Keep the channels where the game’s texture has them.
Mips and streaming
A texture keeps its mips, largest first, from 1 to 13 of them. A block-compressed mip is made of 4 by 4 blocks, so the smallest mips of a block-compressed texture are one block each. A large 2D texture can leave its sharpest mips out of its bundle. The bundle holds the rest, which is enough to draw it, and the game reads the sharper mips from the superbundle when it wants them.- One to three mips are left out. The part the bundle keeps starts on a 64 KB boundary of the stored chunk.
- Arrays, cubes and volumes always keep their whole chunk with the bundle.
- Menu pictures, stickers and tattoos (11,280 textures) are listed by no bundle at all, only by a superbundle.
Texture groups
Every texture belongs to a group named in its header, such asWorlds_C_TextureGroup for world colour pictures, Character_Top_Packed_TextureGroup for clothing, or UI_Thumbnail_TexGrp for menu pictures. The game names 201 groups; 3,958 textures name none.
The game keeps no asset for a group. Two settings in the header go with the group: one says whether the texture goes through the streaming pool, and the other looks like how many mips to drop at each quality setting, though that is not proven. A texture Studio writes into a group carries that group’s settings, read from the game’s own textures of the group.
Sizes and files
When you replace a game texture:- A DDS keeps your pixels exactly. A PNG is encoded by Studio: uncompressed formats give every pixel back, block-compressed ones lose a little (BC7 and BC5 about 1.5 steps of 255 on average, BC1, BC3 and BC4 about 3).
- A cube is a DDS cube, an array a DDS array and a volume a DDS volume, each face, layer or slice with all its mips.
- A prop’s pictures are brought to powers of two.