Archived

This topic is now archived and is closed to further replies.

SkinnedMesh file format

This topic is 5130 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

The following file works fine on deep exploration. In mesh viewer don''t work fine (transform the whole mesh). When i try load it with LoadHierarchyFromFile and exception occurs. HRESULT: 0x80004005 (2147500037) Name: E_FAIL Description: An undetermined error occurred Severity code: Failed Facility Code: FACILITY_NULL (0) Error Code: 0x4005 (16389) I''d compare with the tiny.x in text format (it work fine) and i dont''t had noticed of the difference. Any suggestion are welcome. It was exported with Panda
xof 0303txt 0032
template XSkinMeshHeader {
 <3cf169ce-ff7c-44ab-93c0-f78f62d172e2>
 WORD nMaxSkinWeightsPerVertex;
 WORD nMaxSkinWeightsPerFace;
 WORD nBones;
}

template VertexDuplicationIndices {
 
 DWORD nIndices;
 DWORD nOriginalVertices;
 array DWORD indices[nIndices];
}

template SkinWeights {
 <6f0d123b-bad2-4167-a0d0-80224f25fabb>
 STRING transformNodeName;
 DWORD nWeights;
 array DWORD vertexIndices[nWeights];
 array FLOAT weights[nWeights];
 Matrix4x4 matrixOffset;
}


Frame Plane01 {
 

 FrameTransformMatrix {
  1.000000,0.000000,0.000000,0.000000,0.000000,0.000000,-1.000000,0.000000,0.000000,1.000000,0.000000,0.000000,1.449276,-22.705307,-0.000002,1.000000;;
 }

 Frame {
  

  FrameTransformMatrix {
   1.000000,0.000000,0.000000,0.000000,0.000000,1.000000,-0.000000,0.000000,0.000000,0.000000,1.000000,0.000000,0.000000,-0.000000,-0.000000,1.000000;;
  }

  Mesh  {
   6;
   -65.700478;0.000000;49.275349;,
   65.700478;0.000000;49.275349;,
   -65.700478;0.000000;-49.275349;,
   65.700478;0.000000;-49.275349;,
   -65.700478;0.000000;-49.275349;,
   65.700478;0.000000;49.275349;;
   2;
   3;0,1,2;,
   3;3,4,5;;

   MeshNormals  {
    6;
    0.000000;1.000000;0.000000;,
    0.000000;1.000000;0.000000;,
    0.000000;1.000000;0.000000;,
    0.000000;1.000000;0.000000;,
    0.000000;1.000000;0.000000;,
    0.000000;1.000000;0.000000;;
    2;
    3;0,1,2;,
    3;3,4,5;;
   }

   XSkinMeshHeader {
    1;
    1;
    1;
   }

   SkinWeights {
    "Bone01";
    1;
    3;
    1.000000;
    0.832052,-0.000001,0.554701,0.000000,-0.000001,1.000001,-0.000001,0.000000,-0.554700,0.000000,0.832051,0.000000,55.738163,-0.000021,6.967237,1.000000;;
   }
  }
 }
}

Frame Bone01 {
 

 FrameTransformMatrix {
  0.832050,-0.554699,-0.000000,0.000000,-0.000000,0.000000,-0.999999,0.000000,0.554699,0.832050,0.000000,0.000000,-48.792267,2.415458,0.000000,1.000000;;
 }

 Frame {
  

  FrameTransformMatrix {
   0.999997,0.000000,-0.000000,0.000000,0.000000,1.000000,-0.000000,0.000000,0.000000,0.000000,1.000000,0.000000,-0.000002,0.000000,-0.000002,1.000000;;
  }
 }

 Frame Bone02 {
  

  FrameTransformMatrix {
   0.999999,0.000000,-0.000001,0.000000,0.000000,0.999999,-0.000000,0.000000,0.000001,-0.000000,0.999999,0.000000,149.795425,-0.000061,-0.000054,1.000000;;
  }

  Frame {
   

   FrameTransformMatrix {
    1.000000,-0.000000,-0.000000,0.000000,0.000000,1.000000,-0.000000,0.000000,0.000000,-0.000000,1.000000,0.000000,0.000002,-0.000000,-0.000001,1.000000;;
   }
  }
 }
}

