Bone roll value and BONE-/ARMATURESPACE?

Scripting in Blender with Python, and working on the API

Moderators: jesterKing, stiv

Post Reply
sgaffga
Posts: 1
Joined: Fri Oct 18, 2002 9:00 am

Bone roll value and BONE-/ARMATURESPACE?

Post by sgaffga »

Hi!

I found that in Blender 2.4 a bone now has BONESPACE and
ARMATURESPACE-Coordinates in head, tail and roll members.

For the head and tail elements it makes sense, but what about the
roll-value? Isn't this just the rotation around the bone itself? And as
it is only a rotation angle I think it should be independend of the
coordinate system it will be applied in..?!

I came up with this when I updated my exporter skript, which exports
complete Bone- and Animation data into my app. For Blender 2.4 I
had to fix some things - mostly adding the "BONESPACE"-Key when
accessing head and tail. But when exporting the roll-Value I had to use the
"ARMATURESPACE"-Value because the Bone space roll-value contains data
which produces wrong animations in my app...

Is this a bug or do I just miss something?

Thanks
Stefan

an-toni
Posts: 0
Joined: Wed Mar 17, 2004 5:20 pm

Post by an-toni »


ascotan
Posts: 0
Joined: Thu May 29, 2003 10:32 pm
Location: Maryland, U.S.

Post by ascotan »

No bug. The internal values stored for roll are localspace to the bone. The roll used in the UI is the parented roll. This is the value you will use in regular animation.

sgaffga
Posts: 1
Joined: Fri Oct 18, 2002 9:00 am

Post by sgaffga »

Hi!

Thanks for your replies! I still can't imagine why a roll value is different
in local space compared to in armature-space, but thats not necessary
anymore :)
I found that Blender now has a "matrix"-property attached to a Bone-object.
This is exactly the matrix I need to calculate the rest-positions of the
bone in my app before applying the animation. Great :) Please don't
remove it in future releases - thanx!

In older Blender versions I had to build this matrix myself, which wasn't
easy to figure out, I had to consult the blender sources.

@Toni: The link you provided is your work, isn't it? I already knw it and
its a really great article that confirmed my thoughts about how bones are
connected and applied on each others rotation. But somehow this article was
very hard to find when not searching the forums...

Greetings
Stefan

Post Reply