Ok so like many others I’ve been wondering for a while if it is possible to export Blender made models into Elemental’s Havok format (.hkb).
Update: I have managed to import my model inside the game and they have even kept the textures that I originally placed using UV Mapping! This wasn't all figured out by me though, Heavenfall has helped inmensely so I want to give him my thanks for taking the time to contribute even though he doesn't even use Blender! Thanks .
Note on UVMap: The UV get flipped when you convert your model, so the only thing you need to do is Rotate your texture file. In my case the only thing I did was open the file with MSPaint and chose "Flip Vertically" and that corrected the texture.
This guide was made in Windows XP and it is for people who have Blender and DON’T have access to 3DSMax or Maya, although I'm willing to bet its somewhat similar.
There are quite a few steps to carry out in order to successfully change Blender’s format and you will need to download a couple of things as well.
Let’s start by pointing you in the direction of the tools/programs I downloaded:
Look for Free to Download – Download Now (File size 445 MB)
You will need to fill out some information before you are allowed to download.
Same here, you will need to fill out some information if you want to download the tools, they ask for your name and what you will download this tool for etc.
Ok so now that you got those two installers start off by installing Autodesk Softimage, simple. Now what I did next was install the Havok tools, look for the Havok installer and run it. Click next, agree to the terms of usage (after reading them!) then I left the Havok Animation and Havok Physics boxes checked as seen below:
Click next and you will be asked what components you wish to install. Since what we downloaded was Softimage, which according to Autodesk was previously known as XSI, we scroll down the list till we see the Xsi check boxes. Now since I wasn’t really sure what exact version of Softimage it was, I checked them all as seen in the next screenshot:
After clicking next it’ll ask you for the tools Destination, I just left it as default as seen below:
Click next and in my case I got a window saying “Could not find a suitable XSI 6.0 installation directory. Please choose one.” Don’t worry, what I did was look for the directory where Softimage was installed and navigated down to the addons folder by clicking the Browse button:
Click ok and before pressing next, I suggest you copy the destination folder path seen bellow. Note that you need to copy the destination folder that applies to YOU, not sure if it neccessarly will be same as mine:
I suggest this because it will say to choose a directory for each of the versions of Xsi we checked at the start. So copy it and you can just paste the destination folder every time it asks you. After doing that you will start installing:
Afterwards it finishes installing that’s it, you should have a Havok folder in your Start>All Programs menu. Also you should have a “HavokContent Tools” folder in your Softimage Addons.
Exporting from Blender
Great so you did all that crap but how do I send a model from Blender to Havok format? Ok so first thing you will need to do is find a model that you want to export from Blender.
After playing around with these tools for 2 days I have discovered that there are different ways that you could export your Blender Model. I have used two formats that have worked so far, Softimage XSI and Autodesk FBX. I'm going to go ahead and recommend that you use Autodesk FBX since by trial and error I have learned that it is the least problematic. Regardless, in this guide I will give examples for both XSI and FBX formats and will label it properly.
So back to Blender, open up whatever model you wish to export and navigate your way to the Export menu by clicking the File > Export menu as shown in the picture below. As you can see I marked both formats that I've had success with so far, but remember I recommend that you use FBX since it will be less problematic from my experience.
Exporting Using Autodesk FBX Format
One thing I learned by trial and error using FBX format is that I needed to export my lights as well as my model. If I didn't the model would appear black ingame. Currently I don't know if there is a workaround this but remember to select the model as well as the lights. When selecting the FBX format as the export you get a screen with some options that looks like this:
You could leave this in the defaults settings and it should work, but I have made it a habit of clicking off "Enable Animation" if I am adding props for the Tile Editor since they don't require to be animated. (And as of the moment of writing this, I'm not sure how to add animations). Another thing to note is the "Selected Objects" and "Scene Objects". The default is Selected Objects so you need to make sure that you click the things you want to export, for example if you have 2 Objects in your scene, a character and a weapon you need to click them both to export them. Also remember to add lights to the export if you dont want your models to be dark when you get them in game.
Next press the "Export" in the lower right of the box and then choose a folder to export to, somewhere you can find it easily (Like the desktop). Now click Export again and Blender should have created the new file at the specified location so remember name of the file and now you can close Blender.
Exporting using Softimage XSI
If you choose to Export as XSI, you do not get a pop up box with options, instead you just specify a folder to which you want to save the file to and just press Export and that should do it. So save the file to a location thats easy to remember and then you can close Blender.
Converting to Havok Format:
Now start up SoftimageModTools 7.5, say no to the update and Close the Netview window. Now to be honest I got no friggin idea how to use this program, I just used it to convert it to Havok format and heres how.
First thing you want to do is Import the model that you just converted to either ".FBX" or “.xsi”. In my case I placed the files in my desktop for easy access. First I'll give an example of importing an ".FBX" file then I'll give the ".XSI" example. Importing these two types of formats is slightly different, let's begin.
Importing FBX file
To import FBX files you will notice that it is different from XSI because instead of going to File>Import you need to go to the "Crosswalk" subfolder as seen in the picture below:
When you click on "Import FBX" another box will open so you can browse for the location of the file you wish to import. In this case I saved it in the desktop so I pressed the Up button in the upper left corner and navigated my way to the desktop as seen below:
Select the file and just click ok, and you get another set of options that you can leave as default and it should work. Here I have also made it a habit to turn off animation for static things like Props for the Tile Editor, just to try and minimize the room for error.
Press OK and yesssss your file should be loaded and you should be able to see it in the 4 viewports! Now Skip the XSI Import and go to the Havok Content Tool section to see the next step.
Importing XSI Format
To import go to the File menu at the top left then scroll down to Import, this will open another nested menu, in this menu look for “dotXSI…” and click that, example below:
For the next screen I deselected Animation because my model didn’t have any animation, but if someone wants to play around with that feel free to let us know:
Press OK! So now that that’s out of the way you need to find the file you exported from Blender, in my case I placed it in the desktop. So to navigate there I pressed the Up button in the upper left corner of the browser window and looked for my Desktop. Example below:
In my case my file was called Bano.xsi, press Ok and viola!, you should get your model in the viewports as seen below:
So tbh I don’t even know how to move the model around, I just know how to zoom in or out so if you don’t know about this program (like me) then don’t touch anything lol.
Havok Content Tools
Now that we successfully loaded the model the format that we chose won't make a difference and the steps will be the same. Next we need to make use of them Havok tools we installed earlier. If you look closely at the top toolbar you can see that there is a Havok Button!:
Now click that and select “Show Havok Toolbar” and you’ll open a toolbar like this:
So what interests us in this Toolbar is "Export and process scene" that is circled in the screenabove. Once we click this we will get the “Havok Content Tools – Filter Manager”. Now I wouldn’t have known wtf to do here if it wasn’t for Heavenfall’s screenshot in the “60 Days later “ thread, so thank you very much for that!
After some trial and error I have learned that the Filter Manager is extremely important and I recommend that you read the Havok User Guide that can be found by going to Start>Programs>Havok>User Guide. This guide contains some tutorial and explains in details all the tools that are found in the Filter Manager. I highly recommend you read it and try the tutorials, thanks to them I managed to import my animations into Havok format, although I haven't gotten them ingame yet. Maybe you can do it and teach me how
Anyways in the next screen what I did was add “Write to Platform” to the configuration set on the right side. If you don’t add anything the tool won’t do nothing, so just add Write to Platform for now. Example inc:
After you click add then it should be in the list in the right and now you need to do an important step if you want to load your models in game. If you highlight "Write to Platform" the format menu on the right will have 2 Options "Tagfile" and "Packfile". The only difference I know is that Tagfile changes the output format to .HKT and Packfile makes it .HKX. I initially ignored these and just left it as tagfile but my models wouldn't load in game with .HKT, and thanks to Heavenfall yet again, he pointed me in the right direction by telling me to use "Packfile" and thats what I did and turned out to be the right thing to do!
Another thing to know is that you can change the destination folder if you click the 3 dots button in the File Name Box. I usually select my desktop for easy of access but in this example I left it as the default path. Example inc:
Now click “Run Configuration” and the file should be created and you should see the destination file in the log window as seen below:
Now you have a newly created havok format model which you can find wherever you might've stored it! Now you can open up that newly created file using Havok Preview Tool to see how it looks like and Importing them to the game just requires you to change somethings in the XML to match for your newly created filename.