Author Topic: [Tutorial] Combining Animations with Animation Composer  (Read 944 times)

0 Members and 1 Guest are viewing this topic.

Online nargil66

  • Forum Moderator
  • Full Member
  • *
  • Topic Author
  • Posts: 852
  • Country: bg
  • Karma: +9/-0
  • Gender: Male
    • View Profile
    • Awards
  • Time Zone: ?
[Tutorial] Combining Animations with Animation Composer
« on: 06 August 2018, 14:32:06 »
You want to make new animations without using complicated programs? Tamchi has made the perfect tool for this purpose. Not only it’s easy to use, but it's very fun. Here I’ll list the basic steps for combining animations, as far as my knowledge goes.

I. Needed tools:

1. TQ Animation Tools (for editing the animations):
2. ARC Unpack or ARZ Explorer(for extracting the Creatures.arc files):
3. Art Manager or Arc Encryptor (for repacking the .ANM files back into ARC format):
4. Mesh View (if you want to rename bones or edit the mesh):

II. Extracting the ARC Files:
After you have downloaded the tools, you can extract the game's animation files. They are stored in 3 separate .ARC files for Ragnarok:

Quote
"Titan Quest Anniversary Edition/Resources/Creatures.arc"
"Titan Quest Anniversary Edition/Resources/XPack/Creatures.arc"
"Titan Quest Anniversary Edition/Resources/Xpack2/Creatures.arc"

You can use ARZ Explorer and browse to your chosen ARC, then click "Extract" > "All Files". There is a faster way however, using ARC Unpack - go to your Resources folder and right click on the ARC file > Open With... > Tick "Always open with this program" > Browse to ArcUnpack.exe and click on it. From now on all ARC files will unpack automatically when you click on them.

III. Preparing the Animation Files:
When you have extracted the Creatures folder, go inside your main game Database folder, where database.arz is. Create the following folder directories inside it:

Quote
"Creatures/pc/male/anm"
"Creatures/pc/female/anm"

Now in a new window go again to Resources folder, where you will find the same 2 directories. Copy all .ANM files from the Resources ANM folders and paste them in the ANM folders in the Database.
The purpose of this is the game to load the animations from the Database folder instead those from Resources. Any change you do to them will show immediately ingame.

IV. Fast Previewing Animations
The fastest way to preview any creature animation is renaming it to the base player animation, used in the main menu screen. It is different for male and female:

Quote
"malepc_idle.anm"
"femalepc_idle.anm"

Assuming you've made the steps above, give it a try. Let's say you want to preview the female running animation. In "Database/Creatures/PC/Female/Anm" rename "femalepc_idle.anm" to "femalepc_idle-.anm" (just to preserve it) and rename "femalepc_run.anm" to "femalepc_idle.anm". Launch the game. In the title screen you will see the heroine running instead of standing.

V. Animated Mesh Bones
Ok, now make another experiment. What if you rename "malepc_run.anm" to "femalepc_idle.anm"? Do it, and see what happens. The girl is running, but her ponytail looks frozen and is pointing inside her back. That's because in "malepc_run.anm" there is no Bone_Pony corresponding for the hair of the girl (bones are responsible for the mesh's movement). This is where Animation Composer comes to help.

VI. Adding Missing Bones to Animation
Let's say you want to attach ponytail animation to the male running animation in the example above. Have you noticed that in AE the girl is running like a dude when dual wield thrown weapons? It is because the girl is using male animation. Let's fix the hair on female dual ranged run then :P. Launch AnimationComposer.exe. You will see the following:



Click on left "load animation", browse to the folder where the "malepc_run.anm" is and click on it. We are loading the male animation first, because we want only the hair bones from the female one. Once it is loaded, in the right "load animation" browse to "femalepc_run.anm" and load it. You will see that most of the bones are not checked, the only ones that are checked are the ones we need:



