As mentioned in the thread “Modding Stonehearth’s Graphics Test Program”, I have been working on an Stonehearth Add-On for Blender. The idea is to support modders who want to including their own animations into Stonehearth.
Disclaimer: This Add-On is still work in progress and might get broken or change its functionality over time.
Latest Version: “Stonehearth Add-On for Blender v0.9.1”
A manual can be found on the official homepage of the Add-On.
- Settler / Worker (meta_human.json)
- Goblin (meta_goblin.json)
- Mammoth (meta_mammoth.json)
- Rabbit (meta_rabbit.json)
- Sheep (meta_sheep.json)
- Wolf (meta_wolf.json)
You can download an example of an .obj-file here, just in case you cannot export yet from your Qubicle version (will require Home or Master Edition) and you still want to try the Add-On out.
I have also uploaded a short series to explain the functionality and am planning to add further videos to it:
Here a custom made idle animation (starting around 0:20):
Some testing makes me believe that the Add-On is working, i.e. it can export skeleton- and animation-files in the .json-format which is supported by Stonehearth. For sure this format might change, but adjusting some lines in the export-code is pretty easy, so this should be fine.
Now I would like to share the Add-On, invite you all to play around with it and to give me feedback (of course this includes reporting bugs).
For all Maya and 3ds Max users… bad choice .
Let’s start with a short and high-level overview of core-features:
- Export skeleton-file (.json, readable by Stonehearth)
- Export animation-file (.json, readable by Stonehearth)
- Support custom skeleton- and animation-files
- Support “templates” (meta-files) for known skeletons / animations
- Support export of custom “templates” (meta-files)
- Import of existing animations (.json)
- Support export of multi-gender animations (create one, export both).
Workflow with existing model:
From my point of view the process to create an additional animation for an existing model can be split into the following steps. Some of them are very basic, so don’t panic and let me explain :
- Load .qb-file into Qubicle, export it as .obj-file and load it into Blender
- Import an existing skeleton-file to read pivots / origins
- Import “meta-file” to read hierarchy and information about helper bones (if available)
- Adjust pivots / origins, add helper bones and hierarchy and prepare model for animation
- Animate and export
Step one is pretty basic. We need something to animate and the .qb-format which is used in the Graphics Test is a proprietary format of Qubicle so we need something readable by Blender.
Step two makes our lives a bit easier. The skeleton-file we see in Stonehearth includes pivot-values for each “bone” (in Blender pivots are called “origins” and “bones” can be split in either “Armatures” or “Meshes”). By importing the file it can be matched with the loaded .obj-file and the pivots / origins can be adjusted automatically.
Step three is my approach to make the process a bit more user-friendly. After having the pivots / origins adjusted adding some hierarchy between the single “bones” is required and adding some “helper bones” makes the animation process easier (plus the animation-files of Stonehearth require them as it seems). I think it is a good idea to define a format and write this information into a separate file per “type” (e.g. one file for standard settlers, one for rabbits, etc.). This way the code of the Add-On will stay slim and users can add additional info-files for their own models or other models which I will not provide from day one (is a bit of work to do them all).
If you have a meta-file, step four is something like the click on one button or two. All required data was gathered in step two and three. Now this information has to be applied to the model. There is also some preparation required so the the outcome of an animation will be readable for Stonehearth (mostly rotation and location data has to be adjusted). As mentioned, the idea is that the Add-On will take care of this and the user has only to press a button.
Step 5 will be the most time-consuming because here your model is ready to be animated and you need to move the body-parts, add keyframes and to all the animation-magic.
Workflow for custom model:
I plan to also support custom models and animations. The first time you start working on a custom model you will have to define the pivots / origins, helper-bones and hierarchy by yourself. However, once you have this data defined you can export a skeleton file and write a custom “meat-file”. So the second time you start working on your model, the process is similar as for existing models.
I plan to upload also short videos describing the workflow mentioned above for custom models and sharing some background information on the “meta-files”.
Future (possible) features:
- Add shortcut keys to access options for import / export.
- Support of animations with object-interaction.
- Add a written instruction of how to use the Add-On.
- Improve tutorial videos (English and German).
- Add a FAQ with common mistakes.
- Improve usability of UI.
- Improve error handling.
If you have any comments, questions or if you want to share an animation you have been able to create… be my guest! Looking forward to hear about your thoughts!
New link to download the latest build…