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 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 on other sites
I'm running debug mode, it spits out:

D3DXValidIndices: A neighbor triangle index(1136) was found more than once on triangle 1106D3DXValidIndices:   (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 1136D3DXValidIndices:   (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 2652D3DXValidIndices:   (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 2682D3DXValidIndices:   (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 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

Create an account

Register a new account

• Partner Spotlight

• Forum Statistics

• Total Topics
627657
• Total Posts
2978466

• 10
• 12
• 22
• 13
• 33