Jump to content
  • Advertisement
Sign in to follow this  
domin

How to remove BOWTIES from ID3DXMesh?

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

Hi all, I have problem with computing binormals and tangents for my mesh using D3DXComputeTangentFrame function. It gives me this output: A bowtie was found. Bowties can be fixed by call D3DXCleanMesh. A bowtie is the usage of a single vertex by two separate fans of triangles. The fix is to duplicate the vertex so that each fan has its own vertex. D3DXComputeTangentFrame: Mesh is not valid. D3DXComputeTangentFrame: Unable to create consistent tangent frames in this mesh without splitting vertices. I called D3DXCleanMesh, but this do nothing - problem still exists... Please help.

Share this post


Link to post
Share on other sites
Advertisement
What parameters did you use for D3DXCleanMesh()? You'd have to pass in D3DXCLEAN_BOWTIES as the first parameter to solve your problem. I presume the call succeeds? No errors whilst trying to clean (checked the debug output as well?).

Another simple check is to query how many vertices you have before the call, and how many afterwards. Cleaning for bow ties tends to require duplication/splitting of vertices - thus the cleaned mesh should have more than when it started.

hth
Jack

Share this post


Link to post
Share on other sites
Thanks for answer. Yes, I use D3DXCLEAN_BOWTIES (already tried all combinations), result is D3D_OK... No idea what is wrong...

Share this post


Link to post
Share on other sites
Have you examined the results of the last parameter? (LPD3DXBUFFER * ppErrorsAndWarnings)

The documentation doesn't indicate any situations where it'll fail to clean a mesh, but I suppose it is possible that it's getting stuck somewhere and thus doesn't remove all the bowties. Checking the aforementioned warnings/errors may well give you some clues...

hth
Jack

Share this post


Link to post
Share on other sites
I checked how many vertices is before the call and how many after. The number is identical so it looks like this function fail...

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!