Jump to content
  • Advertisement
Sign in to follow this  
DarkZoulz

Skinned Meshes: Bone Combination?

This topic is 4966 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

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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!