when i load my skeleton.mesh i have character in T pose, so i gues yes they are in the identity transform
Maybe. If the character was modeled in a t pose then the bones might be identity. It depends on how the bones are placed in the modelling program. If you look in the data for the sinbad character, he has roughly a t pose, but his bones aren't at identity. They are all rotated by some amount (probably to match the direction each bone is facing in blender when it's attached to the mesh, except relative to it's parent bone).
so if the the bone1 have (10,30,10) euler angle relative to it's parent the root for exemple
bone will have (10,30,10) relative to bone1 ? or relative to the root (parent of bon1)
bone3 will have (10,30,10) relative to bone2?
If inherit orientation is true, then bone2's world/derived orientation is a combination of bone1's world/derived orientation and bone2's local orientation. Bone3's derived orientation is a combination of bone2's derived orientation with bone3's local orientation.
In your numbers above, if bones 2 and 3 are identity then bone2 is (0,0,0) relative to bone1 and bone3 is (0,0,0) relative to bone2 (and bone1). But their absolute (not relative) orientations would all be (10,30,10).
(Hmm, this is beginning to sound more confusing than it started out as. I shouldn't talk about orientation math just after waking up and before caffeine)
The actual code in ogre (inside of Node::updateFromParentImpl):
Code: Select all
const Quaternion& parentOrientation = mParent->_getDerivedOrientation();
if (mInheritOrientation)
{
// Combine orientation with that of parent
mDerivedOrientation = parentOrientation * mOrientation;
}
else
{
// No inheritance
mDerivedOrientation = mOrientation;
}