Difference between revisions of "RpMaterial"
								
								Jump to navigation
				Jump to search
				
				
		
					
								
							
		| m (The hero moved page Material (RW Section) to RpMaterial: Restructuring RW pages to be less stream-oriented) |  (→Extension) | ||
| Line 27: | Line 27: | ||
| * [[Right To Render (RW Section)|Right To Render]] | * [[Right To Render (RW Section)|Right To Render]] | ||
| + | * [[User Data PLG (RW Section)|User Data PLG]] | ||
| * [[Material Effects PLG (RW Section)|Material Effects PLG]] | * [[Material Effects PLG (RW Section)|Material Effects PLG]] | ||
| * [[UV Animation PLG (RW Section)|UV Animation PLG]] | * [[UV Animation PLG (RW Section)|UV Animation PLG]] | ||
Revision as of 12:17, 15 May 2020
| {{{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 | |
RpMaterial is a RenderWare structure that stores geometric data for 3D geometry.
Stream 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.
Extension
The extension of an material can hold the following chunks in GTA:
- Right To Render
- User Data PLG
- Material Effects PLG
- UV Animation PLG
- Reflection Material
- Specular Material



