need to disconnect bones - animations mess up

Animation tools, character animation, non linear animation

Moderators: jesterKing, stiv

Posts: 2
Joined: Wed Jun 20, 2012 2:11 pm

need to disconnect bones - animations mess up

Postby vidavida » Wed Jun 20, 2012 2:28 pm

How to disconnect/deattach bones from each other and still keep the animations intact?

I'm working on a model format which stores bones relative to root (0,0,0). There is no parenting info.

However, my importer allows to connect and parent bones during import, so the models can easily be posed and animated.
The exporter in it's turn disconnects the connected bones before export.

The problem is if I create animations for the model when the bones are connected, then the animations will mess up when I'll disconnect the bones. That sucks a lot. I thought maybe there's a way to tell Blender to apply the transforms to child bones as well, so when I'll disconnect them, they will move as well and not stay in the same place.

Posts: 894
Joined: Sun Apr 05, 2009 7:42 pm
Location: Germany

Postby CoDEmanX » Wed Jun 20, 2012 6:08 pm

i don't think there is a need for disconnecting bones. If a certain format requires bones stored relative to 0/0/0, all you need to do is to calculate the global coordinates for heads/tails - no disconnecting involved.

Example: you need the tail location in global space of a pose bone

global_coord = Armature.matrix_world * PoseBone.tail

rotation matrices seem more difficult, maybe have a look at stock scripts like bvh export...
I'm sitting, waiting, wishing, building Blender in superstition...

Posts: 2
Joined: Wed Jun 20, 2012 2:11 pm

Postby vidavida » Wed Jun 20, 2012 6:43 pm

I should have been clearer. My script doesn't merely connect and disconnect bones during import and export respectively.

The importer has a "Hardcoded" mode for armature, when the bones are generated from config files, not the matrices in the 3d files. "Hardcoded" mode works for only the generic character skeletons of our (game) format.
Anyway, the exporter then checks if the bones have been connected (by the importer) and if so "hardcodes" the armature data itself.

This is because our limited format.

So I don't think that'll work.

Return to “Animation”

Who is online

Users browsing this forum: No registered users and 0 guests