1. Architectural Role & Engine Purpose
The TLM (Terrain Lightmap Cascades) format stores multi-layer 32-bit RGBA color lightmaps with 10 precomputed mipmap cascades in I.G.I. 2: Covert Strike.
Unlike IGI 1's monochrome 8-bit lightmaps, IGI 2's TLM files store full colored sunlight and ambient sky-radiosity (warm yellow direct sunlight, cool blue indirect mountain shadows), filtering seamlessly across vast valleys via 10 hardware mipmap cascades.
2. Binary File Layout & Memory Map Diagram
A TLM file contains lightmap dimensions, 10 mip cascade byte offsets, and contiguous RGBA pixel blocks:
3. Multi-Texture Terrain Lighting Pipeline Diagram
The Direct3D 8 terrain shader modulates diffuse terrain splatting with colored TLM lightmap cascades:
4. C++ Struct Definitions
#pragma pack(push, 1)
struct TlmHeader {
char magic[4]; // "TLM "
uint16_t version; // 2
uint16_t width; // 1024
uint16_t height; // 1024
uint16_t mip_count; // 10
float ambient_tint[4];// RGBA ambient color
float sun_color[4]; // RGBA sunlight color
uint32_t mip_offsets[10];// Byte offsets to 10 mip cascades
};
static_assert(sizeof(TlmHeader) == 82, "TlmHeader must be 82 bytes");
#pragma pack(pop)