8,018
edits
Paradox-01 (talk | contribs) m (+ pic) |
Paradox-01 (talk | contribs) m (removing notes not longer required) |
||
Line 2: | Line 2: | ||
===general information=== | ===general information=== | ||
* The xml code on this page was tested with onisplit '''v0.9.61.0''', '''v0.9.68.0''', '''v0.9.82.0''' | * The xml code on this page was tested with onisplit '''v0.9.61.0''', '''v0.9.68.0''', '''v0.9.82.0''', '''v0.9.96.0''' | ||
Line 151: | Line 151: | ||
===data harvest from TRAM files=== | ===data harvest from TRAM files=== | ||
;(outdated) | |||
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 [http://mods.oni2.net/node/38 v0.9.54.0] and use them for OBANs. | 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 [http://mods.oni2.net/node/38 v0.9.54.0] and use them for OBANs. | ||
: [http://oni.bungie.org/community/forum/viewtopic.php?id=2276 HERE's] an excel macro to harvest such data for camera animations. | : [http://oni.bungie.org/community/forum/viewtopic.php?id=2276 HERE's] an excel macro to harvest such data for camera animations. | ||
Line 165: | Line 160: | ||
In some scenarios we need to build a new transform matrix, e.g. when making a new weapon particle emitter. | In some scenarios we need to build a new transform matrix, e.g. when making a new weapon particle emitter. | ||
The first 9 values belong to a 3x3 rotation matrix. | |||
The last 3 values are the start positions. | |||
{| class="wikitable" style="float:right; text-align:right" | {| class="wikitable" style="float:right; text-align:right" | ||
| This formula is involved in building such matrix. | | This formula is involved in building such matrix. | ||
Line 179: | Line 170: | ||
|} | |} | ||
x = 60 | x = 60 | ||
Line 195: | Line 185: | ||
{| class="wikitable" style="float:right;" | |||
| https://dl.dropboxusercontent.com/u/139715/OniGalore/Oni_Matrix_calculator.png | |||
[[User:Neo|Neo]] provided a little '''[https://dl.dropboxusercontent.com/u/139715/OniGalore/OniMatrix.zip matrix program]'''. The source code is also available [https://dl.dropboxusercontent.com/u/139715/OniGalore/OniMatrix_src.zip over here]. | |||
|} | |||
The final rotation matrix becomes calculated from multiplication of all single rotation matrices whereby the order must be Z, then Y, then X. | |||
: '''Rotation matrix Z * rotation matrix Y * Rotation matrix X''' | |||
So the transform matrix is: | |||
: '''final rotation matrix; position X; position Y; position Z''' | |||
Mod Tool vbs code (rotations only): | |||
* [[Mod_Tool/Scripting#convert_XYZ_rotation_to_matrix|euler rotation to matrix]] | |||
* [[Mod_Tool/Scripting#convert_matrix_to_XYZ_rotation|matrix to euler rotation]] | |||
===wish list=== | |||
* TRAM import: dae + xml | |||
** the dae section in the xml file should have an option to create a pelvis OBAN along with the TRAM (see [[XML:TRAM]], RealWorld flag for details) | |||
* dae to oni creation should also allow for OBANs (currently OBANs can only be imported via level master xml file) | |||
** this would be very useful for editing/creating single OBAN files if the rest of the level don't need changes | |||
{{XML}} | {{XML}} |
edits