Expand description
Material system for RigidModel files.
§Overview
Materials define how meshes are rendered in Total War games. Each material type has specific properties that control textures, shaders, vertex formats, and rendering behavior. The material system supports 40+ different material types for various rendering scenarios.
§Material Types
Materials are categorized by their rendering purpose:
§Standard Rendering
- DefaultMaterial (68): Full-featured material for most meshes
- Decal (71): Applied decals on surfaces
- Tree (74), TreeLeaf (75): Vegetation rendering
- Grass (69): Grass
- Water (83): Water surfaces
- Unlit (84): No lighting calculations
§Skeletal Animation (Weighted)
- WeightedSkin (70): Character skin with bone weights
- WeightedCloth (58), Cloth (60): Cloth simulation
- Weighted (65): Generic weighted material
§Terrain
- RsTerrain (66): Minimal terrain material
- CustomTerrain (49), GlobalTerrain (98): Terrain variants
- WeightedTextureBlend (96), TerrainBlend (86): Texture blending
- TiledDirtmap (63): Tiled dirt textures
§Special Effects
- Collision (61), CollisionShape (62): Collision meshes (invisible)
- DebugGeometry (46): Debug visualization
- PointLight (38), StaticPointLight (45): Light sources
- Rope (93): Rope rendering
§Projected Decals
- ProjectedDecal (67), ProjectedDecalV2 (87), ProjectedDecalV3 (95), ProjectedDecalV4 (97)
§Material Data Structure
Materials contain:
- Vertex format: Determines vertex data layout
- Textures: Diffuse, normal, specular, masks, etc.
- Transformation matrices: 3x4 matrices for positioning/attachment
- Attachment points: Named locations for effects/weapons
- Shader parameters: Strings, floats, integers, vectors
- Cloth-specific data: Physics simulation parameters (cloth materials only)
§Texture Types
Materials reference textures by type:
- Diffuse (0): Base color texture
- Normal (1): Normal mapping for surface detail
- Specular (11), GlossMap (12): Reflectivity
- Mask (3): Alpha/transparency mask
- AmbientOcclusion (5): Baked ambient lighting
- Decal variants: Special decal textures
§Implementation Details
Different material types have different data structures:
- Default materials: Full data (textures, params, attachment points)
- RsTerrain: Minimal (name + 5 unknown u32 fields)
- WeightedTextureBlend: Name + 6 unknown u32 fields
- AlphaBlend: Name only
- Cloth: Default data + cloth simulation sections (uk_7, uk_8, uk_9)
See individual material variant modules for format-specific details.
Structs§
- Attachment
Point Entry - Named attachment point for visual effects, weapons, or equipment.
- Material
- Complete material definition with textures, transforms, and shader parameters.
- Texture
- Texture reference with type and file path.
- Uk7
- Cloth physics data structure 1 (format undocumented).
- Uk8
- Cloth physics data structure 2 (format undocumented).
- Uk9
- Cloth physics data structure 3 (format undocumented).
Enums§
- Material
Type - Material type identifier determining rendering behavior and data structure.
- Texture
Type - Texture type identifier for shader texture slots.