Difference between revisions of "Bin Mesh PLG (RW Section)"

From GTAMods Wiki
Jump to navigation Jump to search
(reworked the page)
 
Line 1: Line 1:
{{RW Section|Bin Mesh PLG|0x50E}}
+
{{RW Section
The '''Bin Mesh''' plugin holds an optimized representation of the model topology.
+
| NAME = Bin Mesh PLG
Triangles are grouped together into Meshes by their [[Material (RW Section)|Material]]
+
| VENDORNAME = Criterion Games
and stored as triangle strips when the rpGEOMETRYTRISTRIP flag (0x1) is set in the [[Geometry (RW Section)|Geometry]], otherwise as triangle lists.
+
| MODULENAME = World
 +
| MODULEID = 000005
 +
| IDENTIFIER = 0E
 +
| PARENTS = [[Geometry (RW Section)|Geometry]] ''([[Extension (RW Section)|Extension]])''
 +
}}
  
In [[Native Data PLG (RW Section)|pre-instanced]] files, the chunk looks different according to platform.
+
The '''Bin Mesh''' plugin holds an optimized representation of the model topology. Triangles are grouped together into Meshes by their [[Material (RW Section)|Material]] and stored as triangle strips when the rpGEOMETRYTRISTRIP flag (0x1) is set in the [[Geometry (RW Section)|Geometry]], otherwise as triangle lists. In [[Native Data PLG (RW Section)|pre-instanced]] files, the chunk looks different according to platform.
  
 
== Structure ==
 
== Structure ==
Line 28: Line 32:
  
 
== See also ==
 
== See also ==
* [[RenderWare|RenderWare]]
+
 
* [[Geometry (RW Section)|Geometry]]
 
 
* [[Native Data PLG (RW Section)|Native Data]]
 
* [[Native Data PLG (RW Section)|Native Data]]
  
{{N|SA|VC}}
+
{{N|SA|VC|3}}
[[Category:GTA_3]]
 

Latest revision as of 12:35, 11 September 2020

Bin Mesh PLG
RenderWare Stream Section
Vendor Criterion Games
Module World
Module ID 0x000005
Identifier 0x0E
Chunk ID 0x0000050E
Versions All
Hierarchy
Parents:
Geometry (Extension)
Children:
None
Extensions:
None
File Format

The Bin Mesh plugin holds an optimized representation of the model topology. Triangles are grouped together into Meshes by their Material and stored as triangle strips when the rpGEOMETRYTRISTRIP flag (0x1) is set in the Geometry, otherwise as triangle lists. In pre-instanced files, the chunk looks different according to platform.

Structure

uint32       flags (0 = tri list, 1 = tri strip)
uint32       number of Meshes (numMeshes)
uint32       total number of indices

#repeat for numMeshes
    uint32   number of indices (numIndices)
    uint32   material index (into the Geometry's material list)
    #if pre-instanced
         #if platform == OpenGL
             uint16   indices[numIndices]
         #endif
    #else
         uint32       indices[numIndices]
    #endif
#endrepeat

To decide if the file is an OpenGL file when reading, check the platform of the Native Data chunk. When no vertex indices are stored here, the pre-instanced geometry uses no indices or they are stored in the Native Data.

See also