OBD:OBOA: Difference between revisions

m
...
m (typo)
m (...)
 
(2 intermediate revisions by one other user not shown)
Line 9: Line 9:
{{OBDtr| 0x00 | res_id  |FF0000| 01 55 02 00 | 597      | 00597-.OBOA }}
{{OBDtr| 0x00 | res_id  |FF0000| 01 55 02 00 | 597      | 00597-.OBOA }}
{{OBDtr| 0x04 | lev_id  |FFFF00| 01 00 00 06 | 3        | level 3 }}
{{OBDtr| 0x04 | lev_id  |FFFF00| 01 00 00 06 | 3        | level 3 }}
{{OBDtr| 0x08 | char[22] |00FF00| AD DE      | dead      | unused }}
{{OBDtr| 0x08 | char[22] |00FF00| AD DE      | dead      | padding }}
{{OBDtr| 0x1E | int16   |00FFFF| 62 00      | 98        | array size }}
{{OBDtr| 0x1E | uint16   |00FFFF| 62 00      | 98        | array size }}
{{OBDtrBK| First array element (black outline): "setup" for a door or physical/animated object}}
{{OBDtrBK| First array element (black outline): "setup" for a door or physical/animated object}}
{{OBDtr| 0x00 | int32   |FFC8C8| 01 56 02 00 | 598      | link to [[OBD:M3GA|00598-.M3GA]] - geometry (or a glued-together set of geometries) displayed for this object }}
{{OBDtr| 0x00 | link   |FFC8C8| 01 56 02 00 | 598      | link to [[OBD:M3GA|00598-.M3GA]] - geometry (or a glued-together set of geometries) displayed for this object }}
{{OBDtr| 0x04 | link    |FFFFC8| 00 00 00 00 | unused    | link to [[OBD:OBAN|OBAN]] - animation played when the object is created; a different animation can be selected with env_setanim }}
{{OBDtr| 0x04 | link    |FFFFC8| 00 00 00 00 | unused    | link to [[OBD:OBAN|OBAN]] - animation played when the object is created; a different animation can be selected with env_setanim }}
{{OBDtr| 0x08 | link    |C8FFC8| 00 00 00 00 | unused    | link to [[OBD:ENVP|ENVP]] - particles attached to this object (e.g., vehicle headlights)}}
{{OBDtr| 0x08 | link    |C8FFC8| 00 00 00 00 | unused    | link to [[OBD:ENVP|ENVP]] - particles attached to this object (e.g., vehicle headlights)}}
{{OBDtr| 0x0C | bitset32 |C8FFFF| 00 12 00 00 | in use, face collision | flags; the bits are as follows:
{{OBDtr| 0x0C | bitset32 |C8FFFF| 00 12 00 00 | in use, face collision | flags; the bits are as follows:
:'''0x01''' 00 00 00 - never used in Vanilla data (unassigned; never used at all?)
:'''0x02''' 00 00 00 - never used in Vanilla data ("is door"; set at runtime when creating a level's doors)
:'''0x02''' 00 00 00 - never used in Vanilla data ("is door"; set at runtime when creating a level's doors)
:'''0x04''' 00 00 00 - never used in Vanilla data ("ignore characters"; never used by the engine)
:'''0x04''' 00 00 00 - never used in Vanilla data ("ignore characters"; never used by the engine)
:'''0x08''' 00 00 00 - never used in Vanilla data ("force draw"; can be set at runtime with obj_force_draw)
:'''0x08''' 00 00 00 - never used in Vanilla data ("force draw"; can be set at runtime with obj_force_draw)
:'''0x10''' 00 00 00 - never used in Vanilla data ("light source"; never used by the engine)
:'''0x10''' 00 00 00 - never used in Vanilla data ("light source"; never used by the engine)
:'''0x20''' 00 00 00 - never used in Vanilla data (unassigned; never used at all?)
:'''0x40''' 00 00 00 - never used in Vanilla data ("delete me"; never used by the engine)
:'''0x40''' 00 00 00 - never used in Vanilla data ("delete me"; never used by the engine)
:'''0x80''' 00 00 00 - never used in Vanilla data ("notify collision"; set at runtime for a level's doors)
:'''0x80''' 00 00 00 - never used in Vanilla data ("notify collision"; set at runtime for a level's doors)
:0x00 '''01''' 00 00 - never used in Vanilla data ("invisible"; set at runtime with obj_show and obj_hide)
:0x00 '''01''' 00 00 - never used in Vanilla data ("invisible"; set at runtime with obj_show and obj_hide)
:0x00 '''02''' 00 00 - in use; if disabled, there is no object setup in this element at all (see "Empty array elements" below)
:0x00 '''02''' 00 00 - in use; if disabled, there is no object setup in this element at all (see "Empty array elements" below)
:0x00 '''04''' 00 00 - no collision; used for "blender" machine parts in manplant and for a piece of rope in Airport_III; possibly useless
:0x00 '''04''' 00 00 - no collision; used for "blender" machine parts in manplant and for a piece of rope in Airport_III
:0x00 '''08''' 00 00 - never used in Vanilla data ("no gravity"; disables gravity, keeps other forces, if any)
:0x00 '''08''' 00 00 - never used in Vanilla data ("no gravity"; disables gravity, keeps other forces, if any)
:0x00 '''10''' 00 00 - face collision (actually uses a bounding box); overrides 0x0400 if both are present; used only for doors in Vanilla
:0x00 '''10''' 00 00 - face collision (actually uses a bounding box); overrides 0x0400 if both are present; used only for doors in Vanilla
:0x00 '''20''' 00 00 - never used in Vanilla data ("particles created"; runtime only)
:0x00 '''20''' 00 00 - never used in Vanilla data ("particles created"; runtime only)
:0x00 '''40''' 00 00 - never used in Vanilla data ("jello objects"; runtime only?)
:0x00 '''40''' 00 00 - never used in Vanilla data ("jello objects"; runtime only)
:0x00 '''80''' 00 00 - never used in Vanilla data ("flat lighting"; used in combination with obj_shade)
:0x00 '''80''' 00 00 - never used in Vanilla data ("flat lighting"; used in combination with obj_shade)
}}
}}
{{OBDtr| 0x10 | int32   |FFC8FF| 46 89 00 00 | 35142    | the index of the doorframe GQ; used only for doors (0 for other objects)}}
{{OBDtr| 0x10 | uint32   |FFC8FF| 46 89 00 00 | 35142    | the index of the doorframe GQ; used only for doors (0 for other objects)}}
{{OBDtr| 0x14 | int32   |FFC800| 01 00 00 00 | 1        | door ID; used only for doors (0 for other objects); for doors that work in pairs the IDs differ by 4096 (i.e. by the 0x1000 bit)}}
{{OBDtr| 0x14 | uint32   |FFC800| 01 00 00 00 | 1        | door ID; used only for doors (0 for other objects); for doors that work in pairs the IDs differ by 4096 (i.e. by the 0x1000 bit)}}
{{OBDtr| 0x18 | int32   |C800C8| 00 00 00 00 | 0        | "physics level"; the following values are possible:
{{OBDtr| 0x18 | uint32   |C800C8| 00 00 00 00 | 0        | "physics level"; the following values are possible:
:0 - None; used for doors
:0 - None; used for doors
:1 - Static; never used in Vanilla data
:1 - Static; never used in Vanilla data
:2 - Linear (same as "Newton"); response to external forces and collision (if any); never used in Vanilla data
:2 - Linear; response to external forces and collision (if any); never used in Vanilla data
:3 - Animated; used for non-doors
:3 - Animated; used for non-doors
:4 - "Newton" (same as Linear); response to external forces and collision (if any); never used in Vanilla data
:4 - "Newton"; response to external forces and collision (if any); never used in Vanilla data
}}
}}
{{OBDtr| 0x1C | int32   |C87C64| FF FF 00 00 | 65535    | script ID (for obj_create, env_setanim etc); doors use 65535 }}
{{OBDtr| 0x1C | uint32   |C87C64| FF FF 00 00 | 65535    | script ID (for obj_create, env_setanim etc); doors use 65535 }}
{{OBDtr| 0x20 | vector  |B0C3D4| 00 00 4F 43 1F 05 F6 42 98 7F CC C3 |207.0 123.010002 -408.996826 | object position }}
{{OBDtr| 0x20 | vector  |B0C3D4| 00 00 4F 43 1F 05 F6 42 98 7F CC C3 |207.0 123.010002 -408.996826 | object position }}
{{OBDtr| 0x2C | quaternion|E7CEA5| F2 04 35 3F 74 BC 82 B9 74 BC 82 B9 F3 04 35 3F | 0.707107 -0.000249 -0.000249 0.707107 | object rotation }}
{{OBDtr| 0x2C | quaternion|E7CEA5| F2 04 35 3F 74 BC 82 B9 74 BC 82 B9 F3 04 35 3F | 0.707107 -0.000249 -0.000249 0.707107 | object rotation }}
Line 70: Line 68:
|207.0 || 123.010002 || -408.996826
|207.0 || 123.010002 || -408.996826
|}
|}
|ALIGN=LEFT|origin matrix
|ALIGN=LEFT|debug origin matrix
{{OBDtr2|0x70 | char[64] |EBEBEB| object_door_1          | name of the object; informational only }}
{{OBDtr2|0x70 | char[64] |EBEBEB| object_door_1          | name of the object; informational only }}
{{OBDtr2|0xB0 | char[64] |8C8CCC| L3_Gunk.ENV            | file name from which this object was created; informational only }}
{{OBDtr2|0xB0 | char[64] |8C8CCC| L3_Gunk.ENV            | file name from which this object was created; informational only }}
Line 141: Line 139:
|68
|68
|}
|}
For a new level built from XML by OniSplit, there are also 32 empty elements at the end of the array. They purpose of these extra elements is not currently documented.
For a new level built from XML by OniSplit, there are also 32 empty elements at the end of the array. The purpose of these extra elements is not currently documented.




