* [[OBD_talk:TRIG|laser triggers]] and [[OBD:DOOR|door]] files use '''global''' OBAN files
* [[OBD_talk:TRIG|laser triggers]] and [[OBD:DOOR|door]] files use '''global''' OBAN files
* some cutscene TRAM, animated cutscene objects and camera shots/animations use '''level specific''' OBAN files
* some cutscene TRAM, animated cutscene objects and camera shots/animations use '''level specific''' OBAN files
* if you want to update level-specific non-door OBANs used by ONLV, you must provide the ONLV along the OBANs in the package
* trivia: also the [http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/dream_obj_images_spawned.jpg dream lab images] use OBANs
* trivia: also the [http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/dream_obj_images_spawned.jpg dream lab images] use OBANs
* tutorial: making [[AE:Authoring_custom_camera_animations|camera interpolations]]
* tutorial: making [[AE:Authoring_custom_camera_animations|camera interpolations]]
autostart animation (after an animated object is created
ZAxisUp
3DSMax generated animation (has Z axis pointing up), all original door OBANs seem to have this flag
<InitialTransform>
matrix4x3
Initial position transform matrix, last 3 values are X, Y, Z position values. X, Y, Z seem to be always 0 (or nearly 0) in door OBAN files. That would make sense because of their global use.
<BaseTransform>
matrix4x3
fixed transform matrix
<FrameLength>
int16
the value must be equal to the last
<FrameCount>
int16
fubared animation frame length (in 1/60 seconds); does not work
<HalfStopFrame>
int16
stop frame for the first "half" of the animation; used by door animations to distinguish between open and close sequences
<KeyFrames>
holds <OBANKeyFrame> tags
<Rotation>
quaternion
object rotation, can harvested from TRAM files
<Translation>
vector3
x y z object position
int32
elapsed time in frames, use short intervals for smooth animations
Transform matrices
Like all matrices in Oni, they are composed of 3 vectors defining rotation/scaling/shearing and a 4th vector defining a translation.
In the above table the 4 vectors are presented as rows (Direct 3D convention), although OpenGL and Oni use them as columns.
Affine transformations use a 4x4 matrix with 4 extra coefficients (in the presentation above, one would add one column on the right):
three projection transform coefficients (all of them are zero here); one final coefficient (always 1.0 for an affine transform matrix).
Alternatively, one can think of the 3x4 matrix as a 3x3 rotation/scaling matrix and a position vector
Let X=(x, y, z) be the position of a vertex 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 translation vector
Then the absolute position of the vertex in the 3D world will be: X M + R
(left multiplication is used because of the row-major notation above)
Initial transform matrix
It is used to position the object in the environment before the animation is played.
When the animation is played, they use the fixed transform matrix and a quaternion.
Fixed transform matrix
This transformation is applied before the quaternion+position transform at every keyframe.
The only transform that can't be handled by the quaternion+position is scaling/mirroring.
Thus, the fixed transform is a scaling matrix most of the time (no rotation or translation).
On the hex page, the fixed transform scales the van up by 1.82 (along all three axes).
Quaternions
Those are used in Oni whenever interpolation of 3D rotation is involved (e.g., TRAM rotation)
In this case, rotation at intermediate frames is interpolated from the keyframe quaternions.
code sample
[...] means other code blocks of <OBANKeyFrame>...</OBANKeyFrame>
It's possible to create animations in Mod Tool and making TRAM files out of them. Then you can extract the quaternions and rotations with onisplit v0.9.54.0 and use them for OBANs.
HERE's an excel macro to harvest such data for camera animations.
the dream lab riddle
The current AE fails to update the OBAN files for the dream lab photos.
file
old size
new size
OBANImage01
OBANImage02
OBANImage03
OBANImage04
OBANImage05
OBANImage06
OBANImage07
5,93 KB (6.080 Bytes)
5,93 KB (6.080 Bytes)
5,93 KB (6.080 Bytes)
5,93 KB (6.080 Bytes)
5,93 KB (6.080 Bytes)
5,93 KB (6.080 Bytes)
5,93 KB (6.080 Bytes)
6,56 KB (6.720 Bytes)
-
6,87 KB (7.040 Bytes)
5,90 KB (6.048 Bytes)
-
6,56 KB (6.720 Bytes)
-
test 1: exchanging only the OBANs
step by step:
Let's use onisplit to export the original Oni\GameDataFolder\level13_Final archives.
The dream lab photo OBANs are really inside that level. (OBANImage01.oni up to 07)
Now we exchange those OBANs with the updated ones and rebuilding the raw/dat level archives of level 13.
When playing the first dream lab cutscene, the photos are animated correctly.
Conclusion: the new OBANs are okay.
test 2: comparing the OBAN AE install locations
1) the OBANs are stored inside Edition\install\packages\Globalize\oni\level0_Final\level0_Final
after package installation
exported level0_Final contains: 1,3,4, 6 - the updated OBANs
exported level13_Final contains: 1 - 7 - the old OBANs
2) the OBANs are stored inside Edition\install\packages\Globalize\oni\level13_Final
after package installation
exported level0_Final contains: no OBANImage0X.oni as expected
exported level13_Final contains:
Image01 // 6,56 KB (6.720 Bytes) // new
Image02 // 5,93 KB (6.080 Bytes) // old
Image03 // 6,87 KB (7.040 Bytes) // new
Image04 // 5,90 KB (6.048 Bytes) // new
Image05 // 5,93 KB (6.080 Bytes) // old
Image06 // 6,56 KB (6.720 Bytes) // new
Image07 // 5,93 KB (6.080 Bytes) // old
The new files are in place. Why doesn't the cutscene work?
test 3: ONLV dependence?
ONLV also links to AISA and cause a problem when missing in AE packages.