Microsoft .x file understanding problem

Started by
3 comments, last by a303274454 8 years, 5 months ago

Hello,

I get a problem when reading the .x file used in C++. I think I know the concept of the skeleton

M(final) = M(skinWeight) * M(toRootBone) * M(toRootAnimation);

But I can't understand the skeleton hierarchy of .x File .

Such like this:


SkinWeights
{
   FrameTransformMatrix
 {

}
}

Frame Bip01 {
 

 FrameTransformMatrix {
  0.000000,0.000000,-0.147123,0.000000,0.000000,0.147123,0.000000,0.000000,0.147123,0.000000,0.000000,0.000000,0.200000,31.119664,0.000000,1.000000;;
 }

 Frame Bip01_Pelvis {
  

  FrameTransformMatrix {
   0.790879,6.484227,-0.702893,0.000000,5.782636,-0.606852,0.908243,0.000000,0.815851,-0.714321,-5.671677,0.000000,0.200000,31.119664,0.000000,1.000000;;
  }

  Frame Bip01_Spine {
   

   FrameTransformMatrix {
    0.000001,6.978283,-0.472847,0.000000,7.576138,-0.000002,-0.000011,0.000000,-0.000011,-0.512183,-7.558806,0.000000,0.200000,34.142230,0.133791,1.000000;;
   }

   Frame Bip01_Spine1 {
    

    FrameTransformMatrix {
     -0.275423,6.163119,0.136391,0.000000,7.509542,0.356326,-0.936851,0.000000,-0.943564,0.124167,-7.516126,0.000000,0.200613,41.120429,-0.334181,1.000000;;
    }

I also know the M(x, y, z, w) x, y ,z is the direction of the skeleton and the w is the position. But why the w of child of the Bip01 is so

large. 0.200613,41.120429,-0.334181,1.000000

If it multiply the parent's ToRoot Matrix. The final Matrix is large. And it is impossible.

If you have some ideas, please tell me. I am glad to hear that.

Advertisement

i believe those FrameTransformMatrix's are offsets in relation to the root bone.

is the data bad? does the model display ok in a model viewer or modeling package? you shouldn't really have to worry about what the actual values are. either its a good model, and they are good, or its not, and they're not.

despite getting an A in linear algebra, i don't remember which rows and columns are what in a 4x4 mat. but i'm sure plenty of other people here do.

Norm Barrows

Rockland Software Productions

"Building PC games since 1989"

rocklandsoftware.net

PLAY CAVEMAN NOW!

http://rocklandsoftware.net/beta.php

i believe those FrameTransformMatrix's are offsets in relation to the root bone.

is the data bad? does the model display ok in a model viewer or modeling package? you shouldn't really have to worry about what the actual values are. either its a good model, and they are good, or its not, and they're not.

despite getting an A in linear algebra, i don't remember which rows and columns are what in a 4x4 mat. but i'm sure plenty of other people here do.

the model is transformed from the 3dmax. it views ok in the max. i am just puzzled about the big data. i also read the tiny.x in the sdk sampler. the data is also big.

i prefer if the matrix is M_offset(child) * M_offset(parent).Inverse(). i think it will be viewed much comfortable without the big data.

i am green hand in the character animation. if i have some incorrect understanding, please point out. thanks.


it views ok in the max.

irrelevant.

does the .x file view ok in a .x file viewer?

i should certainly hope that something looks ok in MAX before exporting <g>


i am just puzzled about the big data

again irrelevant.

do you want to be a math major, or do you want to build games? wink.png

like i said, i got an A in linear. if you start thinking about it too hard, you'll go crazy! just don't go there. just say no! <g>

concentrate on getting the stuff working on the screen correctly. you could spend a life time thinking about all the stuff going on in the background.


i also read the tiny.x in the sdk sampler. the data is also big.

dx animated meshes are a non-optimal implementation of skinned mesh code. its simply the implementation shipped with directx. in the past, many folks have tended to write their own loaders (from some non .x format into directx) and their own animation controller system.


i prefer if the matrix is M_offset(child) * M_offset(parent).Inverse(). i think it will be viewed much comfortable without the big data.

to each his own. i'm lazy. blender exports .x files. and the directx samples can be used to create a stand alone d3dx skinned mesh library you can link to any game. the files may be big, but that's life. it was the quickest turn-key-ish zero dollar solution i could find. eventually i'll probably move to the unreal engine or unity, so loaders and skinned mesh code will no longer be my problem.


i am green hand in the character animation. if i have some incorrect understanding, please point out. thanks.

this may be of help - its the skinned mesh library based off of tiny.cpp and dxut. stand alone. supports 5 or 6 skinning methods from fixed function to asm shader code. handles multi-animation. attachments, individual mesh textures, etc.

http://www.gamedev.net/blog/1729/entry-2261223-skinned-mesh-code-part-1-low-level-microsoft-code/

for dx11 shader based rendering, the dx9 related draw calls would be replaced by the equivalent dx11 code.

Norm Barrows

Rockland Software Productions

"Building PC games since 1989"

rocklandsoftware.net

PLAY CAVEMAN NOW!

http://rocklandsoftware.net/beta.php

ok. i use mesh viewer . and find the model is incorrect.

i think the plug-in of the 3dmax has a problem.

i will find the new plug-in

thanks for your detailed answer. you help me a lot

This topic is closed to new replies.

Advertisement