Difference between revisions of "Frame List (RW Section)"

From GTAMods Wiki
Jump to navigation Jump to search
(Better readability and comprehensibility)
 
Line 10: Line 10:
 
}}
 
}}
  
'''Frame List''' is a container section used in [[model file|DFF files]] as child of a [[Clump (RW Section)|clump section]]. Just like the ''clump'' section it does only store child sections and no data. All additional informations are hold by a [[Struct (RW Section)|struct section]].
+
'''Frame List''' is a RenderWare stream container section used in [[model file|'''DFF''' files]] as a child section of the [[Clump (RW Section)|'''Clump''']] section.
  
== Structure ==
+
The '''Frame List''' section only stores child sections and no data.
  
All required information stored inside a ''struct'' section which represents the first child section of the list.
+
== Hierarchy ==
  
4b  - DWORD    - Number of frames
+
* [[Clump (RW Section)|Clump]]
 +
** '''Frame List'''
 +
*** [[Struct (RW Section)|Struct]]
 +
*** [[Extension (RW Section)|Extension]]
 +
**** [[HAnim PLG (RW Section)|HAnim PLG]]
 +
**** [[Node Name (RW Section)|Node Name]]
  
The structure is followed up by an array of frame information data for each frame. It uses the following format:
 
  
36b - TMatrix  - Rotation matrix
+
== Struct ==
12b - TVector  - Position
 
4b  - DWORD    - Current frame index (or previous sibling?)
 
4b  - DWORD    - Matrix creation flags (''see [[Talk:Frame_List_(RW_Section)#Flags_under_Frame_Data|discussion page]]'')
 
  
'''TMatrix''' and '''TVector''' are abstract data types with the following format for TVector:
+
The '''Frame List''' data is stored in a [[Struct (RW Section)|'''Struct''']] child section.
  
4b  - FLOAT    - Coordinate X
+
The '''Struct''' section is defined as:
4b  - FLOAT    - Coordinate Y
+
{| class="wikitable"
4b  - FLOAT    - Coordinate Z
+
|-
 +
! Size (Bytes)
 +
! Type
 +
! Variable Name
 +
! Description
 +
|-
 +
| <code>0x04 (4)</code>
 +
| <code>int32_t
 +
| <code>frame_count</code>
 +
| '''Frame''' count
 +
|-
 +
| <code>frame_count * 0x44</code>
 +
| <code>Frame[frame_count]</code>
 +
| <code>frame_data</code>
 +
| Array of '''Frame''' data
 +
|}
  
And '''TMatrix''' represents a collection of 3 '''TVector's''':
+
The '''Struct''' section continues with an array of '''Frame''' data, holding as many as defined by the '''Frame''' count.
  
  12b - TVector  - Vector 1
+
The '''Frame''' data is defined as:
12b - TVector  - Vector 2
+
{| class="wikitable"
12b - TVector  - Vector 3
+
|-
 +
! Size (Bytes)
 +
! Type
 +
! Variable Name
 +
! Description
 +
|-
 +
| <code>0x24 (36)</code>
 +
| <code>TMatrix3x3F</code>
 +
| <code>rotation_matrix</code>
 +
| Rotation matrix
 +
|-
 +
| <code>0x0C (12)</code>
 +
| <code>TVector3F</code>
 +
| <code>position</code>
 +
| Position
 +
|-
 +
| <code>0x04 (4)</code>
 +
| <code>int32_t</code>
 +
| <code>parent_index</code>
 +
| Parent Index
 +
|-
 +
| <code>0x04 (4)</code>
 +
| <code>int32_t
 +
| <code>matrix_flags</code>
 +
| Matrix creation flags / (''see [[Talk:Frame_List_(RW_Section)#Flags_under_Frame_Data|discussion page]]'')
 +
|}
 +
 
 +
'''TMatrix3x3F''' is defined as:
 +
{| class="wikitable"
 +
|-
 +
! Size (Bytes)
 +
! Type
 +
! Description
 +
|-
 +
| <code>0x0C (12)</code>
 +
| <code>TVector3F</code>
 +
| <code>right</code>
 +
| Right vector
 +
|-
 +
| <code>0x0C (12)</code>
 +
| <code>TVector3F</code>
 +
| <code>up</code>
 +
| Up vector
 +
|-
 +
| <code>0x0C (12)</code>
 +
| <code>TVector3F</code>
 +
| <code>at</code>
 +
| At vector
 +
|}
 +
 
 +
'''TVector3F''' is defined as:
 +
{| class="wikitable"
 +
|-
 +
! Size (Bytes)
 +
! Type
 +
! Description
 +
|-
 +
| <code>0x04 (4)</code>
 +
| <code>float</code>
 +
| <code>x</code>
 +
| X
 +
|-
 +
| <code>0x04 (4)</code>
 +
| <code>float</code>
 +
| <code>y</code>
 +
| Y
 +
|-
 +
| <code>0x04 (4)</code>
 +
| <code>float</code>
 +
| <code>z</code>
 +
| Z
 +
|}
  
 
== Extension ==
 
== Extension ==
  
A ''frame list'' can be extented by an [[Extension (RW Section)|extension section]]. For this section the extension can appear multiple times. The amount of extensions does not need to match the number of frames defined above, but it usually does since the extensions are holding the names of the single frames and their animations.
+
The '''Frame List''' section can be extended by an [[Extension (RW Section)|'''Extension''']] child section.
 +
 
 +
The '''Extension''' section can appear multiple times in a '''Frame List''' section, usually matches the '''Frame''' count defined above, but is not required to do so.
 +
 
 +
The '''Extension''' section usually holds the following child sections:
 +
* [[HAnim PLG (RW Section)|HAnim PLG]]
 +
* [[Node Name (RW Section)|Node Name]]
  
 
{{N|SA|VC|3}}
 
{{N|SA|VC|3}}
 +
 +
[[Category:RW Section]]

Latest revision as of 22:21, 29 July 2023

Frame List
RenderWare Stream Section
Vendor Criterion Games
Module Core
Module ID 0x000000
Identifier 0x0E
Chunk ID 0x0000000E
Versions All
Hierarchy
Parents:
Clump
Children:
Struct
Extensions:
Frame, HAnim PLG
File Format

Frame List is a RenderWare stream container section used in DFF files as a child section of the Clump section.

The Frame List section only stores child sections and no data.

Hierarchy


Struct

The Frame List data is stored in a Struct child section.

The Struct section is defined as:

Size (Bytes) Type Variable Name Description
0x04 (4) int32_t frame_count Frame count
frame_count * 0x44 Frame[frame_count] frame_data Array of Frame data

The Struct section continues with an array of Frame data, holding as many as defined by the Frame count.

The Frame data is defined as:

Size (Bytes) Type Variable Name Description
0x24 (36) TMatrix3x3F rotation_matrix Rotation matrix
0x0C (12) TVector3F position Position
0x04 (4) int32_t parent_index Parent Index
0x04 (4) int32_t matrix_flags Matrix creation flags / (see discussion page)

TMatrix3x3F is defined as:

Size (Bytes) Type Description
0x0C (12) TVector3F right Right vector
0x0C (12) TVector3F up Up vector
0x0C (12) TVector3F at At vector

TVector3F is defined as:

Size (Bytes) Type Description
0x04 (4) float x X
0x04 (4) float y Y
0x04 (4) float z Z

Extension

The Frame List section can be extended by an Extension child section.

The Extension section can appear multiple times in a Frame List section, usually matches the Frame count defined above, but is not required to do so.

The Extension section usually holds the following child sections: