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.
Update on Animation!!!!!!
Ok so I can officially say I successfully exported my 2 second animation over to .HKX format! Furthermore I can use the Preview Tool and play it and it looks just like in Blender wooootz. Now I've ran into a new problem, If I try to load this HKX file in game it crashes the game but I believe that is because all the things are together in the same file. (Skeleton, Mesh)
Inspecting Elemental's XML I can see that the Model and the Skeleton are separate files so I figure I need to do the same in this case. But at least so far we know that exporting the animations carry over althought I did notice a weird behavior with the Bones. For some reason my lights received a bone but those are things that I think shouldn't be so hard to iron out (I hope).
How did I figure it out? Well just today I discovered that Havok Content Tools has a Manual that contains some tutorials. These tutorials are really nice and there are example files that can be opened so you can follow along! Another thing I've been doing is using the Export as FBX format instead of XSI and so far its giving me less errors so I think I'll have to update the guide with that soon.
I strongly suggest that if you're interested in learning about Havok that you read that manual, it has plenty of information and examples that will help you moving along with bringing your models into Elemental!
Updated Original Post again.
XSI files kept giving me problems so I remade the guide to include the Autodesk FBX format as the recommended export option. Also kept the original guide so there are two different methods that you could use. Also updated the 2nd post to include a guide on how to add your creations into the game as Props for the Tile Editor. In the future I'll add information on how to add your models into units in game. That won't matter much until we manage to figure out animations though .
If anyone is having trouble following through the guide please post your questions and I'll try to help with what I can. Chances are your questions are the same as someone elses and that should improve the guide and the chances at getting more awesome assets in game . Thanks for reading!
You can still do non-animated objects like weapons and such. They're linked to the _lcf nodes which already have animation (in short; its automatic).
This is awesome. I'm gonna read this in-depth this weekend.
A tip that might help: If you select a window and hit ctrl+alt+printscreen, it captures a screen shot of only that active window. That way you don't have to crop the image. You can just open MS Paint, or your image editor of choice, and paste.
I haven't updated this thread in a while because I have been learning 3DSMax and using Havok through 3DSMax to get my models in-game. After getting some experience with 3DSMax I actually learned how to properly use the Havok Filter Manager and even managed to get a custom animation working for my custom model. If you would like to learn more about that go here.
Bad news is, I don't think that as of this moment its possible to actually import an animation that was made in Blender. Apparently Kumquat is very picky when it comes to these things and I am under the assumption that this engine is looking only for Biped type of skeletons. Even getting things to work from 3DSMax is a pain since the developers exclusively use Maya for getting their animations in game. I dont know if Maya has Bipeds like 3DSMax but that was the only way I managed to get my custom animations working.
Now when I export my animations, they work properly when I try to see them in the Havok Preview Tool so the problem lies with how the engine translates(?) them. Sadly what I think is that if you want to bring in your animations in game you will need to get Maya or 3DSmax, and preferably Maya since thats what the devs use. Static meshes have no problem whatsover though so if you want to add props you could use do it via Blender>XSI.
Maybe when Stardock refines their engine we will be able to use these animations but till then I dont really know what is the exact cause of the problem and unless we get an expert posting here well we will be left guessing. Hope this helps someone out, and of course if anyone discovers a way to get it to work properly please do share .
You only need to press alt+printscreen to do this. The ctrl is unnecessary. Please help save the poor ctrl key some wear and tear.
You do know it is fairly easy to use the in game textures simply by linking to them in the model editing program you are using. Max and maya by making the m the difuse color of the material? (I have been doing this since my first weapon release)
And yes .png format only as you need an alpha channel. As it stand right now, there is strange flipping issues and that needs to be figured out to as why( Flipping the UVW or texture vertically ).
I have now managed to use the correct material ids, and this allows items to use metal color, hair color, clothing color ect.
I have also managed to get an item skinned to the sovereigns skeleton, so it will move with the mesh while in game. This makes making armor a ton easier.
As for animations we need their tools to export. It requires the right bones, and naming convention. I have yet to attempt a full skeleton but have been able to skin a mesh to a skeleton. Allowing myself to use the skinned atachmenttype.
The only way I know how to use the ingame textures is to copy whatever image I plan on using, then flip it vertically. Next I UVWMap my model with this flipped texture and when I put my hkb file in the proper folder the original texture is flipped therefore my UVs will work.
I am still in a learning phase in Max so I honestly don't really know what "making m the diffuse color of the material" means, if you could explain this it would be awesome .
Ok no problem.
Go through the steps as you would normally assign a texture. however in the Map settings of the bitmap portion of the texture you will see a section called Coordinates.
Find Angle, and change the U to 180.
Now unwrap your model onto the flipped image and export normally. This should work.
Go to the material editor click on a texture look for the diffuse section select the little box next to it.
Select bitmap.
Find the in game texture you wish to use.
Now in the new section of the material editor that opened up find the coordinates section and change U to 180. This should flip the texture so you can properly unwrap onto it. Without having to copy any files.
It tried following the steps in reverse to be able to edit the face files. Unfortunately, the havok format seems to go only one way (no import function). I did find that meshes can be viewed by changing their extensions to .hkx.
Thanks 3DGrunge, I'll definitely come back and take a look at this next time I texture something for Elemental !
@Onion
Yeah sadly atm we can't play around with the game's assets since we can only export but not import them . If you have the Havok Preview tool installed you should be able to open the .hkb files without problems. I open them up a lot to use them as reference and see what's going on with them. I think the first time I tried opening them it gave me an error though, so if you're getting this error just press continue (might have to spam it) till it opens it up lol.
There are many great features available to you once you register, including:
Sign in or Create Account