1. Architectural Role & Engine Purpose
The TMM (Terrain Multi-Texture Material Splatting Table) format controls procedural multi-texture blending and surface layer transitions (rock cliff faces, lush grass, packed dirt roads, snow) in I.G.I. 2: Covert Strike.
TMM files define alpha blend weight distributions across 4 simultaneous material layers, enabling organic photorealistic outdoor ground blending without harsh texture seams.
2. Binary File Layout & Memory Map Diagram
A TMM file contains layer count headers, material definitions, and alpha weight splat distributions:
3. Multi-Pass Terrain Splatting Pipeline Diagram
The terrain engine executes multi-pass texture splatting using hardware alpha blending:
4. C++ Struct Definitions
#pragma pack(push, 1)
struct TmmHeader {
char magic[4]; // "TMM "
uint32_t version; // 2
uint32_t layer_count; // Number of material layers (typically 4)
uint32_t splat_res; // Splat resolution (e.g. 512)
};
struct TmmLayerDesc {
uint32_t tex_id; // Diffuse texture index
uint32_t detail_tex_id; // High-frequency detail texture
float uv_scale[2]; // World mapping frequency
float min_slope; // Minimum slope angle
float max_slope; // Maximum slope angle
float min_elevation; // Altitude range minimum
float max_elevation; // Altitude range maximum
};
static_assert(sizeof(TmmHeader) == 16, "TmmHeader must be 16 bytes");
#pragma pack(pop)