Difference between revisions of "Atomic (RW Section)"
m |
|||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | {{RW Section|Atomic| | + | {{RW Section |
+ | | NAME = Atomic | ||
+ | | VENDORNAME = Criterion Games | ||
+ | | MODULENAME = Core | ||
+ | | MODULEID = 000000 | ||
+ | | IDENTIFIER = 14 | ||
+ | | PARENTS = [[Clump (RW Section)|Clump]] | ||
+ | | CHILDREN = [[Struct (RW Section)|Struct]], [[Geometry (RW Section)|Geometry]] ''([[Atomic (RW Section)#Nested Geometry|optional]])'' | ||
+ | | EXTENSIONS = [[Right To Render (RW Section)|Right To Render]], [[Particles PLG (RW Section)|Particles PLG]], [[Pipeline Set (RW Section)|Pipeline Set]], [[User Data PLG (RW Section)|User Data PLG]], [[Material Effects PLG (RW Section)|Material Effects PLG]] | ||
+ | }} | ||
− | '''Atomic''' is a container section used in [[model file|DFF files]] as child of a [[Clump (RW Section)|Clump]] section. It is normally accompanied by a [[Struct (RW Section)#Atomic|Struct]] section. An atomic section can associate a [[Frame (RW Section)|Frame]] with a [[Geometry (RW Section)|Geometry]]. | + | '''Atomic''' is a container section used in [[model file|DFF files]] as child of a [[Clump (RW Section)|Clump]] section. It is normally accompanied by a [[Struct (RW Section)#Atomic|Struct]] section. An atomic section can associate a [[Frame List (RW Section)|Frame]] with a [[Geometry (RW Section)|Geometry]]. |
Atomics are - generally speaking - converted to draw-calls directly. They therefor resemble parts of the geometry (sub-geometries) that should be rendered "as one", utilizing a certain rendering pipeline. They are transformed from object-space directly or indirectly based on the transformation rules that are set for the Frame. | Atomics are - generally speaking - converted to draw-calls directly. They therefor resemble parts of the geometry (sub-geometries) that should be rendered "as one", utilizing a certain rendering pipeline. They are transformed from object-space directly or indirectly based on the transformation rules that are set for the Frame. | ||
+ | ==Structure== | ||
− | |||
An atomic section contains Struct, Geometry (optional) and Extension sections. | An atomic section contains Struct, Geometry (optional) and Extension sections. | ||
A Struct section has 16 bytes in size (may be different in some RW versions). | A Struct section has 16 bytes in size (may be different in some RW versions). | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | '' | + | <source lang="c"> |
+ | struct rwAtomicStruct { | ||
+ | unsigned int frameIndex; // Index of the frame within the clump's frame list. | ||
+ | unsigned int geometryIndex; // Index of geometry within the clump's geometry list. | ||
+ | unsigned int flags; // See below. | ||
+ | unsigned int unused; // Typically 0. | ||
+ | }; | ||
+ | </source> | ||
+ | |||
+ | ====Flags==== | ||
There are only 2 options available: | There are only 2 options available: | ||
+ | |||
0x01 rpATOMICCOLLISIONTEST - A generic collision flag to indicate that the atomic should be considered in collision tests. | 0x01 rpATOMICCOLLISIONTEST - A generic collision flag to indicate that the atomic should be considered in collision tests. | ||
It wasn't used in GTA games since they don't use RW collision system. | It wasn't used in GTA games since they don't use RW collision system. | ||
0x04 rpATOMICRENDER - The atomic is rendered if it is in the view frustum. It's set to TRUE for all models by default. | 0x04 rpATOMICRENDER - The atomic is rendered if it is in the view frustum. It's set to TRUE for all models by default. | ||
− | == | + | ==Nested Geometry== |
− | + | ||
+ | An atomic may contain a [[Geometry (RW Section)|geometry]] as a child section. It may exist only if [[Clump (RW Section)|Clump]]'s [[Geometry List (RW Section)|Geometry List]] is empty. | ||
− | + | {{N|SA|VC|3}} | |
− | |||
− | |||
− | |||
− |
Latest revision as of 11:56, 11 September 2020
Atomic | |
---|---|
RenderWare Stream Section | |
Vendor | Criterion Games |
Module | Core |
Module ID | 0x000000
|
Identifier | 0x14
|
Chunk ID | 0x00000014
|
Versions | All |
Hierarchy | |
Parents: Clump | |
Children: Struct, Geometry (optional) | |
Extensions: Right To Render, Particles PLG, Pipeline Set, User Data PLG, Material Effects PLG | |
File Format |
Atomic is a container section used in DFF files as child of a Clump section. It is normally accompanied by a Struct section. An atomic section can associate a Frame with a Geometry.
Atomics are - generally speaking - converted to draw-calls directly. They therefor resemble parts of the geometry (sub-geometries) that should be rendered "as one", utilizing a certain rendering pipeline. They are transformed from object-space directly or indirectly based on the transformation rules that are set for the Frame.
Structure
An atomic section contains Struct, Geometry (optional) and Extension sections. A Struct section has 16 bytes in size (may be different in some RW versions).
struct rwAtomicStruct {
unsigned int frameIndex; // Index of the frame within the clump's frame list.
unsigned int geometryIndex; // Index of geometry within the clump's geometry list.
unsigned int flags; // See below.
unsigned int unused; // Typically 0.
};
Flags
There are only 2 options available:
0x01 rpATOMICCOLLISIONTEST - A generic collision flag to indicate that the atomic should be considered in collision tests. It wasn't used in GTA games since they don't use RW collision system. 0x04 rpATOMICRENDER - The atomic is rendered if it is in the view frustum. It's set to TRUE for all models by default.
Nested Geometry
An atomic may contain a geometry as a child section. It may exist only if Clump's Geometry List is empty.