Assembling the Alien: A rigged model example
I'll take you though the steps of assembling the parts and skeleton for the Alien from Isolation.
First off, you should get the hktcnv.zip file attached. This is the Conversion tool to convert the HKX skeletons to SMD format.
You will also need the SMD import/Export Plugin for Blender. That's available here from Valve's Website:
EDIT: The current Version of Valve's Source tools is broken. Please use the version below (2.2.1) You install it basically the same as io_scene_Aliens plugin.
First off, lets find the model parts for the Alien: Assuming you've unpacked a Level PAK file into '_extractedModels' directory, you can find the rigged models under '_extractedModels\CHARACTERS' and pretty much every Level has the Alien. Sure enough, there's a '_extractedModels\CHARACTERS\ALIEN' directory.
You may also see other models such as 'CONNOR', 'CONNER_FP' etc. These folder names are important, because they are how you find the skeleton. The skeleton file will be named the same as the character folder name. We will get back to that later.
to get to the character's pObject files, we'll have to go deeper. '_extractedModels\CHARACTERS\ALIEN\model0.cs2' brings you to several folders:
[*]'ALIEN': this is the main model. Also the LOD model is included in here.
[*]'COL_ALIEN': This is the physics shape for the alien (low detail). It's also rigged.
[*]'crusher': this is the pieces for the scary little mouth that comes out of the big mouth. (ick)
[*]'SHELL01': These are a couple of layers that go on top of the alien's head for special effects (transparency layers)
[*]'SKULL01': This is the main bony plate on top of the head (under the layers)
You may wonder why some parts are in separate folders. Heck if I know.
So to load the model, you have to load in *all* of the pieces you need to make the complete model, one at a time. Because the main 'ALIEN' Directory has the LOD model as well, you have to be a little careful, and stop loading when you see duplication of parts that you have already loaded.
For the Alien, the first 8 models are the Highest LOD. the Lower LOD is the last 7 parts.
Once you load the 8 parts, you'll have this:
Once you load in the crusher parts and the skull top, the beast will be complete:
The model imports with full, original weights. so to finish this up, we only need a skeleton.
From here on i assume you've unpacked the ANIMATION.PAK into directory '_extractedAnims'. Head there now, into directory
'_extractedAnims\DATA\ANIM_SYS\SKELE\SK'. This is the directory that contains the Skeleton HKX files. Find the one with the name of the model you are working on. In this case "ALIEN".
Now you know why we noted the model name. They should be an exact match. Now we will convert this file using hktcnv.exe
copy the hktcnv.exe and the HXK skeleton file somewhere and drag-drop the HKX onto the EXE. it will give some debug info and create an SMD skeleton file from the HXK.
Now all we have to do is load this SMD into blender using the SMD importer you installed earlier. Bring up the SMD import, but before using it, be sure you set these options correctly:
[*] Be sure "Append to Existing Model" is unchecked. This ensures the skeleton is created as a discrete object.
[*] I also recommend you set Bone Shapes to "Default" but you can use your preference.
Import the SMD, and you'll get the skeleton.
NEW: Because of a change to the importer, you now must Flip the Armature on the X Axis before attaching it to the model. To do this, select the Armature. Then go to Object->Mirror->X Global, and press Enter to apply.
Now to make the skeleton work with the model, all we simply have to do is apply an Armature modifier to each part of the model, so it knows to use the skeleton as it's reference.
First Right click a model part. Then Shift-Right-Click the skeleton. (This keeps both selected, but with the skeleton being selected last). Now press Ctrl-P and pick "Armature Deform" to assign the Armature to that mesh. Do this for all the parts.
Once you've added the Armature modifer to all the parts, you can pose as you like.
-------------------------------
To Clarify one point, we know this is a bit of a pain to assemble, so as you see above this post, Cra0 is working on a program to create an all-inclusive SMD with all the parts and skeleton all integrated into one file. However, this will take some time. So because we know people have been waiting patiently for something, we release this less-elegant solution for now. Enjoy.