AnimationSet Anim-1 {
 

 Animation Anim-Bone01 {
  
  { Bone01 }

  AnimationOptions {
   1;
   0;
  }

  AnimationKey {
   0;
   37;
   0;4;-0.676766,-0.676766,0.204908,-0.204908;;,
   3;4;-0.676350,-0.676350,0.206277,-0.206277;;,
   4;4;-0.676037,-0.676037,0.207300,-0.207300;;,
   5;4;-0.675644,-0.675644,0.208580,-0.208579;;,
   6;4;-0.675173,-0.675173,0.210100,-0.210099;;,
   7;4;-0.674627,-0.674627,0.211844,-0.211844;;,
   8;4;-0.674011,-0.674011,0.213797,-0.213797;;,
   9;4;-0.673327,-0.673327,0.215943,-0.215942;;,
   10;4;-0.672578,-0.672578,0.218264,-0.218264;;,
   11;4;-0.671767,-0.671767,0.220746,-0.220746;;,
   12;4;-0.670899,-0.670899,0.223372,-0.223371;;,
   13;4;-0.669976,-0.669976,0.226125,-0.226125;;,
   14;4;-0.669002,-0.669002,0.228991,-0.228990;;,
   15;4;-0.667981,-0.667981,0.231952,-0.231952;;,
   16;4;-0.666917,-0.666917,0.234994,-0.234993;;,
   17;4;-0.665814,-0.665814,0.238099,-0.238099;;,
   18;4;-0.664678,-0.664678,0.241253,-0.241253;;,
   19;4;-0.663513,-0.663512,0.244440,-0.244440;;,
   20;4;-0.662323,-0.662323,0.247645,-0.247644;;,
   21;4;-0.661116,-0.661116,0.250851,-0.250851;;,
   22;4;-0.659895,-0.659895,0.254043,-0.254043;;,
   23;4;-0.658669,-0.658669,0.257207,-0.257207;;,
   24;4;-0.657442,-0.657442,0.260327,-0.260327;;,
   25;4;-0.656221,-0.656221,0.263389,-0.263388;;,
   26;4;-0.655014,-0.655014,0.266376,-0.266376;;,
   27;4;-0.653828,-0.653828,0.269275,-0.269275;;,
   28;4;-0.652669,-0.652669,0.272071,-0.272071;;,
   29;4;-0.651546,-0.651546,0.274750,-0.274749;;,
   30;4;-0.650467,-0.650467,0.277296,-0.277296;;,
   31;4;-0.649439,-0.649439,0.279695,-0.279695;;,
   32;4;-0.648470,-0.648470,0.281934,-0.281934;;,
   33;4;-0.647569,-0.647569,0.283998,-0.283998;;,
   34;4;-0.646743,-0.646743,0.285872,-0.285872;;,
   35;4;-0.646002,-0.646002,0.287543,-0.287543;;,
   36;4;-0.645354,-0.645353,0.288996,-0.288996;;,
   37;4;-0.644805,-0.644805,0.290217,-0.290217;;,
   39;4;-0.644042,-0.644042,0.291907,-0.291907;;;
  }

  AnimationKey {
   1;
   40;
   0;3;0.999999,0.999999,0.999999;;,
   2;3;1.001469,1.001469,1.001469;;,
   3;3;1.003251,1.003251,1.003251;;,
   4;3;1.005682,1.005681,1.005682;;,
   5;3;1.008724,1.008724,1.008723;;,
   6;3;1.012340,1.012340,1.012340;;,
   7;3;1.016494,1.016493,1.016494;;,
   8;3;1.021148,1.021148,1.021148;;,
   9;3;1.026265,1.026265,1.026265;;,
   10;3;1.031809,1.031809,1.031809;;,
   11;3;1.037741,1.037741,1.037741;;,
   12;3;1.044026,1.044026,1.044026;;,
   13;3;1.050626,1.050626,1.050626;;,
   14;3;1.057504,1.057503,1.057503;;,
   15;3;1.064622,1.064622,1.064622;;,
   16;3;1.071944,1.071944,1.071944;;,
   17;3;1.079434,1.079434,1.079433;;,
   18;3;1.087053,1.087052,1.087052;;,
   19;3;1.094764,1.094764,1.094764;;,
   20;3;1.102531,1.102531,1.102531;;,
   21;3;1.110317,1.110316,1.110317;;,
   22;3;1.118084,1.118083,1.118084;;,
   23;3;1.125795,1.125795,1.125795;;,
   24;3;1.133414,1.133414,1.133414;;,
   25;3;1.140903,1.140903,1.140903;;,
   26;3;1.148226,1.148225,1.148226;;,
   27;3;1.155344,1.155344,1.155344;;,
   28;3;1.162222,1.162221,1.162222;;,
   29;3;1.168822,1.168822,1.168821;;,
   30;3;1.175106,1.175106,1.175106;;,
   31;3;1.181039,1.181038,1.181039;;,
   32;3;1.186583,1.186582,1.186582;;,
   33;3;1.191700,1.191700,1.191700;;,
   34;3;1.196354,1.196354,1.196354;;,
   35;3;1.200508,1.200507,1.200508;;,
   36;3;1.204124,1.204124,1.204124;;,
   37;3;1.207166,1.207166,1.207166;;,
   38;3;1.209597,1.209597,1.209596;;,
   39;3;1.211379,1.211378,1.211378;;,
   40;3;1.212475,1.212474,1.212475;;;
  }

  AnimationKey {
   2;
   42;
   0;3;-48.792267,2.415458,0.000000;;,
   1;3;-48.725861,2.415458,0.000000;;,
   2;3;-48.531040,2.415458,0.000000;;,
   3;3;-48.214390,2.415458,0.000000;;,
   4;3;-47.782490,2.415458,0.000000;;,
   5;3;-47.241932,2.415458,0.000000;;,
   6;3;-46.599300,2.415458,0.000000;;,
   7;3;-45.861179,2.415458,0.000000;;,
   8;3;-45.034153,2.415458,0.000000;;,
   9;3;-44.124805,2.415458,0.000000;;,
   10;3;-43.139729,2.415458,0.000000;;,
   11;3;-42.085503,2.415458,0.000000;;,
   12;3;-40.968716,2.415458,0.000000;;,
   13;3;-39.795952,2.415458,0.000000;;,
   14;3;-38.573795,2.415458,0.000000;;,
   15;3;-37.308834,2.415458,0.000000;;,
   16;3;-36.007652,2.415458,0.000000;;,
   17;3;-34.676838,2.415458,0.000000;;,
   18;3;-33.322971,2.415458,0.000000;;,
   19;3;-31.952644,2.415458,0.000000;;,
   20;3;-30.572437,2.415458,0.000000;;,
   21;3;-29.188938,2.415458,0.000000;;,
   22;3;-27.808731,2.415458,0.000000;;,
   23;3;-26.438404,2.415458,0.000000;;,
   24;3;-25.084538,2.415458,0.000000;;,
   25;3;-23.753723,2.415458,0.000000;;,
   26;3;-22.452539,2.415458,0.000000;;,
   27;3;-21.187580,2.415458,0.000000;;,
   28;3;-19.965425,2.415458,0.000000;;,
   29;3;-18.792660,2.415458,0.000000;;,
   30;3;-17.675873,2.415458,0.000000;;,
   31;3;-16.621645,2.415458,0.000000;;,
   32;3;-15.636568,2.415458,0.000000;;,
   33;3;-14.727224,2.415458,0.000000;;,
   34;3;-13.900196,2.415458,0.000000;;,
   35;3;-13.162074,2.415458,0.000000;;,
   36;3;-12.519440,2.415458,0.000000;;,
   37;3;-11.978882,2.415458,0.000000;;,
   38;3;-11.546985,2.415458,0.000000;;,
   39;3;-11.230332,2.415458,0.000000;;,
   40;3;-11.035512,2.415458,0.000000;;,
   41;3;-10.969109,2.415458,0.000000;;;
  }
 }
}
 

