Difference between revisions of "RpClump"

From GTAMods Wiki
Jump to navigation Jump to search
m
m
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{RW Section|Clump|0x0010}}
+
{{RW Section
 +
| NAME = Clump
 +
| VENDORNAME = Criterion Games
 +
| MODULENAME = Core
 +
| MODULEID = 000000
 +
| IDENTIFIER = 10
 +
| PARENTS = [[Material List (RW Section)|Material List]]
 +
| CHILDREN = [[Struct (RW Section)|Struct]], [[Frame List (RW Section)|Frame List]], [[Geometry List (RW Section)|Geometry List]], [[Atomic (RW Section)|Atomic]], [[Light (RW Section)|Light]], [[Camera (RW Section)|Camera]]
 +
| EXTENSIONS = [[Collision Model (RW Section)|Collision Model]]
 +
}}
 +
 
 +
A '''Clump''' is a container for a [[Frame List (RW Section)|Frame hierarchy]] to which [[Atomic (RW Section)|Atomics]], [[Light (RW Section)|Lights]] and [[Camera (RW Section)|Cameras]] are attached.
 +
 
 +
== Structure ==
  
A '''Clump''' is a container for Frames, [[Atomic (RW Section)|Atomics]], [[Light (RW Section)|Light]] and [[Camera (RW Section)|Cameras]].
 
 
In a binary stream a Clump's child chunks are a [[Struct (RW Section)|Struct]] (described below), a [[Frame List (RW Section)|Frame List]], a [[Geometry List (RW Section)|Geometry List]], a number of [[Atomic (RW Section)|Atomics]], optionally a number of Structs and [[Light (RW Section)|Lights]] and a number of Structs and [[Camera (RW Section)|Cameras]] (Cameras are unused in GTA).
 
In a binary stream a Clump's child chunks are a [[Struct (RW Section)|Struct]] (described below), a [[Frame List (RW Section)|Frame List]], a [[Geometry List (RW Section)|Geometry List]], a number of [[Atomic (RW Section)|Atomics]], optionally a number of Structs and [[Light (RW Section)|Lights]] and a number of Structs and [[Camera (RW Section)|Cameras]] (Cameras are unused in GTA).
Mulitple Clumps may appear inside one <code>.dff</code> file. There is no counting variable stored inside the file defining how many Clumps are stored inside it.
+
Actually a <code>.dff</code> file contains exactly one Clump by definition but R* stores more than one in some cases (III peds and SA player models).
  
 
Cameras and Lights as part of Clumps were first introduced after version <code>0x33000</code>. Versions <code>0x33000</code> and below do not have them.
 
Cameras and Lights as part of Clumps were first introduced after version <code>0x33000</code>. Versions <code>0x33000</code> and below do not have them.
  
 
== Stream Format ==
 
  
 
The Clump's Struct has the following format:
 
The Clump's Struct has the following format:
Line 22: Line 32:
 
Before version 0x30400 (<code>loplyguy.dff</code> in GTA III, version <code>0x30200</code>) the structure is a little different. The Clump has no Geometry List and the Geometries are children of their respective Atomic chunks (and consequently the Atomic Struct is 4 bytes shorter for having no geometry index).
 
Before version 0x30400 (<code>loplyguy.dff</code> in GTA III, version <code>0x30200</code>) the structure is a little different. The Clump has no Geometry List and the Geometries are children of their respective Atomic chunks (and consequently the Atomic Struct is 4 bytes shorter for having no geometry index).
  
== Child chunks ==
+
{{N|SA|VC|3}}
 
 
* [[Frame List (RW Section)|Frame List]]
 
* [[Geometry List (RW Section)|Geometry List]]
 
* [[Atomic (RW Section)|Atomic]]
 
* [[Light (RW Section)|Light]]
 
* [[Camera (RW Section)|Camera]]
 
 
 
== Extension ==
 
* [[Collision Model (RW Section)|Collision Model]]
 
 
 
== See also ==
 
* [[RenderWare|RenderWare]]
 
* [[RenderWare_binary_stream_file|RW file format specification]]
 
* [[Texture Dictionary (RW Section)]]
 
 
 
{{N|SA|VC}}
 
[[Category:GTA_3]]
 

Latest revision as of 10:58, 14 September 2020

Clump
RenderWare Stream Section
Vendor Criterion Games
Module Core
Module ID 0x000000
Identifier 0x10
Chunk ID 0x00000010
Versions All
Hierarchy
Parents:
Material List
Children:
Struct, Frame List, Geometry List, Atomic, Light, Camera
Extensions:
Collision Model
File Format

A Clump is a container for a Frame hierarchy to which Atomics, Lights and Cameras are attached.

Structure

In a binary stream a Clump's child chunks are a Struct (described below), a Frame List, a Geometry List, a number of Atomics, optionally a number of Structs and Lights and a number of Structs and Cameras (Cameras are unused in GTA). Actually a .dff file contains exactly one Clump by definition but R* stores more than one in some cases (III peds and SA player models).

Cameras and Lights as part of Clumps were first introduced after version 0x33000. Versions 0x33000 and below do not have them.


The Clump's Struct has the following format:

int32 - Number of Atomics
int32 - Number of Lights - only present after version 0x33000
int32 - Number of Cameras - only present after version 0x33000 but 0 in all GTA files

Following the struct are a Frame List and a Geometry List. After that a number of Atomics as given by the atomic count. If the Clump has lights or cameras, next come pairs of Structs and Lights and Structs and Cameras respectively. In both cases the Struct contains a 4 byte index into the Frame List for the Frame the Light or Camera should be attached to.

Before version 0x30400 (loplyguy.dff in GTA III, version 0x30200) the structure is a little different. The Clump has no Geometry List and the Geometries are children of their respective Atomic chunks (and consequently the Atomic Struct is 4 bytes shorter for having no geometry index).