Everything is almost set for combining. The only thing that needs to be done - under the bones section you can see - 4: "Left Footstep" and 16: "Right Footstep". These are callbacks. They are links to commands for sounds, character rotation and effects that activate when this animation is used. When you combine two animations, all the callbacks from them are recorded in the new one. Callbacks with same names are just multiplied, so if we save now, there will be 2x Left Footstep and 2x Right Footstep. Uncheck one of sets, doesnt matter from male of female.
Click on "save animation", browse to the Female/ANM folder and save it as "femalepc_idle.anm" to preview it immediately. Launch the game. The ponytail is no longer hidden in the girl's back. Congratz! You combined your first animation.

VII. Replacing Bones
Next thing you can do with this program is take only chosen bone from one animation and switch it with those from the other. Important thing you need to know is both animations must have the same frame count for this to work properly. You can see the frame count of each animation under the "New Animation" buttons. If the frames are not the same speed, it will freeze the animation of the creature fully or partially. But I'll explain more on this later. Fo now, find two animations with the same speed and load them. For example, you can try replacing different bones from the two running animations in the previous steps. To do it, make sure you uncheck the bones you want to replace and check them on the other animation, which is replacing. Never leave bones checked in both!
Here is an example of replacing animation for the right wrist and right weapon bones:



The possibilities are many, as long as you find the right animations to combine.  Make your all extracted Creatures folders easy to browse, because this is a game of many tries. Also be prepared to restart the game many times, to check every little change, untill it works and looks decent.

VIII. Conbining Animations with Different Frames
While making new combined animations, sometimes you just can't find two that fit AND have the same frames. In the lower part of the tool you can see "freeze shorter", "freeze longer", "repeat shorter" and "crop longer" - they are there for that. Here is an example of animations with different frames:



Freeze Shorter/Longer - It sets all AnimationFrames of a bone to first animationFrame of the bone. This applies to all eligible bones based on shorter or longer.
Repeat Shorter - Increases number of AnimationFrames in shorter bones and repeats existing AnimationFrames till new frame count.
Crop Longer - Reduces the number of AnimationFrames in a longer bones, hence it crops the animation for those bones.

(The tutorial is not complete yet...)
« Last Edit: 10 August 2018, 12:03:07 by nargil66 »

Online nargil66

  • Forum Moderator
  • Full Member
  • *
  • Topic Author
  • Posts: 852
  • Country: bg
  • Karma: +9/-0
  • Gender: Male
    • View Profile
    • Awards
  • Time Zone: ?
Re: [Tutorial] Combining Animations with Animation Composer
« Reply #1 on: 08 August 2018, 02:44:26 »
Updated.

Offline koderkrazy

  • Full Member
  • *
  • Posts: 104
  • Country: 00
  • Karma: +8/-0
    • View Profile
    • Awards
  • Time Zone: ?
Re: [Tutorial] Combining Animations with Animation Composer
« Reply #2 on: 09 August 2018, 06:34:44 »
Wow!  I'll definitely try this. :P

Thanks for thorough documentation!

Offline koderkrazy

  • Full Member
  • *
  • Posts: 104
  • Country: 00
  • Karma: +8/-0
    • View Profile
    • Awards
  • Time Zone: ?
Re: [Tutorial] Combining Animations with Animation Composer
« Reply #3 on: 10 August 2018, 07:57:14 »
About the other two - "repeat shorter" and "crop longer", i haven't tried them yet and cant say what they are for.
These are my findings after looking at code:
Freeze - It sets all AnimationFrames of a bone to first animationFrame of the bone. This applies to all eligible bones based on shorter or longer.
Repeat - Increases number of AnimationFrames in shorter bones and repeats existing AnimationFrames till new frame count.
Corp - Reduces the number of AnimationFrames in a longer bones, hence it crops the animation for those bones.

Online nargil66

  • Forum Moderator
  • Full Member
  • *
  • Topic Author
  • Posts: 852
  • Country: bg
  • Karma: +9/-0
  • Gender: Male
    • View Profile
    • Awards
  • Time Zone: ?
Re: [Tutorial] Combining Animations with Animation Composer
« Reply #4 on: 10 August 2018, 11:55:53 »
Nice finding! I'll test it, may be better than freeze. I'll add it to the OP.

Offline Endymion

  • Member
  • *
  • Posts: 45
  • Country: aq
  • Karma: +1/-0
    • View Profile
    • Awards
  • Time Zone: ?
