OBD:OBOA: Difference between revisions

2,881 bytes added ,  29 November 2021
script ID ordering
(woof)
(script ID ordering)
Line 149: Line 149:
:In Vanilla game data (not counting [[level0_Tools]]), the only OBOA objects to have several M3GMs in their M3GA are doors with glass sections (this is needed because (a) an M3GM can have only one texture, and (b) door frames are required to have a fully opaque texture, or they will have an "inside-out" look because of the front-to-back rendering order). The only exception is door 45 in level6 (Airport Cargo Hangars), which has no transparent parts, and instead just links to the same M3GM twice.
:In Vanilla game data (not counting [[level0_Tools]]), the only OBOA objects to have several M3GMs in their M3GA are doors with glass sections (this is needed because (a) an M3GM can have only one texture, and (b) door frames are required to have a fully opaque texture, or they will have an "inside-out" look because of the front-to-back rendering order). The only exception is door 45 in level6 (Airport Cargo Hangars), which has no transparent parts, and instead just links to the same M3GM twice.
:One would expect the M3GA feature to be used for large animated objects that consist of several meshes, e.g. the express elevator in Griffin's office (intro of level18) or the satellite dish in the final chapter - but no, these are set up as separate "objects", with one M3GM per M3GA, anymated synchronously.
:One would expect the M3GA feature to be used for large animated objects that consist of several meshes, e.g. the express elevator in Griffin's office (intro of level18) or the satellite dish in the final chapter - but no, these are set up as separate "objects", with one M3GM per M3GA, anymated synchronously.
----
;Script IDs of grouped objects
:Objects animated synchronously (e.g. a vehicle and its wheels) are typically set 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).
: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 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, OBOA IDs): cabin 207, trailer 206, wheel pairs 205, 203, 204, 201 and 202 (front to back); no animated door objects.
:*Armored truck (level19, gunk IDs before ramming): cabin 152, trailer 151, wheel pairs 157, 155, 156, 159 and 158 (front to back), doors 154 (left) and 153 (right).
:*Armored truck (level19, gunk IDs after ramming): cabin 252, trailer 251, wheel pairs 257, 255, 256, 259 and 258 (front to back), doors 254 (left) and 253 (right).
:*Armored truck (level19, OBOA IDs): cabin 52, trailer 51, wheel pairs 57, 55, 56, 59 and 58 (front to back), doors 54 (left) and 53 (right).
:*Motorcycle (level3, gunk IDs and OBOA IDs): bike 10, wheels 8 (front) and 9 (rear)
:*Motorcycle (level4, gunk IDs and OBOA IDs): bike 10, wheels 11 (front) and 12 (rear)
:*Motorcycle (level8, gunk IDs): bike 110, wheels 111 (front) and 112 (rear)
:*Motorcycle (level8, OBOA IDs): bike 10, wheels 11 (front) and 12 (rear)
:*BlackVan (level3 and level4, OBOA IDs): front/back 2, sides 3, top/bottom 4, wheel pairs 5 (front) and 6 (rear), doors 7
:*BlackVan (level8, gunk IDs): front/back 101, sides 103, top/bottom 104, wheel pairs 105 (front) and 106 (rear), doors 108 (left) and 107 (right)
:*BlackVan (level8, OBOA IDs): front/back 1, sides 3, top/bottom 4, wheel pairs 5 (front) and 6 (rear), doors 8 (left) and 7 (right)
:The bottom line is that there don't seem to be any rules for the order of script IDs in a group. Possibly the IDs were not auto-assigned during import and were specified more or less manually.


----
----