RpMaterial

From GTAMods Wiki
Revision as of 10:57, 14 September 2020 by Aschratt (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Material
RenderWare Stream Section
Vendor Criterion Games
Module Core
Module ID 0x000000
Identifier 0x07
Chunk ID 0x00000007
Versions All
Hierarchy
Parents:
Material List
Children:
Struct, Texture
Extensions:
Right To Render, User Data PLG, Material Effects PLG, UV Animation PLG, Reflection Material, Specular Material
File Format

RpMaterial is a RenderWare structure that stores geometric data for 3D geometry.

Structure

When streamed in/out it is usually the child of a Material List chunk and parent of a Struct, optional Texture and Extension chunk.

The format of the Material's Struct chunk is as follows:

int32        flags (unused)
RwRGBA       color    (RwRGBA: uint8 r, g, b, a)
int32        unused
bool32       isTextured
#if version > 0x30400
  surface properties:
    float32  ambient
    float32  specular
    float32  diffuse
#endif

If the material is defined as textured above, a Texture chunk will follow the Struct.

See also