{"id":127,"date":"2012-02-24T21:50:21","date_gmt":"2012-02-24T21:50:21","guid":{"rendered":"http:\/\/blog.daft-ideas.co.uk\/?p=127"},"modified":"2012-02-24T22:06:10","modified_gmt":"2012-02-24T22:06:10","slug":"making-of-clear-skies-3-animation-perspective-part-2","status":"publish","type":"post","link":"https:\/\/blog.daft-ideas.co.uk\/2012\/02\/24\/making-of-clear-skies-3-animation-perspective-part-2\/","title":{"rendered":"Making of Clear Skies 3: Animation Perspective Part 2."},"content":{"rendered":"
This post is going to quickly go over the two methods I used to actually get the animations into Source.<\/p>\n
Ipisoft exports to the BVH format, which is one of the standard motion capture formats. It stands for Biovision\u00a0Hierarchy, and it was developed by Biovision, who went bust a while ago. This is the best format in my opinion, because it is very easy to read and parse.<\/p>\n
A BVH file has two parts:<\/p>\n
The\u00a0hierarchy\u00a0starts with the ROOT node, which for humans is usually the centre of gravity. The hierarchy\u00a0itself is recursive: each node contains data relevant to it (like position, rotation), and further subnodes.<\/p>\n
The position of the node is defined by it’s offset from it’s parent, not an absolute position in the world. If it was absolute, it wouldn’t move when it’s parent moved. You’d move your arm, but your hand would remain on the desk.<\/p>\n
The rotation of the node is defined as the rotation relative to it’s parent.<\/p>\n
There exist a massive amount of tools for reading and manipulating this data, so I didn’t really need to write another one. It was a good job too – I was struggling with the XSI Mod tool.<\/p>\n
XSI Softimage is the suite that Valve origianlly used for modelling & animating Half-Life 2. In 2004, when Half-Life 2 was released, XSI had a free, cut down version of the tool for Modders. It was called the XSI Mod Tool.<\/p>\n
Valve also created a whole bunch of addons for it, to export stuff to the Source Engine.<\/p>\n
Since Softimage got bought out by Autodesk, the free versions are less and less useful, the tools are out of date and features get locked off. You can find the old versions around, but it’s difficult and they are not supported much.<\/p>\n
I’ll do a quick tutorial on it here anyway.<\/p>\n
You’ll need to find the ValveSource addons for Softimage, which are either on the net, or in the Source SDK folder.<\/p>\n
Open the XSI Scene file “SDK_Male_reference.scn” which can be found in “C:\\Program Files (x86)\\Steam\\steamapps\\USERNAME\\sourcesdk_content\\hl2\\modelsrc\\humans_sdk\\XSI_scn_files” or similiar.<\/p>\n
You should get this chap:<\/p>\n
<\/p>\n
<\/a><\/p>\n He’s very low in IQ and poly count, but he’s lovable just the same, because he’s ideal for testing stuff out.<\/p>\n Press “8” on the keyboard to bring up the scene expolere, and middle click on the “Valve Biped” node.<\/p>\n <\/a><\/p>\n Middle clicking recursivley selects everything inside the node.<\/p>\n Go to Animate->MOTOR->Tag Rig<\/p>\n This will bring up the tag rig dialogue. It defaults to a human biped, and has \u00a0entries for all the major bones.<\/p>\n <\/a><\/p>\n You need to go through each diagloue, click the bone name button, eg “cog”, and select the corresponding bone on the human skeleton.<\/p>\n Here is an example:<\/p>\n <\/a><\/p>\n I’ve chosen centre of gravity (cog) as\u00a0Bip01_Pelvis. Most of them are easy enough to work out, but get it wrong and the animation will be….funky.<\/p>\n Once you’ve finished tagging the rig, SAVE it…it will save you a vast amount of time.<\/p>\n You then need your BVH.<\/p>\n There is a large library of free ones here.<\/a><\/p>\n Go to Animate->MOTOR->Mocap to Rig<\/p>\n You’ll get this dialgoue:<\/p>\n <\/a><\/p>\n You need to<\/p>\n I’ve uploaded my Valve Biped tag file and by BVH tag file here, as well as a mocap file I took from the site mentioned earlier. Link:\u00a0http:\/\/daft-ideas.co.uk\/rnd\/Clear%20Skies\/mocapeg\/<\/a><\/span><\/span><\/p>\nTagging the BVH rig<\/h3>\n
\n
Now, by the power of greyskull<\/strong>, you’ll animate the Valve Biped:<\/span><\/h1>\n