Share this post


Link to post
Share on other sites
Ok. i''m tired.

tiny_4anim.x that come with summer update works fine in mesh viewer and not in deep exploration.
Plus tiny_4anim.x have four animation inside.

Deep exploration, panda, characterfx, EXTRAS 3DS plugin are full compatible with DX8.1, but they don''t work in DX9 (only partially)

HOW THE MICROSOFT TEAM EXPORT THE MESH IN ORDER TO WORK IN DX9???
WHERE IS THE EXPORTER!!!!!!
WHICH SOFTWARE THEY USE????

Share this post


Link to post
Share on other sites
Well, i was working hardly in order to resolve my problem.
I discover two problems. I post this in order to grow the KB.

The first problem was a stupid thing from my code, i don''t catch the texture read exception. (Maybe an "error texture load" message can be solve my problem in 10 seconds..)
The second problem was with the exporter (well, really with the SDK)

This structure *MUST BE EXISTS* in the .x file in the mesh structure.
MeshMaterialList {
1;
2;
0,
0;

Material {
0.839216;0.894118;0.600000;1.000000;;
0.000000;
0.839216;0.894118;0.600000;;
0.000000;0.000000;0.000000;;
}

I was exported without the MATERIAL option. (What happen if i dont want materials and i want to created by myself?, of course i can rewrite the values but it take some bytes for nothing in the file)

Anyway, i think that, again, an exception saying "you cannot load a mesh without material from LoadHierarchyFromFile because i say it" can be good.

To MS DX SDK designers: If you have not money to make any decent documentation please builtin some "readables" messages in the debugger.

Nobody born knowing.

Well, i hope that my waste of time grow your DX experience.

Share this post


Link to post
Share on other sites