OBD:OBOA: Difference between revisions

From OniGalore
Jump to navigation Jump to search
No edit summary
No edit summary
Line 12: Line 12:
{{OBDtr| 0x1E | int16    |00FFFF| 62 00      | 98        | arrray size }}
{{OBDtr| 0x1E | int16    |00FFFF| 62 00      | 98        | arrray size }}
{{OBDtrBK}}
{{OBDtrBK}}
{{OBDtr| 0x00 | int32    |FFC8C8| 01 56 02 00 | 1        | link to [[OBD:M3GA|00598-.M3GA]] }}
{{OBDtr| 0x00 | int32    |FFC8C8| 01 56 02 00 | 1        | link to [[OBD:M3GA|00598-.M3GA]] - geometry displayed for this object }}
{{OBDtr| 0x04 | link    |FFFFC8| 00 00 00 00 | unused    | link to [[OBD:OBAN|OBAN]] }}
{{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]] }}
{{OBDtr| 0x08 | link    |C8FFC8| 00 00 00 00 | unused    | link to [[OBD:ENVP|ENVP]] - particles attached to this object, for example motorcycle headlight }}
{{OBDtr| 0x0C | bitset32 |C8FFFF| 00 12 00 00 | 0, 18, 0, 0 | flags; the following bits are used:
{{OBDtr| 0x0C | bitset32 |C8FFFF| 00 12 00 00 | 0, 18, 0, 0 | flags; the following bits are used:
:0x00 '''02''' 00 00 - element used
:0x00 '''02''' 00 00 - element used
:0x00 '''04''' 00 00 - no collision detection
:0x00 '''04''' 00 00 - no collision detection
:0x00 '''08''' 00 00 - no gravity
:0x00 '''08''' 00 00 - no gravity
:0x00 '''10''' 00 00 - object uses a bounding box for collision detection (overrides 0x0004)
:0x00 '''10''' 00 00 - face collision; object uses a bounding box for collision detection (overrides 0x0004)
}}
}}
{{OBDtr| 0x10 | int32    |FFC8FF| 46 89 00 00 | 35142    | unknown }}
{{OBDtr| 0x10 | int32    |FFC8FF| 46 89 00 00 | 35142    | the index of the door frame GQ for door objects? }}
{{OBDtr| 0x14 | int32    |FFC800| 01 00 00 00 | 1        | door ID; only used for doors; in the case of double doors both doors have the same id but one of the door identifiers has bit 12 set }}
{{OBDtr| 0x14 | int32    |FFC800| 01 00 00 00 | 1        | door ID; only used for doors; in the case of double doors both doors have the same id but one of the door identifiers has bit 12 set }}
{{OBDtr| 0x18 | int32    |C800C8| 00 00 00 00 | 0        | "physics type"; the following values are possible:
{{OBDtr| 0x18 | int32    |C800C8| 00 00 00 00 | 0        | "physics type"; the following values are possible:
Line 31: Line 31:
}}
}}
{{OBDtr| 0x1C | int32    |C87C64| FF FF 00 00 | 65535    | script ID; used by obj_create script function; (65535 <nowiki>=</nowiki> not used) }}
{{OBDtr| 0x1C | int32    |C87C64| FF FF 00 00 | 65535    | script ID; used by obj_create script function; (65535 <nowiki>=</nowiki> not used) }}
{{OBDtr| 0x20 | float    |B0C3D4| 00 00 4F 43 |207.000000 | initial x-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| 0x24 | float    |B0C3D4| 1F 05 F6 42 |123.010002 | initial y-position (height) }}
{{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| 0x28 | float    |B0C3D4| 98 7F CC C3 |-408.996826| initial z-position }}
{{OBDtr| 0x3C | float    |FFDDDD| 00 00 80 3F | 1.0 | object scale }}
{{OBDtr| 0x2C | float    |E7CEA5| F2 04 35 3F | 0.707107  | x component of the initial rotation quaternion }}
|- ALIGN=CENTER VALIGN=TOP
{{OBDtr| 0x30 | float    |E7CEA5| 74 BC 82 B9 | -0.000249 | y component of the initial rotation quaternion }}
|0x40||matrix
{{OBDtr| 0x34 | float    |E7CEA5| 74 BC 82 B9 | -0.000249 | z component of the initial rotation quaternion }}
|BGCOLOR="#64aaaa"|
{{OBDtr| 0x38 | float    |E7CEA5| F3 04 35 3F | 0.707107 | w component of the initial rotation quaternion }}
{|cellspacing=1 style="white-space:nowrap;width:100%;"
{{OBDtr| 0x3C | float    |FFDDDD| 00 00 80 3F | 1.000000 | initial scale of the object }}
|-
{{OBDtr| 0x40 | float    |64AAAA| FC FF 7F 3F | 0.999999  | m11 element of the initial position transform matrix }}
|FC FF 7F 3F || 00 00 00 00 || 8A E3 38 BA
{{OBDtr| 0x44 | float    |64AAAA| 00 00 00 00 | 0.000000  | m21 element of the initial position transform matrix }}
|-
{{OBDtr| 0x48 | float    |64AAAA| 8A E3 38 BA | -0.000705 | m31 element of the initial position transform matrix }}
|8A E3 38 BA || 2E DE 4C 32 || FC FF 7F BF  
{{OBDtr| 0x4C | float    |64AAAA| 8A E3 38 BA | -0.000705 | m12 element of the initial position transform matrix }}
|-
{{OBDtr| 0x50 | float    |64AAAA| 2E DE 4C 32 |0.000000...| m22 element of the initial position transform matrix }}
|C9 F5 13 2D || 00 00 80 3F || 2B DE 4C 32
{{OBDtr| 0x54 | float    |64AAAA| FC FF 7F BF | -0.999999 | m32 element of the initial position transform matrix }}
|-
{{OBDtr| 0x58 | float    |64AAAA| C9 F5 13 2D |0.000000...| m13 element of the initial position transform matrix }}
|00 00 4F 43 || 1F 05 F6 42 || 98 7F CC C3
{{OBDtr| 0x5C | float    |64AAAA| 00 00 80 3F | 1.000000  | m23 element of the initial position transform matrix }}
|}  
{{OBDtr| 0x60 | float    |64AAAA| 2B DE 4C 32 |0.000000...| m33 element of the initial position transform matrix }}
|
{{OBDtr| 0x64 | float    |64AAAA| 00 00 4F 43 |207.000000 | m14 element of the initial position transform matrix (x-position) }}
{|cellspacing=1 style="white-space:nowrap;width:100%"
{{OBDtr| 0x68 | float    |64AAAA| 1F 05 F6 42 |123.010002 | m24 element of the initial position transform matrix (y-position, height) }}
|-
{{OBDtr| 0x6C | float    |64AAAA| 98 7F CC C3 |-408.996826| m34 element of the initial position transform matrix (z-position) }}
|0.999999 || 0.0 || -0.000705
{{OBDtr2|0x70 | char[64] |EBEBEB| object_door_1          | name of the object }}
|-
{{OBDtr2|0xB0 | char[64] |8C8CCC| L3_Gunk.ENV            | internal object file name; maybe an old development relict }}
| -0.000705 || 0.0 || -0.999999
|-
|0.0 || 1.0 || 0.0
|-
|207.0 || 123.010002 || -408.996826
|}
|}
|ALIGN=LEFT|origin matrix
{{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 }}
|}
The primary use of this data is to display animated objects in the environment (cars, helis, fans etc.). "Physics" may also work but the implementation is buggy and incomplete, you may be able to add a object that can be pushed around but if you try to jump on it you fall.