Line 152: Line 150:
----
----
;Script IDs of grouped objects
;Script IDs of grouped objects
:Objects animated synchronously (e.g. a vehicle and its wheels) are typically set up with a continuous range of script IDs: all related script commands, from '''obj_create''' to '''obj_shade''' to '''env_anim''' operate not on single objects but on ''ranges'' of objects (e.g., '''obj_create 10 12''' creates objects 10 through 12).
:Objects animated synchronously (e.g. a vehicle and its wheels) are typically set up with a continuous range of script IDs: all related script commands, from '''obj_create''' to '''obj_shade''' to '''env_anim''', can operate both on single objects and on ''ranges'' of objects (e.g., '''obj_create 10 12''' creates objects 10 through 12).
:Contiguous objects can move as a rigid "whole", or there can be some relative motion within the group (e.g., wheels turning, doors opening, rotors tilting). This is because each object belongs to a separate OBOA element and thus has its own animation, assigned at creation or via script ID.
:Contiguous objects can move as a rigid "whole", or there can be some relative motion within the group (e.g., wheels turning, doors opening, rotors tilting). This is because each object belongs to a separate OBOA element and thus has its own animation, assigned at creation or via script ID.
:The hierarchy of contiguous objects in the original scene (as modeled by the developers) is typically not known. It makes sense for wheels/doors to be "parented" to a vehicle's chassis, but at Oni level there is no parenting, i.e., both the chassis and the wheels are animated in world space.
:The hierarchy of contiguous objects in the original scene (as modeled by the developers) is typically not known. It would make sense for wheels/doors to be "parented" to a vehicle's chassis, but at Oni level there is no parenting, i.e., both the chassis and the wheels/doors are animated in world space.
:The order of script IDs for contiguous groups of objects is not a reliable indicator of hierarchy. Thus, recurrent object sets (e.g., armored truck, motorcycle, Syndicate van) are not ordered consistently in all the levels where they appear:
:The order of script IDs for contiguous groups of objects is not a reliable indicator of hierarchy. Thus, recurrent object sets (e.g., armored truck, motorcycle, Syndicate van) are not ordered consistently in all the levels where they appear:
:*Armored truck (level1, gunk IDs): cabin 201, trailer 202, wheel pairs 203 to 207 (front to back); no gunk IDs for doors (so they can't be hidden).
:*Armored truck (level1, gunk IDs): cabin 201, trailer 202, wheel pairs 203 to 207 (front to back); no gunk IDs for doors (so they can't be hidden).
279

edits