Direct9 Skin Mesh Question

Started by
0 comments, last by Myrtle 17 years, 10 months ago
Dear All, When I try to implement the 3d model on my game, I start to read the articles about "Load X Hierarchy". It seems quite complex on that becuase it involves many structure or functions. I have some confuse on the words between "Mesh" and "Frame". What is the different that? Is a X file contain more than one of "frame" and "mesh"? What is the usage of "D3DXFRAME", "ID3DXDAllocateHierarchy", "D3DMESCONTAINER_EXTENDED"? May be you tell me go to read DX document but these document seems quite simple description. I don't know why I need it, and what is the real usage? May be I am very stupid, but please help me and reply me. Thx Michael
Advertisement
This may not be a very good explaination, or what you were hoping for, but i'm hoping it might help.

Firstly .x files can contain multiple meshes.

Ok as I understand it, a frame refers to a part of the .x file, they are different types depending on the information in the x file. A frame is a section of the hierarchy stored in the .x file. The D3DXFRAME struct holds the information on the frames that have been read in, these are linkef together within the structures to maintain the hierarchy in skinned mesh.

When a frame is loaded in you can check what type it is, if it is a mesh then the mesh data is copied into a D3DXMeshContainer structure (extended structure just have more information stored in them to make programming easier so all the data is stored in the same place).

The mesh container is still technically a frame and the frame is still added to the hierarchy, to maintain it so that the mesh can be animated.

The D3DXAllocateHierarchy needs to be derived and has 4 main functions, 1 each for creating the Frames, and destroying the frames. 1 each for creating meshcontainer and destroying them, this class controlls the memory allocations for loading, maintaining and destroying the skinned meshes.

Sorry if thats doesn't make sense or doesn't help, if it doesn't i'm sure someone else will explain it better than I did

This topic is closed to new replies.

Advertisement