Atomic (RW Section)

From GTAMods Wiki
Revision as of 14:04, 24 May 2016 by Aschratt (talk | contribs)
Jump to navigation Jump to search
{{{NAME}}}
RenderWare Stream Section
Vendor {{{VENDORNAME}}}
Module {{{MODULENAME}}}
Module ID 0x{{{MODULEID}}}
Identifier 0x{{{IDENTIFIER}}}
Chunk ID 0x{{{MODULEID}}}{{{IDENTIFIER}}}
Versions All
Hierarchy
Parents:
None
Children:
None
Extensions:
None
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; // zero-based index
    unsigned int geometryIndex; // zero-based index
    unsigned int flags;
    unsigned int unused; // sets to 0 by default
};

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.

Child Sections

Extension

  • Right To Render - optional. Used for Skin Rights or/and Normal Map Rights.
  • Pipeline Set - optional. Used to set up atomic's custom rendering pipeline.
  • Material Effects PLG - optional. Determines if atomic uses MatFx effects and thus must be rendered via MatFx rendering pipeline.