Jump to content
  • Advertisement
Sign in to follow this  
plausibot

Creating a 2D mesh from a mask image

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

Basically, I have a black-and-white image and I want to create a mesh that contains just the white areas of the image (inclusive, so the mesh may contain some black at the edges). Ideally the mesh should be low polygon and tight-fitting. I've come up with a couple ways of doing this manually in Maya, but neither is very optimal: 1) Use the image as a displacement map on a plane, then delete the black areas and flatten the quad. This is fairly simple, but the results are really low quality - the mesh doesn't fit well and is way over-tessellated. And running it through Maya's Reduce tool just generates garbage. 2) Texture a quad with the image, then use boolean operations to cut out the black areas with manually-generated bounding polygons. The results are a lot better than with a displacement map, but it's still not a perfect fit. The real problem is that this method just takes too long. So the question: Is there a tool (or code) out there that can do this? My googling skills have so far led me to a couple topics about creating a bounding polygon for a set of points, but this doesn't really work for my case because the bounding polygon(s) can be concave and have holes. I'd be grateful if anyone can point me at related resources. - plausibot

Share this post


Link to post
Share on other sites
Advertisement
Thanks for the response. You are indeed correct that that tool doesn't handle concavity or holes though, and afaict that's a much harder problem to solve.

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!