Arcane University:Exporting animated statics using ck-cmd
This tutorial will guide you through the export of animated statics to Skyrim using ck-cmd. At this point you should already have your animation created in whatever 3D software you are most comfortable with. This tutorial is meant to help you overcome some of the bumps in the export process.
Setup and export
One of the most common uses for animated static is a door that opens and closes. This is fairly simple. For this section we will use Skywind's puzzle canal door as an example. Each object that you want to move is animated with keyframes. If there are multiple objects that move together, they can be parented to an empty node which contains the animation.
In Blender, there are a few export settings to note, in addition to the usual scale application: Under "Bake Animation," be sure to uncheck both "NLA Strips" and "All Actions." This will ensure that all objects are part of the same animation, rather than split into several. You may also need to set the axes to "Y Forward" if the animations turn on the wrong axis after export.
NifSkope adjustments
After conversion to nif using ck-cmd, delete the "animations" folder that comes out. You can also remove the BSBehaviorGraphExtraData in the nif (these are used for some things like levers and pullbars—behaviors are beyond the scope of this tutorial). If you want multiple animations, for example an "open" and "close," simply export them both separately, and copy and paste the second NiControllerSequence into your working nif file. Renaming them to "Open" and "Close" is all the you need to do for the game to use them as door animations (container animations function exactly the same, incidentally). An animation named "SpecialIdle" will play constantly on a loop.
Collision
At this point you can add collision to any nodes within the nif. It can have any combination of moving and static collision, and can be any type of shape. For moving collisions, make sure the correct flags are set: SET_LOCAL, in addition to the typical ACTIVE and SYNC_ON_UPDATE. In the bhkrigidBody of animated collision, the Layer should be SKYL_ANIMSTATIC, motion system should be BOX_INERTIA, deactivation should be OFF, and quality type should be FIXED. Also be sure the appropriate BSXFlags are enabled.
NOTE: If you want a static with a SpecialIdle animation to have moving collision, be sure to make it an activator in CK. Otherwise the collision will not move, although the visible mesh will. |
Sound
To give the animation an associated sound, add a text key to the controller sequence with the name of the Sound Descriptor form in CK.
Translations
While rotations export fairly easily, translations do not. They require some extra wrangling, otherwise they can crash the game/CK, simply not work, or make the object appear in the wrong place entirely in game.