Sign in to follow this  
IlyaZ

What happened to ID3DXSkinMesh?

Recommended Posts

Hello fellas, I'm converting Jim Adams' "Programming Role Playing Games with DirectX" 8.0 book to 9.0 (Feb 2006 SDK). So far everything has went good, but I can't solve a prob concerning Skinned Meshes (m_SkinnedMesh), ID3DXSkinMesh. What happened to ID3DXSkinMesh and what do I use now? I'm not quite sure I'm going to use bones in my project but SkinnedMesh = Mesh with bones? My .X parsing code does compile but I doubt it's correct. So, does anybody know about a tutorial on parsing .x files which will work with the latest DirectX SDK? They changed a lot this update. Greetings, IlyaZ

Share this post


Link to post
Share on other sites
Hey, I had just done the work that converting the XInternalParser from DX8.0 to DX9.0.

I also doubt it's correct that I add some "DrawText" function
to display those frames and matrices.

Something to note is that you need to change the code in
ParseObject() to tell whether the childobject is an
instance or referenced.


DWORD cchildren = 0;
pDXData->GetChildren(&cchildren);
if(cchildren){
for(DWORD cc =0; cc<cchildren; cc++){
pDXData->GetChild(cc, &pDXChildData);
ParseObject(pDXChildData, pDXData, Depth+1, Data, Reference | pDXChildData->IsReference());
ReleaseCOM(pDXChildData);
}
}

Hope this helps.

Share this post


Link to post
Share on other sites
Actually, you don't need to use the new ID3DXFile interface at all anymore. You can use the D3DXLoadMeshHierarchy function and the AllocateHierarchy functions to do the work now.

The ID3DXSkinMesh interface is gone. Now you will use the D3DX function to load the ID3DXMesh and the ID3DXSkinInfo, and use the later interface to skin the mesh with the bone data (ID3DXSkinInfo::ConvertToIndexedBlendedMesh).

However, a cool sample to the ID3DXFile interface is here:

TripleBuffer

Share this post


Link to post
Share on other sites
Okay thanks, I've converted the standard load code now. Just got to add anim, skininfo and adjacency.

Btw I cant find the D3DXLoadMeshHierarchy in MSDN. Are there any tutorials on this? :) It makes things easier than "before"?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this