Difference between revisions of "RenderWare binary stream file"

From GTAMods Wiki
Jump to navigation Jump to search
m (headlines)
(Model Files (DFF))
Line 47: Line 47:
 
===Model Files (DFF)===
 
===Model Files (DFF)===
  
''- coming soon -''
+
* [[Clump (RW Section)|Clump]]
 +
** [[Struct (RW Section)#Clump|Struct]]
 +
** [[Frame List (RW Section)|Frame List]]
 +
*** [[Struct (RW Section)#Frame_List|Struct]]
 +
*** [[Extension (RW Section)|Extension]] *
 +
**** [[Frame (RW Section)|Frame]]
 +
** [[Geometry List (RW Section)|Geometry List]]
 +
*** [[Struct (RW Section)#Geometry_List|Struct]]
 +
*** [[Geometry (RW Section)|Geometry]] *
 +
**** [[Struct (RW Section)#Geometry|Struct]]
 +
**** [[Material List (RW Section)|Material List]]
 +
***** [[Struct (RW Section)#Material_List|Struct]]
 +
***** [[Material (RW Section)|Material]] *
 +
****** [[Struct (RW Section)#Material|Struct]]
 +
****** [[Texture (RW Section)|Texture]] - optional
 +
******* [[Struct (RW Section)#Texture|Struct]]
 +
******* [[String (RW Section)|String]] - diffuse texture name
 +
******* [[String (RW Section)|String]] - alpha texture name
 +
******* [[Extension (RW Section)|Extension]] - empty
 +
****** [[Extension (RW Section)|Extension]]
 +
******* [[Specular Material (RW Section)|Specular Material]] - optional, vehicles only
 +
******* [[Reflection Material (RW Section)|Reflection Material]] - optional, vehicles only
 +
******* [[Material Effects PLG (RW Section)|Material Effects PLG]] - optional, vehicles only
 +
******* [[Texture (RW Section)|Texture]] - optional<br>''only occurs with the section above, possibly even a child section''
 +
******** [[Struct (RW Section)#Texture|Struct]]
 +
******** [[String (RW Section)|String]] - environment map name
 +
******** [[String (RW Section)|String]] - alpha texture name
 +
******** [[Extension (RW Section)|Extension]] - empty
 +
**** [[Extension (RW Section)|Extension]]
 +
***** [[Bin Mesh PLG (RW Section)|Bin Mesh PLG]]
 +
***** [[2dfx (RW Section)|2dfx]]
 +
***** [[Night Vertex Colors (RW Section)|Night Vertex Colors]] - static objects only
 +
***** [[Mesh Extension (RW Section)|Mesh Extension]]
 +
** [[Atomic (RW Section)|Atomic]] *
 +
*** [[Struct (RW Section)#Atomic|Struct]]
 +
*** [[Extension (RW Section)|Extension]]
 +
**** [[Right To Render (RW Section)|Right To Render]] - vehicles only
 +
**** [[Material Effects PLG (RW Section)|Material Effects PLG]] - vehicles only
 +
** [[Extension (RW Section)|Extension]]
 +
*** [[Collision Model (RW Section)|Collision Model]] - vehicles only
  
 
===Texture Archives (TXD)===
 
===Texture Archives (TXD)===

Revision as of 16:44, 5 November 2006

RenderWare binary stream files are hierarchically structured binary data files used by the RenderWare 3.x graphics engine utilized by Rockstar North for their GTA III trilogy (only on PC, PS2 and XBOX, not PSP!) and related games (Manhunt, Bully).

GTA's model files use the file extension .dff and texture archives use .txd. Other possible extensions, not used by the GTA games, are .rws, .bsp and .dma. GTA3 does use .anm for some of its cutscene animations, but it is the only GTA to do so.


File Format

RW streams are split up into sections. Each section has a 12 byte header and can either be empty, contain data or more child sections. Section content, especially of data sections, is determined by an ID in the header.

There is only one data structure common to all RW streams - the section header:

4 byte - DWORD - section identifier
4 byte - DWORD - section size, including child sections and/or data
4 byte - DWORD - RW version ID

The RW version ID varies depending on the RW engine version used for exporting the files. It must be the same for all headers within one file. Backwards compatibility is very limited.

Valid RW Section IDs

See the list of RW section IDs.

Rockstar's Custom Section IDs

Rockstar added several vendor specific RW plugins, which have their own ID range (0x0253F2F*).

Common RW Version IDs

The following is an (incomplete) list of plain text RW versions commonly used in GTA and their encoded equivalent:

3.0.0.3 - 0x0003FFFF
3.1.0.0 - 0x00000310
3.3.0.2 - 0x0C02FFFF
3.4.0.3 - 0x1003FFFF
3.6.0.3 - 0x1803FFFF (GTA SA)


Common File Structures

Model Files (DFF)

Texture Archives (TXD)

* These sections (and their child sections) can appear multiple times.

Tools & Scripts


See also