Sign in to follow this  
DarkZoulz

Skinned Meshes: Bone Combination?

Recommended Posts

Is there some limit to the amount of bones that can influence eachother in D3D? My call to ConvertToBlendedMesh() fails and returns INVALID_MESH with my more advanced X mesh. btw, i'm using DX8.1

Share this post


Link to post
Share on other sites
Make sure you're running the Debug Runtime. That way, the debug spew will not only tell you IF a function failed, but more importantly, WHY that function failed. See the forum FAQ for more info about the Debug Runtime.

neneboricua

Share this post


Link to post
Share on other sites
I'm running debug mode, it spits out:


D3DXValidIndices: A neighbor triangle index(1136) was found more than once on triangle 1106
D3DXValidIndices: (Likely problem is that two triangles share same points with opposite orientations)
D3DXValidIndices: A neighbor triangle index(1106) was found more than once on triangle 1136
D3DXValidIndices: (Likely problem is that two triangles share same points with opposite orientations)
D3DXValidIndices: A neighbor triangle index(2682) was found more than once on triangle 2652
D3DXValidIndices: (Likely problem is that two triangles share same points with opposite orientations)
D3DXValidIndices: A neighbor triangle index(2652) was found more than once on triangle 2682
D3DXValidIndices: (Likely problem is that two triangles share same points with opposite orientations)


Which i'm guessing doesn't have anything to do with bone influences?

A D3DXMeshClean() resolves the problem, but i've learnt that D3DXMeshClean creates a whole bunch of memory leaks... I don't know why though.

Share this post


Link to post
Share on other sites
Your original mesh was invalid, causing ConvertToBlendedMesh() to fail. So you fixed this by calling D3DXCleanMesh. This is all good and exactly what you are supposed to do.

By the way, D3DXCleanMesh makes sure that all triangles are valid by going through the index and vertex buffers of your mesh looking for incorrect triangle references. Nothing in particular to do with bone references (since the original mesh has no concept of what a "bone" is anyway) but blending weights are calculated by taking into account the different triangles that use a particular vertex.

But what makes you say that D3DXCleanMesh "creates a whole bunch of memory leaks"? I've used this function myself many times and have never run into that kind of problem. What makes you think you have a memory leak? What is the problem you are having?

neneboricua

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