This is a tutorial which aims to tell readers how to make new animations and get them working in-game. The tutorial was written for version 1.011 of the original Mount & Blade, but the process will also work for the Warband expansion. I don't pretend that my methods are the best, but if you follow them, you will be able to make and implement your own animations, regardless of your prior modding experience. You can do this even if you know nothing of modding and nothing of animating. I did!
Using the methods detailed in this tutorial, I made the ready positions that can be seen in this thread, as well as the halfsword swing and block on the right side in this video. [And more recently, I used this method to make the animations for my Combat Animation Enhancement Mod for Warband.]
This tutorial is quite long (it took me several days of casual writing), and will be spread over the first 3 posts of this thread.
Part One
Introduction
So, you have no modding or animation ability, no modding or animation software, and no money, and you want to make some animations for Mount&Blade from scratch and get them working in-game? Then this tutorial is for you!
What follows is a set of ridiculously detailed, step by step instructions, written on the assumption that you know nothing about modding and nothing about animating. We will be using FREE software from start to finish (FREE must always be written in capitals). Some of the detail might seem excessive and boring, because I’m writing down every step, and explaining any relevant things that I eventually discovered while learning to get my own animations into M&B. So hopefully you won’t have to deduce as much as I did. Be warned, the process might be a bit fiddly from time to time, but you should be able to do it eventually if you follow the steps. It’s also freaking long, as you can see. It will probably take you several hours, so I’d suggest doing it over a few sessions. If when you're trying it you run into any problems, or something I've left out, let me know and I'll do my best to clear it up for you. Note that this tutorial was written for 1.011, but that it is now possible to make new animations for Warband, and the process is much the same (i.e., if you follow this you'll be able to make and implement animations for Warband). With that out of the way, let's start!
Things you’ll need to have
Firstly, the program I use to make the frames for M&B animations is called Softimage XSI Mod Tool 7.5. It's FREE, as long as you're not making money from the things you make. You can also use other programs (like 3ds Max), but to my knowledge XSI Mod Tool is the best thing for modelling and animating that you can legally get for FREE forever.
NOTE: The forumite Outlawed said that he ran into problems with the 64-bit version of XSI Mod Tool (apparently it does not work correctly with the SMD importer/exporter we will be using). So, avoid the 64-bit version and get another one instead.
You'll also need OpenBRF, the module system and Python. This tutorial will tell you how to set up the module system, and how to get and install Python. You don’t need to know how to use Python, because I’ll tell you exactly what to do with it.
Next you'll need to make your own new module by making a copy of the folder called “Native” in the “Modules” folder. Call your copy “New Animations” or whatever, and put it in the “Modules” folder. When you launch M&B, you should see your module appear in the dropdown list, though obviously it will be identical to Native at this point.
Finally, you’ll need a plug-in for XSI Mod Tool that allows you to import and export “SMD” files. I believe you can get it here. Plugins in XSI are installed in a simple, if slightly unusual, way. What you need to do is open a scene in XSI Mod Tool 7.5 and then drag and drop the file called “ValveSource.6.02.xsiaddon” on to one of the viewports. You will be told that “You need to restart XSI…” to complete the installation. Close, and then re-open XSI. You should now have a dropdown menu at the top of the window called “ValveSource”. It’s from this menu that you will be importing and exporting your animations.
Using OpenBRF to view animations
The first thing to do is make a backup copy of the file called "skeletons.brf", which is in the "CommonRes" folder in your Mount&Blade folder or your Mount & Blade Warband folder if you're modding Warband. Since the "skeletons.brf" file is used by all modules including Native (the standard game), and we'll be editing it (somewhat precariously) using OpenBRF, you really want to have an untouched backup copy of it! If you back this up, it should be impossible for this process to destroy your game - yay.
Right, so now that you've backed up "skeletons.brf", we can open it with OpenBRF and have a look at the animations that are in M&B 1.011. To do this, double click on the "openBrf.exe" that you got when you downloaded OpenBRF. You should get a window with light grey panels on the left, and a darker grey panel on the right. All of the panels will be empty at the moment. Click on "File" at the top left of the window, and select "Open" from the dropdown menu. You should be looking in “CommonRes” (OpenBRF finds this automatically I think, but it's just in your Mount&Blade or Mount&Blade Warband folder). You should see a mass of files ending in ".brf". Double click on “skeletons.brf” to open it.
Make a magical tinkling sound of your choice, and observe that the OpenBRF window is now full of wonders. The panel on the far left should now show a thing called “skel_human”, and have two tabs above it – the open tab is “Skeleton”, and other tab is “Animation”. The panel on the far right displays whatever you currently have selected. Most likely it shows the bones (things which define the shape of the mesh) of M&B’s human skeleton arranged in the T pose. Finally, the middle grey panel should have two boxes – called “Data” and “View”. The “View” box has a dropdown menu labelled “Skin”. Click on the arrow and select “Mesh-set A” (the only option apart from "none"), and the skeleton in the panel on the right should acquire a ghostly set of equipment. Whether you have the skin on or not makes no difference – pick whichever you like for viewing it at the time.
Right, now click on the “Animation” tab near the top left of the window, above the white space on the left panel. I believe the unedited version shows only one animation, called “anim_human”. Left click on this to select it (it’s probably selected already), and you should see the skeleton start doing a bunch of actions. The way the game was made means that all the human animations are together in a single item – the game is told which animation to play when by “interval” numbers which OpenBRF displays in the “Data” box in the middle panel. To see what I mean, right click on “anim_human”, and select “Split via action.txt” – I think it’s the third option from the bottom of the dropdown menu. This operation creates a very large text file (2 gigs), and can take a while. Feel free to skip this step, I'm only getting you to do it because it helps explain the workings of animations in M&B. If you click the wrong thing at this point, just remember to click “Discard” when you close OpenBRF, or you’ll destroy the universe (of M&B). You’ll be discarding any changes you make here, except when you’ve imported a new animation and are happy with it. Never save your work in OpenBRF if you have split "anim_human" - I've never done this but I expect it would break things. To repeat, "anim_human" must remain intact in any saved version of "skeletons.brf" that is in the "CommonRes" folder.
Anyway, after clicking on “Split via action.txt”, a window will open asking you to select the appropriate text file from a module folder (by default I think it will be looking in your “Native” module folder). Double click on “actions.txt” here (or in the new module folder that you created), and you should see that you now have 108 items in the “Animation” tab in the OpenBRF window. A new text file will also be created in the folder alongside "actions.txt" - ignore it. Back in OpenBRF, selecting animations from the list, you’ll see the skeleton on the right performing them in a loop. You can start or stop this, or step through it frame by frame using the buttons in the “View” box, or the “time of frame” thingies in the “Data” box. If you select an attack animation (for example, “anim_human_release_slashright_twohanded”), you’ll see that it has interval information in the “Data” box, which is used to tell the game when to play this animation. (In Python, as you’ll see later, there’s a line that says ‘“anim_human”, 25710, 25734…’ under “release_slashright_twohanded” that tells the game which bit of “anim_human” to play for a two-handed attack from the right.)
We don’t need to insert our animations into this “anim_human” item and use fancy interval numbers to replace things. Instead we’ll be importing our animations (or single animation) so that the list shows “anim_human” as well as whatever else we’ve imported, and then saving the new “skeletons.brf”. That is, we’ll be adding new animations to “skeletons.brf”, leaving “anim_human” untouched. For our module, we’ll then just reference the new animations in Python by name, and by whatever interval numbers we’ve decided to give them. Native will remain completely unchanged, since it won’t be referring to any of our new animations. We’ll be adding things to “skeletons.brf”, then telling our new module to look at them. The things Native looks at will be exactly the same.
Exporting the M&B skeleton so that we can import it into XSI Mod Tool
We’ll export the M&B skeleton from OpenBRF, then import it into XSI Mod Tool. So, open the OpenBRF window and open “skeletons.brf” from “CommonRes”. Look in the “Skeleton” tab, right click on “skel_human”, and click on “Export skeleton with skin” in the dropdown menu. Select “Skin A” when prompted (not that there are other options!), and export it to wherever (I find the desktop is an easy place). Once you have exported it, rename the file so that it ends with “.smd” rather than “.SMD”. For some reason XSI refuses to import SMDs unless the suffix is in lower case (this quirk almost killed me when I first tried importing).
Setting up and controlling the camera in XSI Mod Tool 7.5
Open XSI Mod Tool 7.5. You’ll see the screen divided into 4 camera views. In the top right corners of each view, next to the text that says “Wireframe”, you’ll see a little symbol of a small square inside a bigger square. Click on this. You should now have a single camera view. Now, in the top left of your view, there’s a coloured tab that says “Top” or “Right” or “Camera” or something like that. Click on this and then click on “User” in the dropdown menu. You should now have a nice view of the empty scene with its grid. (This is the view I work with at the moment, but you can manipulate the views however you like and it may help you to use more than one.)
Hold down the “S” key on your keyboard and use the mouse buttons to manipulate the camera. With “S” held down, holding down the left mouse button lets you pan the camera, and holding down the right mouse button lets you rotate it. The mouse wheel zooms the camera, as does pressing the middle mouse button or mouse wheel while holding down "S". Pressing “A” makes the camera look at everything in the scene. Pressing “F” makes the camera look at whatever you have selected.
Importing the M&B human skeleton into XSI Mod Tool 7.5, and manipulating it
Now, in the bar at the top, click on “ValveSource” and then click on “Import SMD…” in the dropdown menu. In the window that pops up, click on the three dots to the right of the field labelled “Import File”. Browse for the SMD that we exported from OpenBRF and double click on it. Now press “OK”. Press “A” to view everything, make another magical tinkling noise, and see that the man from OpenBRF has appeared in the scene with a polygon mesh for skin and a bunch of cross thingies for bones. Note at this point that you can change the appearance of the character – go up to the “Wireframe” dropdown menu at the top right of your view, and check out the various options for viewing the skeleton. After that, set it back to wireframe, and select a bone by clicking on it. If you select the wrong thing, just click, drag and release the mouse in empty space to deselect, or press “Ctrl+Z” on your keyboard (which undoes most things, including selections). With a bone (a cross thingy) selected, tap “C” on your keyboard (without holding it down) and you’ll see some rotation axes appear. The position of the mouse determines how the selected item will be rotated. Hold down the left mouse button and move the mouse and the item will rotate accordingly!
You can also tap “V” to bring up translation axes, or “X” to bring up scaling axes. You’ll notice again that scaling, rotation and translation depend on where the mouse is pointing. For example, you can translate objects on one axis, within the plane of two axes, within the plane of your view, or freely through all axes. Similar variations apply to the other transformations. You'll notice that translation and scaling don't work on the bones of this skeleton, except on the so-called "abdomen" bone.
Note at this point that the mesh (the wireframe stuff) may deform strangely when you rotate a bone – vertices in unrelated areas of the mesh might move and make the mesh look jagged. Also, when you select the mesh, you’ll see lots of coloured dots on the surface, at the corners of the polygons. Technically this doesn't matter - it's just ugly and might make it a bit trickier to picture how the character will look in-game. To fix this, you can try exporting the skeleton (with skin) from OpenBRF again, and importing the new export into XSI Mod Tool. For some reason I had to try several times before it would deform properly. You’ll know whether it’s deforming properly or not just by looking. A working mesh also shouldn’t show any coloured dots when you select it. Save the scene once you find a skeleton that works so that you can just open it again without having to export and import. (But to restate, it's fine to use a dodgy mesh - it shouldn't affect the animation since no mesh-related data is exported later.) I've also uploaded a basic scene with a properly-deforming mesh here.
Note (added 27.7.11) - It turns out that the jaggedness is caused by a problem with the ValveSource SMD importer. I believe there is currently no way to fix the importer, but you can solve part of the jaggedness problem by re-rigging the mesh. To do this, click on the coloured drop-down menu near the top-left of the screen (which is probably labelled "Model" at this point), and select "Animate". Then, select the mesh, click on "Point" in the top-left to make the vertices selectable, and select the vertex that is deforming incorrectly. Then, in the panel on the left, click "Envelope" then "Reassign locally". Click on the bone that you want the vertex to track with, and then right click in an empty spot to confirm the assignment. The vertex should snap into its proper place and then move according to the bone you selected. I think this is only an approximate fix (you'll still get some strange deformation), but it will stop the worst of the jaggedness and you should have no problems animating after making this correction.
Animating in XSI Mod Tool
So we have the skeleton in our scene, we know how to move the camera, and we know how to pose the skeleton. To make an animation then, all we need to do is pose the skeleton for each frame of the animation that we want to make. For attack animations, we’ll only need between 5 and 10 frames, because XSI Mod Tool (and the game itself) will fill in the gaps and blend the frames together to make a smooth movement. More frames will allow you to define the movement more thoroughly.
So let’s make some frames. You’ll see at the bottom of the window there’s a timeline-looking thing. By default I think it goes from 1 to 100. There’s a red vertical line at 1. You can click on this red line and drag it around on the timeline. To see what this is for, set the timeline to frame 1, select the entire skeleton and mesh, press “C” to bring up the rotation axes (but don’t actually rotate anything), then press “K” to set a keyframe. When you select items, red squares will appear on the timeline to show where information for that item has been keyed. By pressing “K” with the rotation axes up, we’ve set this pose (the T pose) for the first frame. Next, move the red vertical in the timeline all the way over to the 100th frame. Now, select a single bone (I suggest a hip, knee, or elbow), press “C” to bring up the rotation axes, rotate the bone about 90 degrees, then press “K” to set another keyframe. Now, press the play button that’s beneath the timeline, make the obligatory magical tinkling noise, and watch the character move smoothly between the two positions.
In fact we won’t be making the animation in such a way that it looks smooth when viewed in XSI Mod Tool. We just want the information for maybe 5 or 10 frames – what those frames look like when played in XSI Mod Tool is irrelevant. The frames we make here will be fed to the game in an SMD, along with information about the timing of those frames so that the game can blend them together properly. For example, for an animation with 7 keyframes, our timeline in XSI Mod Tool would be only 7 frames long, and we would fiddle with the SMD animation file after exporting it to make those frames blend together with proper timing in-game. This is not as difficult as it sounds, and I’ll tell you exactly how to do it later.
When you're actually making an animation, remember a few things. First, you must bring up the rotation, translation, or scaling axes before you can make a keyframe (it will "key" the information for whichever transform you are doing). Second, always key the position you’re working on before moving along the timeline to work on a new frame - the program won't just remember where you left things if you don't key. Third, save your scene all the freaking time, and use multiple saves as you make progress so that you have points to fall back to. When animating, I usually go to the frame I'm doing in the timeline, pose the whole skeleton as I want for that frame, select the whole skeleton (or even everything in the scene), press "C" and then "K" to key rotation information for everything, then press "V" and then "K" to key translation information for everything. This way I don't accidentally move the timeline without keying something and lose my work. Also, I save at the start when I have set up the scene for animating, then I make a "working" save that I can just overwrite to keep updated regularly, and then I also make permanent saves at various milestones (after finishing each frame for example). This method isn't appropriate for all kinds of animation work, and may sound excessive. But, I tell you now, it really makes you want to cry sometimes when you lose 20 minutes of careful posing just because you forgot to key something before moving the timeline, or because XSI crashed instantly to desktop without warning (which it does to me from time to time).
Exporting an SMD animation file from OpenBRF
Shifting gears for a moment, let’s look at SMD files. Open OpenBRF, and open “skeletons.brf”. Click on the “Animation” tab, right click on “anim_human” and then split it via the “actions.txt” file like before. Now, scroll down the list of animations until you find one called “anim_human_ready_slashright_twohanded”. This is the animation that plays when you hold down the attack button for an attack from your right side with a two-handed weapon. Right click on this in the list, and then click on “Export animation” in the dropdown menu and send the file wherever you like (I recommend the desktop). Remember to “Discard” the changes when you close OpenBRF, because we need anim_human to remain intact in any saved version of “skeletons.brf”.
Continued in the next post...
Using the methods detailed in this tutorial, I made the ready positions that can be seen in this thread, as well as the halfsword swing and block on the right side in this video. [And more recently, I used this method to make the animations for my Combat Animation Enhancement Mod for Warband.]
This tutorial is quite long (it took me several days of casual writing), and will be spread over the first 3 posts of this thread.
Part One
Introduction
So, you have no modding or animation ability, no modding or animation software, and no money, and you want to make some animations for Mount&Blade from scratch and get them working in-game? Then this tutorial is for you!
What follows is a set of ridiculously detailed, step by step instructions, written on the assumption that you know nothing about modding and nothing about animating. We will be using FREE software from start to finish (FREE must always be written in capitals). Some of the detail might seem excessive and boring, because I’m writing down every step, and explaining any relevant things that I eventually discovered while learning to get my own animations into M&B. So hopefully you won’t have to deduce as much as I did. Be warned, the process might be a bit fiddly from time to time, but you should be able to do it eventually if you follow the steps. It’s also freaking long, as you can see. It will probably take you several hours, so I’d suggest doing it over a few sessions. If when you're trying it you run into any problems, or something I've left out, let me know and I'll do my best to clear it up for you. Note that this tutorial was written for 1.011, but that it is now possible to make new animations for Warband, and the process is much the same (i.e., if you follow this you'll be able to make and implement animations for Warband). With that out of the way, let's start!
Things you’ll need to have
Firstly, the program I use to make the frames for M&B animations is called Softimage XSI Mod Tool 7.5. It's FREE, as long as you're not making money from the things you make. You can also use other programs (like 3ds Max), but to my knowledge XSI Mod Tool is the best thing for modelling and animating that you can legally get for FREE forever.
NOTE: The forumite Outlawed said that he ran into problems with the 64-bit version of XSI Mod Tool (apparently it does not work correctly with the SMD importer/exporter we will be using). So, avoid the 64-bit version and get another one instead.
You'll also need OpenBRF, the module system and Python. This tutorial will tell you how to set up the module system, and how to get and install Python. You don’t need to know how to use Python, because I’ll tell you exactly what to do with it.
Next you'll need to make your own new module by making a copy of the folder called “Native” in the “Modules” folder. Call your copy “New Animations” or whatever, and put it in the “Modules” folder. When you launch M&B, you should see your module appear in the dropdown list, though obviously it will be identical to Native at this point.
Finally, you’ll need a plug-in for XSI Mod Tool that allows you to import and export “SMD” files. I believe you can get it here. Plugins in XSI are installed in a simple, if slightly unusual, way. What you need to do is open a scene in XSI Mod Tool 7.5 and then drag and drop the file called “ValveSource.6.02.xsiaddon” on to one of the viewports. You will be told that “You need to restart XSI…” to complete the installation. Close, and then re-open XSI. You should now have a dropdown menu at the top of the window called “ValveSource”. It’s from this menu that you will be importing and exporting your animations.
Using OpenBRF to view animations
The first thing to do is make a backup copy of the file called "skeletons.brf", which is in the "CommonRes" folder in your Mount&Blade folder or your Mount & Blade Warband folder if you're modding Warband. Since the "skeletons.brf" file is used by all modules including Native (the standard game), and we'll be editing it (somewhat precariously) using OpenBRF, you really want to have an untouched backup copy of it! If you back this up, it should be impossible for this process to destroy your game - yay.
Right, so now that you've backed up "skeletons.brf", we can open it with OpenBRF and have a look at the animations that are in M&B 1.011. To do this, double click on the "openBrf.exe" that you got when you downloaded OpenBRF. You should get a window with light grey panels on the left, and a darker grey panel on the right. All of the panels will be empty at the moment. Click on "File" at the top left of the window, and select "Open" from the dropdown menu. You should be looking in “CommonRes” (OpenBRF finds this automatically I think, but it's just in your Mount&Blade or Mount&Blade Warband folder). You should see a mass of files ending in ".brf". Double click on “skeletons.brf” to open it.
Make a magical tinkling sound of your choice, and observe that the OpenBRF window is now full of wonders. The panel on the far left should now show a thing called “skel_human”, and have two tabs above it – the open tab is “Skeleton”, and other tab is “Animation”. The panel on the far right displays whatever you currently have selected. Most likely it shows the bones (things which define the shape of the mesh) of M&B’s human skeleton arranged in the T pose. Finally, the middle grey panel should have two boxes – called “Data” and “View”. The “View” box has a dropdown menu labelled “Skin”. Click on the arrow and select “Mesh-set A” (the only option apart from "none"), and the skeleton in the panel on the right should acquire a ghostly set of equipment. Whether you have the skin on or not makes no difference – pick whichever you like for viewing it at the time.
Right, now click on the “Animation” tab near the top left of the window, above the white space on the left panel. I believe the unedited version shows only one animation, called “anim_human”. Left click on this to select it (it’s probably selected already), and you should see the skeleton start doing a bunch of actions. The way the game was made means that all the human animations are together in a single item – the game is told which animation to play when by “interval” numbers which OpenBRF displays in the “Data” box in the middle panel. To see what I mean, right click on “anim_human”, and select “Split via action.txt” – I think it’s the third option from the bottom of the dropdown menu. This operation creates a very large text file (2 gigs), and can take a while. Feel free to skip this step, I'm only getting you to do it because it helps explain the workings of animations in M&B. If you click the wrong thing at this point, just remember to click “Discard” when you close OpenBRF, or you’ll destroy the universe (of M&B). You’ll be discarding any changes you make here, except when you’ve imported a new animation and are happy with it. Never save your work in OpenBRF if you have split "anim_human" - I've never done this but I expect it would break things. To repeat, "anim_human" must remain intact in any saved version of "skeletons.brf" that is in the "CommonRes" folder.
Anyway, after clicking on “Split via action.txt”, a window will open asking you to select the appropriate text file from a module folder (by default I think it will be looking in your “Native” module folder). Double click on “actions.txt” here (or in the new module folder that you created), and you should see that you now have 108 items in the “Animation” tab in the OpenBRF window. A new text file will also be created in the folder alongside "actions.txt" - ignore it. Back in OpenBRF, selecting animations from the list, you’ll see the skeleton on the right performing them in a loop. You can start or stop this, or step through it frame by frame using the buttons in the “View” box, or the “time of frame” thingies in the “Data” box. If you select an attack animation (for example, “anim_human_release_slashright_twohanded”), you’ll see that it has interval information in the “Data” box, which is used to tell the game when to play this animation. (In Python, as you’ll see later, there’s a line that says ‘“anim_human”, 25710, 25734…’ under “release_slashright_twohanded” that tells the game which bit of “anim_human” to play for a two-handed attack from the right.)
We don’t need to insert our animations into this “anim_human” item and use fancy interval numbers to replace things. Instead we’ll be importing our animations (or single animation) so that the list shows “anim_human” as well as whatever else we’ve imported, and then saving the new “skeletons.brf”. That is, we’ll be adding new animations to “skeletons.brf”, leaving “anim_human” untouched. For our module, we’ll then just reference the new animations in Python by name, and by whatever interval numbers we’ve decided to give them. Native will remain completely unchanged, since it won’t be referring to any of our new animations. We’ll be adding things to “skeletons.brf”, then telling our new module to look at them. The things Native looks at will be exactly the same.
Exporting the M&B skeleton so that we can import it into XSI Mod Tool
We’ll export the M&B skeleton from OpenBRF, then import it into XSI Mod Tool. So, open the OpenBRF window and open “skeletons.brf” from “CommonRes”. Look in the “Skeleton” tab, right click on “skel_human”, and click on “Export skeleton with skin” in the dropdown menu. Select “Skin A” when prompted (not that there are other options!), and export it to wherever (I find the desktop is an easy place). Once you have exported it, rename the file so that it ends with “.smd” rather than “.SMD”. For some reason XSI refuses to import SMDs unless the suffix is in lower case (this quirk almost killed me when I first tried importing).
Setting up and controlling the camera in XSI Mod Tool 7.5
Open XSI Mod Tool 7.5. You’ll see the screen divided into 4 camera views. In the top right corners of each view, next to the text that says “Wireframe”, you’ll see a little symbol of a small square inside a bigger square. Click on this. You should now have a single camera view. Now, in the top left of your view, there’s a coloured tab that says “Top” or “Right” or “Camera” or something like that. Click on this and then click on “User” in the dropdown menu. You should now have a nice view of the empty scene with its grid. (This is the view I work with at the moment, but you can manipulate the views however you like and it may help you to use more than one.)
Hold down the “S” key on your keyboard and use the mouse buttons to manipulate the camera. With “S” held down, holding down the left mouse button lets you pan the camera, and holding down the right mouse button lets you rotate it. The mouse wheel zooms the camera, as does pressing the middle mouse button or mouse wheel while holding down "S". Pressing “A” makes the camera look at everything in the scene. Pressing “F” makes the camera look at whatever you have selected.
Importing the M&B human skeleton into XSI Mod Tool 7.5, and manipulating it
Now, in the bar at the top, click on “ValveSource” and then click on “Import SMD…” in the dropdown menu. In the window that pops up, click on the three dots to the right of the field labelled “Import File”. Browse for the SMD that we exported from OpenBRF and double click on it. Now press “OK”. Press “A” to view everything, make another magical tinkling noise, and see that the man from OpenBRF has appeared in the scene with a polygon mesh for skin and a bunch of cross thingies for bones. Note at this point that you can change the appearance of the character – go up to the “Wireframe” dropdown menu at the top right of your view, and check out the various options for viewing the skeleton. After that, set it back to wireframe, and select a bone by clicking on it. If you select the wrong thing, just click, drag and release the mouse in empty space to deselect, or press “Ctrl+Z” on your keyboard (which undoes most things, including selections). With a bone (a cross thingy) selected, tap “C” on your keyboard (without holding it down) and you’ll see some rotation axes appear. The position of the mouse determines how the selected item will be rotated. Hold down the left mouse button and move the mouse and the item will rotate accordingly!
You can also tap “V” to bring up translation axes, or “X” to bring up scaling axes. You’ll notice again that scaling, rotation and translation depend on where the mouse is pointing. For example, you can translate objects on one axis, within the plane of two axes, within the plane of your view, or freely through all axes. Similar variations apply to the other transformations. You'll notice that translation and scaling don't work on the bones of this skeleton, except on the so-called "abdomen" bone.
Note at this point that the mesh (the wireframe stuff) may deform strangely when you rotate a bone – vertices in unrelated areas of the mesh might move and make the mesh look jagged. Also, when you select the mesh, you’ll see lots of coloured dots on the surface, at the corners of the polygons. Technically this doesn't matter - it's just ugly and might make it a bit trickier to picture how the character will look in-game. To fix this, you can try exporting the skeleton (with skin) from OpenBRF again, and importing the new export into XSI Mod Tool. For some reason I had to try several times before it would deform properly. You’ll know whether it’s deforming properly or not just by looking. A working mesh also shouldn’t show any coloured dots when you select it. Save the scene once you find a skeleton that works so that you can just open it again without having to export and import. (But to restate, it's fine to use a dodgy mesh - it shouldn't affect the animation since no mesh-related data is exported later.) I've also uploaded a basic scene with a properly-deforming mesh here.
Note (added 27.7.11) - It turns out that the jaggedness is caused by a problem with the ValveSource SMD importer. I believe there is currently no way to fix the importer, but you can solve part of the jaggedness problem by re-rigging the mesh. To do this, click on the coloured drop-down menu near the top-left of the screen (which is probably labelled "Model" at this point), and select "Animate". Then, select the mesh, click on "Point" in the top-left to make the vertices selectable, and select the vertex that is deforming incorrectly. Then, in the panel on the left, click "Envelope" then "Reassign locally". Click on the bone that you want the vertex to track with, and then right click in an empty spot to confirm the assignment. The vertex should snap into its proper place and then move according to the bone you selected. I think this is only an approximate fix (you'll still get some strange deformation), but it will stop the worst of the jaggedness and you should have no problems animating after making this correction.
Animating in XSI Mod Tool
So we have the skeleton in our scene, we know how to move the camera, and we know how to pose the skeleton. To make an animation then, all we need to do is pose the skeleton for each frame of the animation that we want to make. For attack animations, we’ll only need between 5 and 10 frames, because XSI Mod Tool (and the game itself) will fill in the gaps and blend the frames together to make a smooth movement. More frames will allow you to define the movement more thoroughly.
So let’s make some frames. You’ll see at the bottom of the window there’s a timeline-looking thing. By default I think it goes from 1 to 100. There’s a red vertical line at 1. You can click on this red line and drag it around on the timeline. To see what this is for, set the timeline to frame 1, select the entire skeleton and mesh, press “C” to bring up the rotation axes (but don’t actually rotate anything), then press “K” to set a keyframe. When you select items, red squares will appear on the timeline to show where information for that item has been keyed. By pressing “K” with the rotation axes up, we’ve set this pose (the T pose) for the first frame. Next, move the red vertical in the timeline all the way over to the 100th frame. Now, select a single bone (I suggest a hip, knee, or elbow), press “C” to bring up the rotation axes, rotate the bone about 90 degrees, then press “K” to set another keyframe. Now, press the play button that’s beneath the timeline, make the obligatory magical tinkling noise, and watch the character move smoothly between the two positions.
In fact we won’t be making the animation in such a way that it looks smooth when viewed in XSI Mod Tool. We just want the information for maybe 5 or 10 frames – what those frames look like when played in XSI Mod Tool is irrelevant. The frames we make here will be fed to the game in an SMD, along with information about the timing of those frames so that the game can blend them together properly. For example, for an animation with 7 keyframes, our timeline in XSI Mod Tool would be only 7 frames long, and we would fiddle with the SMD animation file after exporting it to make those frames blend together with proper timing in-game. This is not as difficult as it sounds, and I’ll tell you exactly how to do it later.
When you're actually making an animation, remember a few things. First, you must bring up the rotation, translation, or scaling axes before you can make a keyframe (it will "key" the information for whichever transform you are doing). Second, always key the position you’re working on before moving along the timeline to work on a new frame - the program won't just remember where you left things if you don't key. Third, save your scene all the freaking time, and use multiple saves as you make progress so that you have points to fall back to. When animating, I usually go to the frame I'm doing in the timeline, pose the whole skeleton as I want for that frame, select the whole skeleton (or even everything in the scene), press "C" and then "K" to key rotation information for everything, then press "V" and then "K" to key translation information for everything. This way I don't accidentally move the timeline without keying something and lose my work. Also, I save at the start when I have set up the scene for animating, then I make a "working" save that I can just overwrite to keep updated regularly, and then I also make permanent saves at various milestones (after finishing each frame for example). This method isn't appropriate for all kinds of animation work, and may sound excessive. But, I tell you now, it really makes you want to cry sometimes when you lose 20 minutes of careful posing just because you forgot to key something before moving the timeline, or because XSI crashed instantly to desktop without warning (which it does to me from time to time).
Exporting an SMD animation file from OpenBRF
Shifting gears for a moment, let’s look at SMD files. Open OpenBRF, and open “skeletons.brf”. Click on the “Animation” tab, right click on “anim_human” and then split it via the “actions.txt” file like before. Now, scroll down the list of animations until you find one called “anim_human_ready_slashright_twohanded”. This is the animation that plays when you hold down the attack button for an attack from your right side with a two-handed weapon. Right click on this in the list, and then click on “Export animation” in the dropdown menu and send the file wherever you like (I recommend the desktop). Remember to “Discard” the changes when you close OpenBRF, because we need anim_human to remain intact in any saved version of “skeletons.brf”.
Continued in the next post...