I need to make scale transforms to the bones of human figure.
Using dwarf.x as a sample, I opened up the .x file and removed all theanimation data and changed the matrix to
Frame head
{
FrameTransformMatrix
{
3.000000,0.000000,0.000000,0.000000,
0.000000,3.000000,0.000000,0.000000,
0.000000,0.000000,3.000000,0.000000,
0.000000,4.183402,0.000000,1.000000;;
}
Thus producing a scale of 3 times the original size. This works fine.
But I need to do it dynamically from within the code. Using Irrlicht.NET CP
//-----------
AnimatedMesh m = device.SceneManager.GetMesh("dwarf.x");
model = device.SceneManager.AddAnimatedMeshSceneNode(m);
//find bones
SceneNode BONE_Head = model.GetXJointNode("head");
Vector3D scale = BONE_Head.Scale;
scale.X = 2;
scale.Y = 2;
scale.Z = 2;
BONE_Head.Scale = scale;
BONE_Head.RemoveAnimators();
//BONE_Head.Visible = false;
//--------------------------------
This has no effect - the head stays at 3 times the scale. I'm not sure if the head should now be 6 times the size(3*2) or whether the 2 scale in the code will overright the 3 scale in the source file.
Worryingly, remarking back in the BONE_Head.Visible = false; has no effect either.
Does the matrix for each bone get reset (from the scale in the animation data) ? I've removed all the animation data from the .x file and removedAnimators from the head.
Does Irrlicht allow such individual control of bones?
If so, how is runtime scaling of bones supposed to be done?
Regards, Jake
Applying scale to bones
-
- Posts: 2
- Joined: Thu Aug 31, 2006 3:03 pm
- Contact: