OBD:OBAN
Main Page >> Oni Binary Data >> File Types >> OBAN File
Object AnimationFile
Hex | Translation | Meaning |
01 86 00 00 | 134 | 00134-Blackvan_FB.OBAN |
01 00 00 06 | 3 | level 3 |
00 00 00 00 | 0 | Space marker. Don't alter it. |
C2 F5 E8 3F | 1.819999 | m11 element of the initial position transform matrix |
AB D7 AA B3 | -7.955471e-8 | m21 element of the initial position transform matrix |
EC 89 13 35 | 5.496247e-7 | m31 element of the initial position transform matrix |
EC 89 13 35 | 5.496247e-7 | m12 element of the initial position transform matrix |
ED 89 13 B4 | -1.374061e-7 | m22 element of the initial position transform matrix |
C2 F5 E8 BF | -1.819999 | m32 element of the initial position transform matrix |
B1 D7 AA 33 | 7.955475e-8 | m13 element of the initial position transform matrix |
C2 F5 E8 3F | 1.819999 | m23 element of the initial position transform matrix |
EB 89 13 B4 | -1.374061e-7 | m33 element of the initial position transform matrix |
6B 9A 94 44 | 1188.825561 | m14 element of the initial position transform matrix (x-position) |
97 FD 5B C2 | -54.997646 | m24 element of the initial position transform matrix (y-position, height) |
5D 06 DA C2 | -109.012428 | m34 element of the initial position transform matrix (z-position) |
C2 F5 E8 3F | 1.819999 | m11 element of the fixed transform matrix |
00 00 00 00 | 0.000000 | m21 element of the fixed transform matrix |
00 00 00 00 | 0.000000 | m31 element of the fixed transform matrix |
00 00 00 00 | 0.000000 | m12 element of the fixed transform matrix |
C2 F5 E8 3F | 1.819999 | m22 element of the fixed transform matrix |
00 00 00 00 | 0.000000 | m32 element of the fixed transform matrix |
00 00 00 00 | 0.000000 | m13 element of the fixed transform matrix |
00 00 00 00 | 0.000000 | m23 element of the fixed transform matrix |
C2 F5 E8 3F | 1.819999 | m33 element of the fixed transform matrix |
00 00 00 00 | 0.000000 | m14 element of the fixed transform matrix (x translation) |
00 00 00 00 | 0.000000 | m24 element of the fixed transform matrix (y translation) |
00 00 00 00 | 0.000000 | m34 element of the fixed transform matrix (z translation) |
50 00 | 80 | number of frames ??? |
F5 01 | 501 | animation time in 1/60 seconds (8.35 seconds) |
00 00 | 0 | unknown |
65 00 | 101 | 101 packages follow (one package is edged in black) |
Below follows the first package. | ||
F4 04 35 BF | -0.7071068 | x-value of the rotation quaternion |
6A 19 C4 B3 | -9.131584e-8 | y-value of the rotation quaternion |
CE 3C 03 B4 | -1.222244e-7 | z-value of the rotation quaternion |
F3 04 35 BF | -0.7071067 | w-value of the rotation quaternion |
6B 9A 94 44 | 1188.825561 | x-position |
97 FD 5B C2 | -54.997646 | y-position (height) |
5D 06 DA C2 | -109.012428 | z-position |
00 00 00 00 | 0 | passed time in 1/60 seconds |
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)
The initial transform matrix can be used to position the object in the environment without playing the animation frames. The animation frames themself include this transform so it is not needed to actually play the animation.
The fixed transform matrix must be applied to every animation frame. For some animations this matrix is the identity matrix so it is not really needed but some animations for composed objects (like the motorcycle animation from level 3 intro) need this transform.
- Neo
- My respects for the OpenGL/Direct3D knowledge. Keep it up!
- Examples of "fixed transforms", please. Scaling?
- For both transformations, there are two alternative ways to think of the 12 coefficients
- a 4x4 matrix with missing terms (affine transformation)
- a 3x3 matrix (vector transformation) and a position vector
- Even if a 4D matrix is generated at runtime for use by OpenGL,
- I'd still provide an alternative visualization in layman terms
- let X=(x, y, z) be the position of a point in the M3GM
- let M=(m11, m21, m31; m12, m22, m32; m13, m23, m33) be the 3x3 matrix
- let R=(m14, m24, m34) be the position (column) vector
- then the absolute position of the point in the 3D world will be: M X + R
- I'd still provide an alternative visualization in layman terms
- Note that the OBD namespace has been merged into Main.
- We may thus move OBD:OBAN to OBAN etc. Soon.
- geyser 22:19, 28 February 2007 (CET)
- geyser
- Thanks!
- The fixed transform can be anything including scaling which is quite common. For example the motorcycle from level 3 is scaled down a bit (0.7197) and its wheels are scaled down and they also have a rotation applied to them. Without this transform the resulting motorcycle looks funny, the wheels are a bit bigger and nearer to the center of the motorcycle body than they should makeing it look like it was compressed. Note that the animation frame only includes rotation and translation so any scaling that must be applied to the 3D models used in animation needs to be done with this matrix. Some other object animations where I saw this matrix used are the blackvan animation from the end of level 3 and the truck animation from the end of level 1 (the truck back model is way bigger than the truck front model so scaling is badly needed there).
- While you are technically correct about expressing the transform as a translation and a 3x3 matrix that does rotation, scaling, shearing and mirroring I have never seen a 3D graphic system (or documentation) doing it. It's much easier in practice to only deal with one 4x4 transform matrix which includes everything (the 3x3 transform part, the translation and the projection). In addition as you already noted the translation part is (m14, m24, m34) (the first 3 elements of the last column) so it is easy to spot it for someone who is only interested in object position. In a similar way a 2D graphic system uses a 3x3 matrix to express rotation, scaling, shearing and mirroring transforms for 2D vectors. This thing is sort of burned into my mind, when I saw 12 float values with 3 of them looking like a position I said to myself "alright, this must be a transform matrix without its last column" (I mostly use Direct 3D so I tend to think in row major matrix order) :).
Main Page >> Oni Binary Data >> File Types >> OBAN File