Stonehearth Add-On for Blender (Animation)

Absolutely. Tobias had a nice idea for his plugin to create some kind of “archetype” to solve the problem. I simply took this idea and “translated” it into this offsets for Blender. Will save a lot of time, even if the result might not always be 100% perfect.

The very nice bonus is that you might be able to re-use existing animations from Stonehearth if you pay a bit attention on how you design your own models.

Slowly everything comes along nicely :wink:.

2 Likes

it certainly has! i recall when you were first setting out on this “journey”… wasn’t this one of your first forays into programming?

Not into programming, but into Python, Blender and Animation as such. However, I am still far away from becoming a coder (which will never happen).

Update: Uploaded v0.9.1 which allows now to adjust the export of animations based on a second skeleton.

The function works rather simple:

  • Import the skeleton file for a model which you want to animate (e.g. male human).
  • Import the skeleton file for a model for which you also want to use the same animation (e.g. female human).
  • The Add-On will calculate an offset based on both skeleton-files.
  • Create yourr animation.
  • Export the animation without any further settings will result in an animation for the model related to the initial skeleton-file (e.g. male human).
  • Check the option “Export taking offset into account” while you are exporting. This way the Add-On will adjust the animation so it fits the second skeleton-file you’ve imported (e.g. female human).
2 Likes

Obviously a great tool. :thumbsup:
But the changes has to be tiny. It really exaggerate the animation. I made giants using the same animation as normal humans.
For example the shoulders cant be moved. Because the will rotate rather than turn a bit.
Anything that turns around its own centre point (like a hinge) cant be moved , as they will rotate. Would be cool if you could add a way to change the animation to fix this (dont know if possible or not) :blush:

1 Like

Can you upload a video showing the animation for a human and your giant?

So far I have tried it out mostly with the male and female version of a model. It will probably never work 100% and will require some adjustments. However, if the adjustments are that significant I will change the explanation a bit (to male / female instead of re-using animatios for custom models and not to confuse people and promise something the Add-On cannot do). From what I see at the moment the limitation is based on the usage of quaternions. The rotation with quaternions takes the location into account… so could be that with big differences it is simply messing up the animation.

To be honest. I did not try your add-on yet. But since you said it does not change the animation I assumed it only does change the numbers in humans/rigs/(fe)male.json

I will send you the .smod I have.

Ah… so let me try this out by myself and put it on my to-do list. Just started to write a more useful manual… but might have a break at a later point in time :wink:. [quote=“Miturion, post:66, topic:3561”]
… it only does change the numbers in humans/rigs/(fe)male.json
[/quote]
What the new feature does is that it takes the skeleton files into account and calculates the delta. You should be able to move body parts, but as mentioned the rotation based on quaternioins might mess it up. However, will give it a try and we will see…

err, I did not read right. You do change the animation. So neglect the shoulder part :blush:

@voxel_pirate
Add- on is not working for me.

I have blender version 2.69
I downloaded add-on v0.9.1
placed io_stonehearth_091 in blender/2.69/scripts/addons folder
enabled in preferences import/export:Stonehearth Add-on
imported a human male body obj
imported a json -> male skeleton
imported a json -> meta file human

But when I now try to prepare skeleton it does nothing. And the skeletonbutton is red.

Make sure all the bone names are correct (some sometimes get an _0 added onto the end of them) also make sure you delete the camera, light-source and the cube that appear at launch.

2 Likes

@Miturion, if the button is red, there should be some additional debugging information visible if you activate the check-box (at the bottom of the Stonehearth UI). I am just finalizing the manual, the chapter describing the UI (and the debugging section) is already done and can be found here.

Feel free to post the comments you see under the debugging info, so I can help you a bit more. Avairian’s comment might be the most probable… first always check for the naming and amount of meshes / bones.

I see a problem. Blender adds a .001 to the parts. In qubicle it has just the name. Do you know how to remove that?

The issue is that you opened a model twice. Clear the scene and start anew (CTRL-N, Enter, CTRL-A, Delete, Import stuff again).

Blender keeps bone names unique, even when stuff is deleted.

1 Like

thanks that is solved, but it is still giving the same error. I need the bodyposition, root, off-hand and main hand too right? I think that is the problem.

Those are added when you prep the model for animation (importing the meta file)

In the screenshot you have posted the wrong naming caused the issue. As RepeatPan pointed out, this is caused by Blender if you work on a second model and did not “clear the space” (Ctrl + N). On the bones it is as Avairian pointed out. They will be added automatically from the skeleton file and adjusted in their size based on the meta-file.

@Miturion, could you solve the naming issue and post another screenshot of the debugging information?

It is working now thanks, somehow it managed to get a shoulder_0 in there :cry:. Btw the link to the manual is not working. I got there the long way. Looks great.

Ups… that is why the manual is still under construction :wink:.

Sweet, this is gonna be so much help for writing the animation exporter for my program! I love your detailed explanations of everything!

@flux be my guest :wink:. Just let me know if there are any open questions and I can try to help you out on that ones.