Re: [Tutorial] Combining Animations with Animation Composer
« Reply #5 on: 02 September 2018, 18:50:25 »
Quote
The fastest way to preview any creature animation is renaming it to the base player animation, used in the main menu screen
You can use Viewer to fast preview any msh & anm asset as long as you have the game directory path (or similarly the path of a built mod directory with custom assets) set in "Additional browse directories" field in AM, Tools/Options.
That includes archived assets too, except for the contents of XPack2 folder which's path still isn't recognized since Ragnarok release.

Online nargil66

  • Forum Moderator
  • Full Member
  • *
  • Topic Author
  • Posts: 852
  • Country: bg
  • Karma: +9/-0
  • Gender: Male
    • View Profile
    • Awards
  • Time Zone: ?
Re: [Tutorial] Combining Animations with Animation Composer
« Reply #6 on: 04 September 2018, 00:10:15 »
Ok, I'll try that, thanks. If it display attachments (e.g. the mount) it will be perfect.

Found this old text file where I've added descriptions for combat animations. Some of them are unused, might come handy to someone.

Spoiler for Hiden:

Good Looking Combat Animations

* = Unused

Bow

femalepc_bow_skill_lethalinjection* - good for bow powershot/aimed shot/multishot

Dual Wield

femalepc_dw_skill_AoE360 - looks good with one handed, dual wield, dual ranged, spear

femalepc_dw_skill_bladeblaze* - fast paced multihit attack vs 1-2 targets (dual wield only)

femalepc_dw_skill_crossblades – dual wield inward cross slash vs 1 target.

femalepc_dw_skill_doublex - 2 targets dw anim.

femalepc_dw_skill_jumpslash - power dw attack 1 target.

femalepc_dw_skill_sweep* - 1-2 targets. Opposite cross slash (outward)

femalepc_dw_skill_wardance* – 360 attack + backflip. Looks good and agile, not bad with spear also.

One Hand

femalepc_onehand_shieldcombo - shield bash + weapon slash or dual holding 1 hand weapon.

femalepc_onehand_skill_aoe360 – same as dwaoe360.

femalepc_onehand_skill_chop* - one hand power att. Melee, no spear.

femalepc_onehand_skill_doubleslash* - diagonal + horizontal slash. 2 targets. Sword, Axe.

femalepc_onehand_skill_hew - jump + power att. Melee, no spear.

femalepc_onehand_skill_phantasmstrike* – look to the sky + power att. Melee, no spear. Probably hammer.

femalepc_onehand_skill_sheildbash - shield hit, outwards.

femalepc_onehand_skill_shieldcharge - shield hit, forward.

femalepc_onehand_skill_shouldercharge - power shield hit, forward.

femalepc_onehand_skill_thrust* - piercing attack, forward. Sword.

femalepc_pickup_kneel* - slower than default.

Spear

femalepc_spear_skill_brace* - hoplite stance, probably good for some spear buff.

femalepc_spear_skill_dualslash - fast, dual hit. Right now used for default attack.

femalepc_spear_skill_tempest* – whirlwind + thrust + step back. Looks cool.

femalepc_spear_skill_triplehit* - Nice one. 3 targets.

Staff

femalepc_staff_skill_spellfury* - good for staff, dual ranged or fist weapon.

femalepc_taunt* - good for battle cry.



« Last Edit: 04 September 2018, 00:15:06 by nargil66 »

Offline Endymion

  • Member
  • *
  • Posts: 45
  • Country: aq
  • Karma: +1/-0
    • View Profile
    • Awards
  • Time Zone: ?
Re: [Tutorial] Combining Animations with Animation Composer
« Reply #7 on: 06 September 2018, 13:55:28 »
Ok, I'll try that, thanks. If it display attachments (e.g. the mount) it will be perfect.
Sure. You can view attach points, hitboxes, bones & skeleton of a mesh and callbacks for an animation.
Spoiler for Hiden:
Furthermore it allows you to create new .mif & .aif for meshes and animations respectively, so you can place attach points and edit physics data where you actually see it, in contrary to something like MeshView.

Tags: