Sei sulla pagina 1di 4

Introduction

This memo was current on 30/01/2012


This memo descibes a procedure for editing Skyrim animations that are currently
unsupported by Blender NifScripts.
Expect things to change when BlenderNifsScripts eventually support Skyrim.
One section of the installation is practically a copy from the Skyrim

Mod wiki.

Update History
V1.00 Creation
V1.01 Fixed the "Using HKXCMD" error
V1.02 update of edited import_nif.py
Requirements
BSA_unpacker
http://tes.nexusmods.com/downloads/file.php?id=3117
or equivalent
Python 2.6.6 (32-bit)
http://www.python.org/ftp/python/2.6.6/python-2.6.6.msi
PyFFI 2.1.10 (32-bit)
http://sourceforge.net/projects/pyffi/files/pyffi/2.1.10/
Blender Nif Scripts 2.5.8
http://sourceforge.net/projects/niftools/files/blender_nif_scripts/2.5.x/2.5.08/
Nifskope1.1.0-RC
http://niftools.sourceforge.net/wiki/NifSkope
hkxcmd1.3
http://skyrim.nexusmods.com/downloads/file.php?id=1797
Installation
1. Instal Blender 2.49b
select - use the installation directory
2. Instal Python 2.6.6
3. Instal in this order PyFFI 2.1.10 Blender NIF Scripts 2.5.8 NifSkope 1.1.0-RC1
4. Start up Nifskope, with Render > Settings > Startup Version 20.2.0.7 of the
General
5. Make a working folder for hkxcmd in an appropriate place
Preparation
- Editing the Blender Nif scripts export_nif.py
Backup your existing Blender Nif scripts export_nif.py as you are going to use
an edited version. It's edited simply to accommodate Skyrim and will probably br
eak NifScripts for FO3 or Oblivion so make a backup.

(The zipfile should have copies of both original and edited scripts).
path = Blender Foundation\Blender\.blender\scripts\export\export_nif.py
modification points:
- The type of rotation interpolation changes from linear to quadratic. Spec
ifically lines 1505,1506,1507,1525 change from NifFormat.KeyType.LINEAR_KEY to N
ifFormat.KeyType.QUADRATIC_KEY
- Modifications to the targetname using NPC Root [Root] from line 846
if not self.EXPORT_ANIMTARGETNAME:
if "Bip01" in [node.name
for
node in node_kfctrls.iterkeys()]:
targetname = "Bip01"
elif "Bip02" in [node.name
for
node in node_kfctrls.iterkeys()]:
targetname = "Bip02"
else:
targetname = root_block.name
else:
targetname = self.EXPORT_ANIMTARGETNAME
kf_root.target_name = targetname
becomes
if not self.EXPORT_ANIMTARGETNAME:
targetname = "NPC Root [Root]"
else:
targetname = self.EXPORT_ANIMTARGETNAME
Seems to do the trick.
- Editing the Blender NIF Scripts import_nif.py
As with the export_nif.py these changes will bugger you for Oblivion and FO3
so backup.
Path = Blender Foundation\Blender\.blender\scripts\export\import_nif.py
Modification Points
Conversion to HKX seems to bugger up the fps rate that is read whatever you put

so this guy has hardcoded it to 30 fps


@

line 2647
return fps

becomes
@

return 30

It's not pretty but it works.


- Preparatory, get the hkx skeleton
extract the hkx skeleton animation file that you want to play with from Animat
ions.bsa-Skyrim using BSA_Unpacker or equivalent. For example, if you want the h
uman 3rd-person skeleton the target is meshes\actors\character\character assets\
skeleton.hkx
EPreparatory, get the nif skeleton
@extract the nif skeleton as per the hkx. Again, if you want human 3rd-person the
target is meshes\actors\character\character assets\skeleton.nif
@Edit the nif skeleton in nifskope to prep it for import to blender.
To make life easier the example versions should already be included in the zip
file
@ @
@ @View > Block List > Show Blocks in List
@ @
Change
@ @NiHeader User Version 12 11
@ @NiHeader User Version 2 83 34
@ @
Remove Branch BSBoneLODExtraData
@ @if the target is skeleton.nif A
change
@ @NiNode WEAPON to Name Weapon change iBlock Details Name Value right-click Edit St
ring Index Weapon j
@ @NiNode SHIELD to Name Shield
@ @NiNode Quiver to Name Quiver
@ @ are these animation data changes a bug?
@ @
@ @Save as skeleton_fix.nif (like the example)
EPreparation of the hkx animation that you want to edit
@Use your unpacker to grab the animation you want e.g.
@ @meshes\actors\character\animations\mt_jump.hkx
To Work
hkx kf conversion
E put your prepared files into a directory with hkxcmd.exe
@Create your own animations and anim-out folder in the same directory
(Labrat's advice: read the hkxcmd readme for this bit)
So, in your work directory you should have (for example)
hkxcmd.exe, skeleton.hkx and two folders, animations which contains mt_jump.hk
x and anim_out which is currently empty.
in your directory open a command window and run this

@hkxcmd.exe exportkf skeleton.hkx animations anim-out


you should now have a kf in the anim_out folder
@
(You can put as many hkx files as you like in the animations directory and it wi
ll batch convert them)
Importing the kf into Blender
as per usual:
File > Import > Netlmmerse/Gamebryo(.nif & .kf & .egm)
@
@select for import your modified skeleton_fix.nif
@Scale Correction 10.00
@Import Animation ON
@Import Skeleton Only + Parent Selected On
@Keyframe File your target animation e.g. mt_jump.kf
@Realign Bone Tail + Roll On
@
@If everything worked successfully in bone key is displayed.
(Labrat's note: I have no idea what this means)
@
Blender: Fix the Animation
Labrat's precis:
Animate using the usual methods - see a blender tut elsewhere One point of interest. Interpolation may be a bit buggered up for the export to
Skyrim (this is still a bodge up until proper niftools are available), so the wr
iter recommends saving rot/locs as new keys every frame rather than assuming tha
t animation concersion will correctly interpolate between frames. - annoying but
better than nothing I suppose. Blender has already done the interpolation, so i
t is just a question of tapping through each frame, selecing everything hitting
i and saving the rot/loc.
Blender: exporting the kd
File > Export > Netlmmerse/Gamebryo(.nif & .kf & .egm)
@
@
@Fallout 3
@Scale Correction 10.00
@Export Animation Only (.kf) On
@All the other blocks on the upper left corner Off
kf hkx
EPut the kf into your working directory (the one with the hkxcmd.exe) and do the
commandline business
hkxcmd convertkf skeleton.hkx mt_jump_fix.kf mt_jump_fix.hkx
et voila.
Labrat's Conclusion: The original writer uses NMM I don't so don't understand hi
s final advice for mod placement

Potrebbero piacerti anche