SKYRIM
Paired Animation Export Tutorial by Kentington
Skyrim » Modders resources and tutorials
Added: 30/12/2013 - 03:56AM
Updated: 31/12/2013 - 02:06AM

22 Endorsements

1.1 Latest version

274 Unique D/Ls

355 Total D/Ls

11,378 Total Views

Uploaded by Kentington

Description

Last updated at 2:06, 31 Dec 2013 Uploaded at 3:56, 30 Dec 2013

UPDATE 12/30/2013: I've modified the skeleton export configurations and added appropriate rig files; you should be able to convert most vanilla paired animations to kf properly. Everything has been modified so please replace all existing files with the new versions.

===Paired Animation Export Technique===
v1.1, discovered by Kentington
This technique has successfully produced replacer animations, but is only a day old and is considered very experimental. Please let me know if it does or does not work for you!

Exporting paired animations into Skyrim requires some slight modifications to your scene and to the Havok Content Tools export configuration. I've included two sample scenes with very primitive animations - one human/human pairing which replaces the vanilla hug with a handshake and one human/dragon killmove which features a crude face slap - along with the relevant Havok configurations. You'll doubtless want to make your own, so read on!

The first step involves importing two sets of skeletons - either two humans or a human and a creature, depending on your intended animation - into Max. You'll need to link both skeletons beneath a bone named PairedRoot, then apply the prefix "2_" to the second skeleton's bones, as shown below:

[PairedRoot]
->[NPC]
->->[NPC Root]
->[2_]
->->[2_NPC Root]

Since the NifTools importer will overwrite any bone with a duplicate name, your best bet is to import the second skeleton first and apply the prefix (highlight all bones, click Tools->Rename Objects, check Prefix and enter "2_" into the box). Make sure to change "2_NPC" to "2_" if it exists, or create it if it does not. Move the second skeleton to its desired starting position and orientation, import meshes if desired, and animate the two actors as you normally would.

When you're ready to export, load the included Havok settings (*.HKO files). If you're using a pairing other than human/human or human/dragon, you'll need to clear and re-populate the bones list. Select the Export Paired Animation configuration set, change the output filename under the Write to Platform filter, and run the configuration to produce your animation.

I've also included configurations and rig files to export the paired skeleton - you'll need this if you intend to modify vanilla animations by converting the hkx files to importable kf's with hkxcmd. Unfortunately the order of bone tracks in vanilla paired animations will often vary, so you might need to manually adjust the bone order to match your animation of choice before exporting the skeleton.hkx. Use hkxcmd to convert the animation file to a human-readable XML format in order to find this bone list, then modify my rig files to match the order.

If you intend to modify an existing Havok export configuration, you'll need to make three major changes. Remove any Extract Motion filter, check "Enable Individual Track Sampling" under the Spline Compression filter, and check "Name animation tracks" under the Create Animations filter. If you're interested in why these steps are necessary, I've included a theory section below.

At the moment this process is limited to replacer animations, but (as of 12/29/2013) fore is aware of this new development and hopefully it will be feasible to add support for new paired animations to FNIS.

My technique is new enough that no issues are known, but doubtless some will crop up. Please report any crashes or other glitches that result from paired animation replacers - your report will be much more helpful if it includes the animation file itself along with the version of 3DS Max and Havok Content Tools with which it was created and a list of any animation-related mods you were running. The sample files were created using 3DS Max 2010 and Havok Content Tools 2010.2.0.1, and were tested on a clean Skyrim install.

===The Theory Behind All of This===

Vanilla paired animation files have several crucial differences from unpaired animations. They lack extracted motion, animation tracks have names corresponding to both skeletons' bones, and an hkparam block named "transformOffsets" exists under the hkaSplineCompressedAnimation object. This last block appears to be a reference pose. It is interesting to note that while no paired skeletons exist in the vanilla Skyrim BSAs, all of the data one would need to construct both skeletons is present in a paired animation file. My current working theory is that Skyrim uses this data to construct a temporary skeleton at runtime and treats both actors as one for the duration of the animation.