0
\$\begingroup\$

Is it possible to apply spatial split techniques (oct-trees bsp-trees, etc) when meshes are not necessary manifolds?

The mesh in question represents the "map". This means that it is static so spatial splits should be a good approach. Not requiring a manifold saves a lot of time when modeling, and also it may reduce the number of extra faces that has to be drawn, as forcing the mesh to be a manifold may require additional cuts.

\$\endgroup\$
  • \$\begingroup\$ Possible, yes. Consistently delivering your desired results, maybe? Tell us more about what kind of meshes you want to use this on, what's colliding with them, how you've tried implementing it so far, and where you've gotten stuck. \$\endgroup\$ – DMGregory Jun 1 at 11:44
1
\$\begingroup\$

No game development police will come to arrest you if you try to store a non-manifold mesh in a spatial partition data structure for collision detection purposes. No law of physics will cause your computer to implode if you do this.

So no, it's not a requirement to have a manifold mesh, nor is it impossible to use non-manifold geometry in a spatial partition.

It's just trade-offs. With non-manifold meshes...

  • You don't have a consistent definition of "inside" versus "outside" - so you can detect when another primitive is intersecting the surface, but if it happens to tunnel past the surface you can't easily detect that it's on "the wrong side" or know which way to push it out.

  • You're not guaranteed the mesh is "water-tight", so very small collision primitives like raycasts might be able to slip through minute cracks in your mesh. Say you have one edge that has a neighbour split into two edges - logically there's a triangular hole in between them, even if it's meant to have zero area. Due to rounding/quantization in your mesh storage or intersection routines, there could be a tiny crack here that can cause a check to miss the mesh. So you need to be more careful with your math and include epsilons to help patch these fissures.

If those trade-offs are acceptable for your case / less painful than using manifold geometry, then go for it.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.