Skyrim Special Edition

File information

Last updated

Original upload

Created by

Penta-limbed-cat

Uploaded by

ProfJack

Virus scan

Safe to use

About this mod

Instructions and home-made tools on creating paired animations without extra rigging, by combining two individual hkx.

Permissions and credits
Changelogs
中文版在下方

Advertisement: Check out my 
Kaputt




Update

The rotation is working! Make sure your skeleton's COM bone has 'NPC COM' in its name, otherwise the rotation won't work.

Also about weapon animation. It turns out the rig I use named its weapon bone 'WEAPON', whilst in the skeleton it's named 'Weapon'. Therefore I've made convertkf case-insensitive. So make sure no bones in your custom skeleton shares spelling.




This is an step-by-step *experimental* guide on how to make paired animation by combining 2 individual hkx animations.

The whole process can be summed up basically as:
  • Make your animations for two participants each.
  • Make sure that the animations' properly annotated. If not, either add in yourself or use convertkf.
  • Merge 2 animations together using my home-made program.
  • Convert the merged animation to 64bit.
  • Done.
Prerequisite

  • Tools that let you make single actor animation and export as hkx.
  • Text editor.
  • hkxcmd (if you're following this guide it's already in tktk rig's tools/ folder)
  • Individual skeleton file. (Also packed with tktk)
  • Cathedral Assets Optimizer or Creation Kit's own HavokBehaviorPostProcess
  • Knowledge about using command lines.

Step 1. Make your Anims

Follow any guide you find on the web. Like this one by Distar which is what I followed (However I must say it's hardly comprehensible for a non-English speaker. If you can't understand it and know how to use blender, you just need to know there's a run script button at the bottom right corner which outputs hkx files for you)
.

To make/preview 2 animations together, what I do is copy the MaleV5-3.blend file and work on the copy. First I put everything in the scene into a collection and duplicate it, thus getting 2 skeletons I can play with. I then position their pelvis controller to places that I see fit and animate their interaction. After that, I save the file and open MaleV5-3.blend again. Go to file->append, open the file I just saved and go to Action->[The animation you just made (defaultpose_001 etc.)]. Apply the imported action to the armature, adjust duration and export with script.

Root bone position will control where the characters gets teleported and their rotation before AND after the animation if they're not dead. So the recommended practice is to move NPC Root to where the character begins OR where the character ends, depending on when you want the teleportation to happen. If you place root bone at the start position, you'll be teleported back to the same place after the animation, like in vanilla Skyrim. If you place it at the end position, then you'll end up in the right place, but at the start of the killmove your character will be teleported to the end position for a split second and then it'll play as usual. Personally I prefer putting it at the end, because you'll get repositioned anyway if you don't stand in the exact spot at the start.

The two animations must have the same length, as it's checked later.

Step 2. Verify Track Names

You've already got your hkx file, but that's probably not enough. If you were following distar's guide, or using anything that involves hkxcmd, then your output hkx would not have proper annotation for each track. To see if your hkx is annotated, console command

hkxcmd convert your_anim.hkx

It'll create a your_anim-out.hkx file, which is an xml formatted hkx file, as opposed to packed hkx that the game uses. Open it with any text editor. If you see something like <hkparam name="trackName">& # 9216;</hkparam> then it means that track is not named. This is fine for single actor anims, but unacceptable for paired animations where annotation tracks are used to construct a temporary paired skeleton, as explained here



Named



Not Named


What you can do here is replace & # 9216; one by one with correct bone names, and convert the unpacked hkx back to packed hkx using command

hkxcmd convert unpacked.hkx -v WIN32

You can get the bone names by converting your skeleton hkx file the same way you unpack the animation and open the output. Human hkx out from hkxcmd generally need its annotationTracks section be replaced with (97 tracks, 2 omitted by hkxcmd):
Spoiler:  
Show

<hkobject>
<hkparam name="trackName">NPC Root [Root]</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">x_NPC LookNode [Look]</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">x_NPC Translate [Pos ]</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">x_NPC Rotate [Rot ]</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">NPC COM [COM ]</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">NPC Pelvis [Pelv]</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">NPC L Thigh [LThg]</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">NPC L Calf [LClf]</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">NPC L Foot [Lft ]</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">NPC R Thigh [RThg]</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">NPC R Calf [RClf]</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">NPC R Foot [Rft ]</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">SkirtRBone01</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">SkirtRBone02</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">SkirtRBone03</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">SkirtLBone01</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">SkirtLBone02</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">SkirtLBone03</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">SkirtBBone01</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">SkirtBBone02</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">SkirtBBone03</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">SkirtFBone01</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">SkirtFBone02</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">SkirtFBone03</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">NPC Spine [Spn0]</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">NPC Spine1 [Spn1]</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">NPC Spine2 [Spn2]</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">NPC L Clavicle [LClv]</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">NPC L UpperArm [LUar]</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">NPC L Forearm [LLar]</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">NPC R Clavicle [RClv]</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">NPC R UpperArm [RUar]</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">NPC R Forearm [RLar]</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">AnimObjectA</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">AnimObjectB</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">NPC Neck [Neck]</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">NPC Head [Head]</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">NPCEyeBone</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">NPC L Hand [LHnd]</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">NPC R Hand [RHnd]</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">AnimObjectL</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">AnimObjectR</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">Shield</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">Weapon</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">NPC L Pauldron</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">NPC R Pauldron</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">MagicEffectsNode</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">NPC L MagicNode [LMag]</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">NPC R MagicNode [RMag]</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">NPC Head MagicNode [Hmag]</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">NPC L Toe0 [LToe]</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">NPC R Toe0 [RToe]</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">NPC L ForearmTwist1 [LLt1]</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">NPC L ForearmTwist2 [LLt2]</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">NPC L UpperarmTwist1 [LUt1]</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">NPC L UpperarmTwist2 [LUt2]</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">NPC R ForearmTwist1 [RLt1]</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">NPC R ForearmTwist2 [RLt2]</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">NPC R UpperarmTwist1 [RUt1]</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">NPC R UpperarmTwist2 [RUt2]</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">Quiver</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">WeaponAxe</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">WeaponBack</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">WeaponBow</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">WeaponDagger</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">WeaponMace</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">WeaponSword</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">NPC L Finger00 [LF00]</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">NPC L Finger01 [LF01]</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">NPC L Finger02 [LF02]</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">NPC L Finger10 [LF10]</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">NPC L Finger11 [LF11]</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">NPC L Finger12 [LF12]</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">NPC L Finger20 [LF20]</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">NPC L Finger21 [LF21]</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">NPC L Finger22 [LF22]</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">NPC L Finger30 [LF30]</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">NPC L Finger31 [LF31]</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">NPC L Finger32 [LF32]</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">NPC L Finger40 [LF40]</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">NPC L Finger41 [LF41]</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">NPC L Finger42 [LF42]</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">NPC R Finger00 [RF00]</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">NPC R Finger01 [RF01]</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">NPC R Finger02 [RF02]</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">NPC R Finger10 [RF10]</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">NPC R Finger11 [RF11]</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">NPC R Finger12 [RF12]</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">NPC R Finger20 [RF20]</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">NPC R Finger21 [RF21]</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">NPC R Finger22 [RF22]</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">NPC R Finger30 [RF30]</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">NPC R Finger31 [RF31]</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">NPC R Finger32 [RF32]</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">NPC R Finger40 [RF40]</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">NPC R Finger41 [RF41]</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>
<hkobject>
<hkparam name="trackName">NPC R Finger42 [RF42]</hkparam>
<hkparam name="annotations" numelements="0"></hkparam>
</hkobject>


However, if you're using anton's script + hkxcmd that does a BoneKeys → kf → hkx process, then I've made a nifty tool called convertkf.exe. It is named as such because it is hkxcmd's convertkf function with its source code slightly altered and painstakingly recompiled on my machine. To use it, open the tools folder that contains the hkxcmd.exe. If you just finished exporting, there should be a file named empty_new.kf, as well as the humanoid skeleton file skeleton.hkx.


the tool folder


Copy and put these two alongside my convertkf.exe. Command line:

convertkf skeleton.hkx empty_new.kf output.hkx

It'll generate two files: output.hkx & output.hkx.xml. Second one being the xml format hkx which you can open and see yourself if it's properly annotated. What you need for the next step is the first one.

Note: To explain the difference between my code and hkxcmd's convertkf, hkxcmd didn't bother annotating the tracks during kf conversion. Also it omitted several 'unimportant' bones for certain purpose, which I've added back.

Step 3. Merge the Anims

Now that you've got 2 properly anno'd animations, what you want to do next is combine them together using 
wizardry another tool - hkxmerge.exe. Same as before, command line:

hkxmerge attacker_anim.hkx victim_anim.hkx output.hkx

The first two parameters are where your attacker and victim animations are located. For a non-killmove situation, then the second one is the secondary actor, the 'with' in papyrus function PlayIdleWith, whose skeletons will be attached a prefix 2_. The third parameter is where your output file will be generated.


As usual, it'll generate an output.hkx and an output.hkx.xml file. The former is already a perfectly good paired animation that is ready to be used in your game, if you are playing Skyrim LE.

Step 4. Version Conversion 

Don't be too hasty, the output file is still in 32bit. To make it work for SE, convert it again with either Cathedral Assets Optimizer or the bundled HavokBehaviorPostProcess within Bethesda's Creation Kit. Now it's finally done! (You'll have to generate behavior files and create Idle Objects for paired anims, though. There's a guide on LE FNIS, also applicable to Nemesis.)








You can see my work in the image tab. The weapon animation's bugged, but I'm about sure it's only a minor problem and I'll see if I can fix it soon.

Credit
Havok developers
hkxcmd by figment
tktk's rig & Anton's script
andrelo1 for things regarding havok
LE paired anim post

Source
convertkf-new
hkxmerge




FIN





/////////////////////////////////////////////////////////////////////////////////// LANGUAGE BARRIER ////////////////////////////////////////////////////////////////////////////////////////


更新

使用2010版本havok重新编译了,各位不必再搞那一套麻烦的转换程序。

武器动画的问题,tktk的rig里武器骨骼的名字是全大写的WEAPON,实际游戏骨骼是Weapon,所以我修改了convertkf让它不分大小写。如果你用其它骨骼做动画,请确保不会出现重名的问题。






这是一个教你怎么把两个单独的动画拼起来制作处决动画的 *实验性* 教程

大致流程:
  • 给处决两方分别制作动画
  • 确认动画各轨有好好标注
  • 用我手打的程序把两个动画合起来
  • 把合并后动画转换成游戏使用的版本
  • 搞掂
前置需求

  • 动画制作工具和hkx导出工具(不提供)
  • 文本编辑器
  • hkxcmd (如果你看的是 这个教程 那已经包含在tktk的文件里面了 - tools文件夹)
  • 动画双方的骨骼文件. (tktk里也有人类的)
  • Cathedral Assets Optimizer 或者 Creation Kit's 自带的 HavokBehaviorPostProcess
  • 控制台使用知识

Step 1. 制作动画

网上大把,比如Distar的 这个 ,也是我用的(但老实讲真的呕哑嘲哳,听不清的话,如果你知道怎么用Blender,那你基本就只需要知道右下角有个跑脚本按钮能输出hkx)


我自己首先是拷贝一份 MaleV5-3.blend ,把所有内容放进一个collection然后复制一遍,这样场景里就有两个骨骼,之后就可以把它们摆好位置做动画。做好之后保存,再打开 MaleV5-3.blend , 文件->追加,选择刚刚保存的文件然后 动作->[刚做的动画 (比如defaultpose_001)]。把动作应用到骨架上,调整时长再用脚本输出。

两个动画的时长要一致,之后程序会检查。

Step 2. 检查标注

现在得到的hkx还没法直接用来合成。如果你跟的是distar的教程,那你输出的hkx文件就不会有标注。检查有没有标注用这个:

hkxcmd convert your_anim.hkx

输出的your_anim-out.hkx文件是xml格式的hkx,而游戏用的是压缩打包后的。用文本编辑器打开,如果看到 <hkparam name="trackName">& # 9216;</hkparam> 就说明这一轨没有命名。单人动画无所谓,但是双人动画就需要每一轨命名,以便在游戏中临时构建双人的骨骼,原理见此

你要想的话可以一个一个把 & # 9216; 换成骨骼名称,之后再转回打包版hkx,控制台:

hkxcmd convert unpacked.hkx -v WIN32

骨骼名称可以按照上面指令解包骨骼hkx(skeleton.hkx)后打开查看。

不过你要是用的tktk这一套(anton的脚本,BoneKeys转kf转hkx),我也帮写了个小程序convertkf.exe,就是hkxcmd的convertkf代码稍微修改后重新编译。使用方法:打开hkxcmd所在的tools文件夹,刚刚导出完过后这里面应该会有个 empty_new.kf 和人类的骨骼文件 skeleton.hkx。复制到convertkf.exe旁边,控制台输入:

convertkf skeleton.hkx empty_new.kf output.hkx

它会输出 output.hkx 和 output.hkx.xml ,第二个是xml格式的hkx,可以自己打开确认下每轨都标注好了,下面要用的是 第一个

附:我的代码和hkxcmd的区别是,hkxcmd在转换kf动画格式时没给骨骼命名,还有就是省略了一些骨骼。

Step 3. 合并动画

做好两个动画之后就可以用 hkxmerge.exe 把它们合并起来,同上使用控制台:

hkxmerge attacker_anim.hkx victim_anim.hkx output.hkx

前两个参数是处决动画中攻击者和被攻击者的动画文件位置,也就是你在调PlayIdleWith播放双人动画中传的参数,其骨骼会加上前缀 2_ ,第三个参数是输出文件位置。


同样地,输出会有两个:output.hkx 和 output.hkx.xml 。第一个已经可以直接放进游戏里了, 只不过能放的只有传奇版。

Step 4. 转换版本

这个文件还是 32位 的,还得用Cathedral Assets Optimizer 或者CK自带的 HavokBehaviorPostProcess 转成64位,转换完毕就能用了(实际要用还要写行为、搞个idle object就是,LE FNIS 下载区有教程)