Atomic (RW Section)
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.