Difference between revisions of "RpMaterial"

From GTAMods Wiki
Jump to navigation Jump to search
m (Structure)
Line 17: Line 17:
 
== Child sections ==
 
== Child sections ==
  
The number of textures defined above represents the number of child sections.
+
If the material is defined as textured above there'll be a child texture section.
  
 
* [[Texture (RW Section)|Texture]]
 
* [[Texture (RW Section)|Texture]]

Revision as of 01:10, 9 June 2015

{{{NAME}}}
RenderWare Stream Section
Vendor {{{VENDORNAME}}}
Module {{{MODULENAME}}}
Module ID 0x{{{MODULEID}}}
Identifier 0x{{{IDENTIFIER}}}
Chunk ID 0x{{{MODULEID}}}{{{IDENTIFIER}}}
Versions All
Hierarchy
Parents:
None
Children:
None
Extensions:
None
File Format

Material is a container section used in DFF files as child of a Material List section. The section itself does not store any data at all. All additional information get stored inside a struct section which directly follows this one as a child. A material section is used to hold one or more texture maps.

Structure

The structure of the material section defines information about the amount and appearance of the texture maps.

4b - DWORD  - Material flags (unused)
4b - DWORD  - Color (RwRGBA)
4b - DWORD  - Unused field
4b - BOOL   - Is material textured
4b - FLOAT  - Ambient
4b - FLOAT  - Specular
4b - FLOAT  - Diffuse

Child sections

If the material is defined as textured above there'll be a child texture section.

Extension

Additionally each material can hold an extension. This extension holds the following sections in the order they are listed in here.

See also