Elements m41, m42, m43, m44 of both transform matrices are missing. m41, m42 and m43 are the projection transform coefficients and they are not needed so they are 0.0 and the m44 element is always 1.0 for a transform matrix. (column major transform matrices like in Open GL, for Direct 3D they need to be transposed)
Position, rotation and scale are used only when the object is not animated, otherwise the origin matrix is used instead.




The initial position transform is used the place the object in the environment. For object that have an animation attached to them this is also the starting position of the animation sequence. The initial x,y and z position value together with the initial rotation quaternion and the initial scale factor contain basically the same information as the initial transform matrix and combining them in a transform matrix should result in the initial transform matrix (less the differences due to floating point computation errors)
Objects are not automatically created when a level is loaded, they need to be created from script using the obj_create command. After that they can be controlled with other commands like obj_show, obj_hide, obj_kill, env_anim and env_setanim. In some cases the object geometry has been baked into the environment and needs to be hidden (by using "env_show objectScriptID 0") before playing an animation.





Revision as of 14:14, 18 November 2012

ONI BINARY DATA
OBDC << Other file types >> OFGA
OBOA : Starting Object Array
switch to XML:OBOA page
Overview @ Oni Stuff
OBD.png


Oboa a.gif


Offset Type Raw Hex Value Description
0x00 res_id 01 55 02 00 597 00597-.OBOA
0x04 lev_id 01 00 00 06 3 level 3
0x08 char[22] AD DE dead unused
0x1E int16 62 00 98 arrray size
First element (black outline)
0x00 int32 01 56 02 00 1 link to 00598-.M3GA - geometry displayed for this object
0x04 link 00 00 00 00 unused link to OBAN - animation played when the object is created, a different animation can be selected with env_setanim
0x08 link 00 00 00 00 unused link to ENVP - particles attached to this object, for example motorcycle headlight
0x0C bitset32 00 12 00 00 0, 18, 0, 0 flags; the following bits are used:
0x00 02 00 00 - element used
0x00 04 00 00 - no collision detection
0x00 08 00 00 - no gravity
0x00 10 00 00 - face collision; object uses a bounding box for collision detection (overrides 0x0004)
0x10 int32 46 89 00 00 35142 the index of the door frame GQ for door objects?
0x14 int32 01 00 00 00 1 door ID; only used for doors; in the case of double doors both doors have the same id but one of the door identifiers has bit 12 set
0x18 int32 00 00 00 00 0 "physics type"; the following values are possible:
0 - none
1 - none
2 - has physics (same as 4)
3 - is animated (no physics)
4 - has physics
0x1C int32 FF FF 00 00 65535 script ID; used by obj_create script function; (65535 = not used)
0x20 vector 00 00 4F 43 1F 05 F6 42 98 7F CC C3 207.0 123.010002 -408.996826 object position
0x2C quaternion 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
0x3C float 00 00 80 3F 1.0 object scale
0x40 matrix
FC FF 7F 3F 00 00 00 00 8A E3 38 BA
8A E3 38 BA 2E DE 4C 32 FC FF 7F BF
C9 F5 13 2D 00 00 80 3F 2B DE 4C 32
00 00 4F 43 1F 05 F6 42 98 7F CC C3
0.999999 0.0 -0.000705
-0.000705 0.0 -0.999999
0.0 1.0 0.0
207.0 123.010002 -408.996826
origin matrix
0x70 char[64] object_door_1 name of the object; informational only
0xB0 char[64] L3_Gunk.ENV file name from which this object was created; informational only

The primary use of this data is to display animated objects in the environment (cars, helis, fans etc.). "Physics" may also work but the implementation is buggy and incomplete, you may be able to add a object that can be pushed around but if you try to jump on it you fall.


Position, rotation and scale are used only when the object is not animated, otherwise the origin matrix is used instead.


Objects are not automatically created when a level is loaded, they need to be created from script using the obj_create command. After that they can be controlled with other commands like obj_show, obj_hide, obj_kill, env_anim and env_setanim. In some cases the object geometry has been baked into the environment and needs to be hidden (by using "env_show objectScriptID 0") before playing an animation.


ONI BINARY DATA
OBDC << Other file types >> OFGA
OBOA : Starting Object Array
Level file