8,013
edits
Paradox-01 (talk | contribs) m (valid animations for a character from links in associated TRAC and TRSC) |
Paradox-01 (talk | contribs) m (re-arranging some sections) |
||
Line 3: | Line 3: | ||
__TOC__ | __TOC__ | ||
TRAM files - animation data for characters - are basically made of three chunks. | |||
* Meta data or "header": animation type, state, flags, particle, sounds, etc. | |||
* Animation data: pelvis heights, pelvis velocities, bone rotations | |||
* Attack data: damage, self-damage, extends (danger zones for AI awareness) and throws | |||
===List of tags, types, and flags=== | ===List of tags, types, and flags=== | ||
Line 501: | Line 442: | ||
| <Velocity> | | <Velocity> | ||
| 2 x float | | 2 x float | ||
|Relative positions. | |Relative positions. (Delta values: the numbers represent only the change of position from one frame to another.) | ||
|- | |- | ||
| <Rotations> | | <Rotations> | ||
Line 706: | Line 647: | ||
|} | |} | ||
===Extents and XML=== | |||
===Export=== | |||
TRAM files can be extracted '''A) as pure XML''' files or '''B) as a pair of XML and DAE''' files. For editing the actual animation, you will want to use method B. While exporting an ONCC, you might see errors such as: | |||
Cannot find instance 'TRAMKONCOMthrow_rev' | |||
Cannot find instance 'TRAMKONCOMthrow_rev' | |||
Cannot find instance 'TRAMKONRIFturn_right' | |||
Cannot find instance 'TRAMKONOKOlev18_ZomStand' | |||
Cannot find instance 'TRAMKONOKOcorner_hide' | |||
Cannot find instance 'TRAMKONPIScorner_hide' | |||
Ignore them, as those files doesn't exist. (Someday we should remove them from the TRACs.) | |||
====Via command line==== | |||
To export a single TRAM: | |||
onisplit -extract:xml output_path -anim-body:path_to\TRBS_or_ONCCname.oni path_to\TRAMname.oni | |||
To export merged TRAMs: | |||
onisplit -extract:xml output_path '''-anim-merge''' -anim-body:path_to\TRBS_or_ONCCname.oni path_to\TRAMname1.oni path_to\TRAMnameN.oni | |||
====Via Vago==== | |||
[[Image:Vago_xml_plus_dae_extraction.png|thumb|200px|right|combined extraction of dae and xml]] | |||
When you start '''[[Vago_(tool)|Vago]]''', the "General" tab should be open by default. If not, click on it. Then follow these five easy steps. | |||
<!-- General tab should be step 1 but i've already another img. If Vago gets updated I will upload a better img. --> | |||
'''Step 1:''' Select "ONI" as input format ("From"). | |||
'''Step 2:''' Select "XML" as output format ("To"). | |||
'''Step 3:''' Check "Another TRAM" to chose a character animation file. | |||
'''Step 4:''' Click "Add" button to choose an ONCC file. | |||
'''Step 5:''' Click "Convert". | |||
====Via Simple OniSplit GUI==== | |||
There was a long-standing problem with combined ONCC/TRAM files where the textures would be missing.<!--[Iritscen: I don't understand this sentence; is it important to keep this historical note?] With an older method you couldn't export non-native TRAM which meant to the TRAM had to be registered in the TRAC the ONCC is using.--> | |||
'''[http://www.paradox.oni2.net/programs/Simple_OniSplit_GUI.zip Simple OniSplit GUI]''' post-edits the DAE to fix missing textures. The character-related .oni files must be all in one folder. Usually the level0_Final folder does the trick. | |||
'''Step 1:''' Drag and drop TRAM and ONCC into the [http://www.paradox.oni2.net/images/simpleOniSplitGui.png big field.] (One by one or simultaneously; the order doesn't matter.) | |||
'''Step 2:''' Hit "Convert". | |||
===Editing 3D data=== | |||
====XSI==== | |||
You can load the DAE file into a compatible editor. So far, the community's favorite is {{ModTool}}. | |||
* For the correct Mod Tool settings, see [[Mod Tool#Animating|HERE]]. | |||
Here are some hints for creating animations when there is no rigging available: | |||
* Use the ONCC model in your 3D editor that is also intended for the animations. This makes sure the pelvis height will match and feet will not float in the air or go through the ground. | |||
* First frame and last frame should match the probable previous and follow-up animations. This will reduce the necessity for long interpolations. | |||
* When setting keyframes each body part should have been moved. This rule of thumb will give a more natural looking animation. | |||
* The first body part to be animated is always the pelvis. | |||
* Watch out for pelvis rotations so that the xyz rotations don't overlap too much otherwise you will get into a [[wikipedia:Gimbal_lock|gimbal lock]]. | |||
See also our [http://oni.bungie.org/forum/viewtopic.php?id=1433 OCF thread]. | |||
====Blender==== | |||
Theoretical possible. Very difficult in practice and we don't have a tutorial on this one. | |||
===Import=== | |||
onisplit -create output_path path_to\TRAMname.xml | |||
==Additonal details== | |||
===Speeding up existing animations=== | |||
s10k has created a XmlTools patch that allow the speedup of any existing TRAM (by removing frames). More information and download [http://mods.oni2.net/node/354 here.] | |||
===Attacks=== | |||
====Extents and XML==== | |||
Ever wondered how the AI can recognize incoming attacks and block or dodge them? Extents (found by geyser and fully uncovered by Neo) are the key. Imagine the character looked at from above, and visualize a circle with this character being at the center of the circle. Now divide this circle into 10° segments, and those are the 36 units of horizontal extents (that is, the lateral reach of the attack). The 0° point is directly in front of the character and 180° is behind the character. The segments run clockwise around the character. So the first Extent tag is the horizontal reach on the 0° line, the second tag is for the line 10° clockwise, and so on. Note that a frontal attack like a simple kick could hit a target not only if he's standing at 0° (directly in front), but also at 10° or 20° to the right, and also at 340° and 350° (a bit to the left). When setting these manually, you should guess the inner and outer ranges of the reach of the attacker's bones that have damage attached to them. Test these values with an AI that blocks often. If you did it right, your attack will often be blocked, but if the extent length is too high, the AIs will react when too far from you, which does not look good. | Ever wondered how the AI can recognize incoming attacks and block or dodge them? Extents (found by geyser and fully uncovered by Neo) are the key. Imagine the character looked at from above, and visualize a circle with this character being at the center of the circle. Now divide this circle into 10° segments, and those are the 36 units of horizontal extents (that is, the lateral reach of the attack). The 0° point is directly in front of the character and 180° is behind the character. The segments run clockwise around the character. So the first Extent tag is the horizontal reach on the 0° line, the second tag is for the line 10° clockwise, and so on. Note that a frontal attack like a simple kick could hit a target not only if he's standing at 0° (directly in front), but also at 10° or 20° to the right, and also at 340° and 350° (a bit to the left). When setting these manually, you should guess the inner and outer ranges of the reach of the attacker's bones that have damage attached to them. Test these values with an AI that blocks often. If you did it right, your attack will often be blocked, but if the extent length is too high, the AIs will react when too far from you, which does not look good. | ||
Line 723: | Line 740: | ||
::36 fields (exactly 36, otherwise it won't compile back into a .oni file), which correspond to areas in 10° intervals around the character as described above. | ::36 fields (exactly 36, otherwise it won't compile back into a .oni file), which correspond to areas in 10° intervals around the character as described above. | ||
====Adding extents to an existing animation==== | |||
==Adding extents to an existing animation== | |||
Let's say that you want to convert a non-attack animation to a damage-dealing animation. Non-attack TRAMs do not have extents information used to notify the AIs about incoming attacks, so how do you generate this information from the animation? | Let's say that you want to convert a non-attack animation to a damage-dealing animation. Non-attack TRAMs do not have extents information used to notify the AIs about incoming attacks, so how do you generate this information from the animation? | ||
:1. Export the animation to XML with a body attached. If you extract using just "-extract:xml dest_folder TRAMsomething.oni", you'll get the 3D animation data inside the XML (namely, the tags Heights, Velocities, Rotations, PositionOffset, and Positions; for an attack animation, you'll also get Attacks and AttackRing, and inside Attacks' elements, each Attack element will have Extents at the end of it). | :1. Export the animation to XML with a body attached. If you extract using just "-extract:xml dest_folder TRAMsomething.oni", you'll get the 3D animation data inside the XML (namely, the tags Heights, Velocities, Rotations, PositionOffset, and Positions; for an attack animation, you'll also get Attacks and AttackRing, and inside Attacks' elements, each Attack element will have Extents at the end of it). | ||
Line 797: | Line 765: | ||
:5. If you need this information for a patch mod, run "-extract:xml" on the TRAMsomething.oni you've created, <u>without</u> using "-anim-body". Now you can copy the Extents and AttackRing data to your XML patch. For an example of how the patch should look, see the [http://mods.oni2.net/node/311 Domino Knockdowns] mod. | :5. If you need this information for a patch mod, run "-extract:xml" on the TRAMsomething.oni you've created, <u>without</u> using "-anim-body". Now you can copy the Extents and AttackRing data to your XML patch. For an example of how the patch should look, see the [http://mods.oni2.net/node/311 Domino Knockdowns] mod. | ||
< | |||
==Throws== | ===Combos=== | ||
The type and order of keystroke or mouse clicks to click for combos are hardcoded. | |||
To assign an animation for a specific combo attack you set corresponding value in <Lookup><Type>. | |||
Setting a value in <Link> of '''<DirectAnimations>''' will do two things: | |||
# It will increase the time for player input, meaning the next animation can be executed more easily. (In vanilla the Crescent Moon Kick has no link in KONCOMcomb_k_k_kfw and therefore is difficult to use.) | |||
# It disables <Interpolation><End> for the next combo anim. | |||
# It enables <Pause><Soft> and <Pause><Hard>. | |||
===Just Frame combos=== | |||
For short '''JF combos''' or '''JF anims'''. Invented by Delano. | |||
===Throws=== | |||
Throw target animations are registered in the TRAC of the throw initiator (AKA the throw source). Target animations are forced onto the other character, removing the need to have that animation in the target's TRAC. Throw target (TRAM*tgt) animations can cover only up to 256 (0-255) frames. | Throw target animations are registered in the TRAC of the throw initiator (AKA the throw source). Target animations are forced onto the other character, removing the need to have that animation in the target's TRAC. Throw target (TRAM*tgt) animations can cover only up to 256 (0-255) frames. | ||
==Forward throws== | |||
====Forward throws==== | |||
Scenario: you load two characters into Mod Tool and rotate (+/-180°) the throw target character because you need them to stand face to face as you work on an animation. When you are done animating, the target animation would need to be reversed again. This means multiplying the velocities by -1; the rotation also needs correcting. So it looks like you need *(-1) for the x rotation and -/+180° (depending on your initial change) for the y rotation. | Scenario: you load two characters into Mod Tool and rotate (+/-180°) the throw target character because you need them to stand face to face as you work on an animation. When you are done animating, the target animation would need to be reversed again. This means multiplying the velocities by -1; the rotation also needs correcting. So it looks like you need *(-1) for the x rotation and -/+180° (depending on your initial change) for the y rotation. | ||
===Excel macro | |||
=====Excel macro===== | |||
Needs update. | |||
[[Image:Animation_macro_v4.png|right|thumb]] | |||
* [http://dl.dropbox.com/u/139715/OniGalore/TRAM_macro.zip Here's the macro] (for all TRAMs except overlays). [http://youtu.be/wxzJ8ahjP8k Demo vid here]. Usage: | * [http://dl.dropbox.com/u/139715/OniGalore/TRAM_macro.zip Here's the macro] (for all TRAMs except overlays). [http://youtu.be/wxzJ8ahjP8k Demo vid here]. Usage: | ||
* Put your files into the "input_and_output" folder. | * Put your files into the "input_and_output" folder. | ||
Line 811: | Line 799: | ||
* If you are not afraid of VBA code, you can enter the dev environment by hitting Alt+F11. If you want to extend the attack library with more screenshots and settings, search for: "LibraryThrows", " LibraryAttack", "Picture", and "CBAttackHelp.AddItem". | * If you are not afraid of VBA code, you can enter the dev environment by hitting Alt+F11. If you want to extend the attack library with more screenshots and settings, search for: "LibraryThrows", " LibraryAttack", "Picture", and "CBAttackHelp.AddItem". | ||
==Run animations== | ===Run animations=== | ||
Here's a breakdown of the Striker's run animations, meant as an illustration for what would be needed to make new run TRAMs. | Here's a breakdown of the Striker's run animations, meant as an illustration for what would be needed to make new run TRAMs. | ||
Line 840: | Line 827: | ||
</gallery> | </gallery> | ||
==List of unused animations== | |||
===List of unused animations=== | |||
Here are all the known unused animations. These could be reintegrated/recycled/whatever.... | Here are all the known unused animations. These could be reintegrated/recycled/whatever.... | ||
'''From the original game''' | |||
* KONOKOconsole_punch: what the name says (the engine can use that animation depending on the console's configuration, see [[OBD:BINA/OBJC/CONS|CONS]]) | * KONOKOconsole_punch: what the name says (the engine can use that animation depending on the console's configuration, see [[OBD:BINA/OBJC/CONS|CONS]]) | ||
* KONOKOlev3_intro: looks like she was placing something (bomb?) and then running away | * KONOKOlev3_intro: looks like she was placing something (bomb?) and then running away | ||
Line 854: | Line 843: | ||
* THUGlev1_direct: Thug probably directing a truck driver | * THUGlev1_direct: Thug probably directing a truck driver | ||
'''From modders''' | |||
The following files are available in DAE (and maybe .oni format). | The following files are available in DAE (and maybe .oni format). | ||
Line 866: | Line 857: | ||
** Needs to be slowed down by adding more frames. | ** Needs to be slowed down by adding more frames. | ||
== | |||
===FX - special effects=== | |||
If the scene is overloaded by particle - including motion blur - these effects will stop to be rendered. | |||
So, don't overuse effects. | |||
====Adding colorful trails==== | |||
Open the XML-accompanied TRAM, search for the "Particles" tag, and insert your markup. | |||
First example: TRAMSTRCOMcomb_p_p.xml | |||
[[Image:Colorful_contrail_added.png|right|thumb]] | |||
<Particles> | |||
<Particle> | |||
<StartFrame>0</StartFrame> | |||
<EndFrame>12</EndFrame> | |||
<Bone>LeftFist</Bone> | |||
<Name>contrail</Name> | |||
</Particle> | |||
</Particles> | |||
"contrail" is looked up by the character class (ONCC) that emits the actual particle; here it is "h2h_strtrail_e01". | |||
This second example is about creating two different contrails in a TRAM at the same time. The animation is "TRAMSTRCOMpunch_heavy.xml". | |||
[[Image:Different_contrails_in_attack.png|right|thumb]] | |||
<Particles> | |||
<Particle> | |||
<Start>0</Start> | |||
<End>54</End> | |||
<Bone>RightWrist</Bone> | |||
<Name>contrail</Name> | |||
</Particle> | |||
<Particle> | |||
<Start>0</Start> | |||
<End>54</End> | |||
<Bone>LeftWrist</Bone> | |||
<Name>'''contrail_2'''</Name> | |||
</Particle> | |||
</Particles> | |||
Note that you need to register the second contrail in the ONCC as well. Using your own contrail particle is also possible; just insert its name between the <Type> tags. | |||
<ONCPParticle> | |||
<Name>contrail</Name> | |||
<Type>h2h_strtrail_e01</Type> | |||
<BodyPart>-1</BodyPart> | |||
</ONCPParticle> | |||
<ONCPParticle> | |||
<Name>'''contrail_2'''</Name> | |||
<Type>'''h2h_murtrail_e01'''</Type> | |||
<BodyPart>-1</BodyPart> | |||
</ONCPParticle> | |||
====Motion blur==== | |||
... | |||
{{XML}} | {{XML}} |
edits