Jump to content
  • Advertisement
Sign in to follow this  
LonelyStar

Simplifying a Mesh for Physics Data

This topic is 3664 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, I want to use the Meshes from Graphics for my Pysics Data, meaning I do collision detection with the same data me (or some other guy) does drawing. But that is, of course, overkill. The Graphics Meshes are just detailed. So they need to be "undetailed", and this step I want to automize! In 2D, it is very simple! A mesh is a polygon. I go through all the line segments, and if the angle between them (weightet with there length) is smaller than a certain threshold, I remove the point. But in 3D ... OK, I have triangles. I have an angle at the corner of two triangles. If this angle is smaller than I combine them. But how do I combine two triangles to get a new triangle? Or I test every point of my mesh, but I can not just remove a point :(. Ideas? Thanks! Nathan

Share this post


Link to post
Share on other sites
Advertisement
In 3D, it can be a bit more challenging. As basic idea, to answer your question, is that if you collapse not a triangle but instead an edge (join 2 vertices that make up an edge at some point in between, then you will remove at least one triangle (which became degenerate when the edge was collapsed) and make other triangles that use the remaining 2 vertices larger.

One technique, which we have used successfully at my company, and which is very well documented, is based on a quadric error metric. It was developed/popularized by Michael Garland (as a Ph.D student) and Paul Heckbert:

Quadric Error Metrics

It can be tricky to get that coded up in a robust way, but conceptually it's pretty simple, and can do a pretty decent job of retaining the topological configuration of the original mesh, at least as long as the original mesh is a manifold. I'm not sure if it works for non-manifold inputs.

Direct3D has support for progressive meshes, which is used for rendering with continuous level-of-detail. Progressive meshing requires the generation of a simplified mesh, and D3D might provide for the simplification. I'm not sure, since I'm not really a D3D person.

Another consideration is that collision detection may prefer convex bodies, so you'd need to do a convex decomposition of even a simplified mesh. Many ways to do this and I won't mention that here since it's a bit independent of your question.

Share this post


Link to post
Share on other sites
Hi,
Thanks for the link, looks very promising :).
Yes, Convex is another question and I asked it in another thread.

Nathan

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!