Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Multiple obi solvers
#11
(21-01-2022, 06:12 PM)josemendez Wrote: Depends on the mesh colliders, how many triangles each?

There are 49 mesh colliders, with an average of 103 triangles for one collider.

(21-01-2022, 06:12 PM)josemendez Wrote: Bounding Volume Hierarchies. It's the acceleration data structure used to perform collision queries against triangle meshes.

Since testing each particle against each individual triangle in each collider is too much work, a BVH for each mesh is generated. This allows to quickly prune triangles that are not close to a given particle, and allows to test each particle agains just a few (2-3) triangles. Basically, it makes collision detection fast enough to run in realtime.

The thing is that generating the BVH takes some time. In Obi a better alternative to MeshColliders are distance fields, since A) they're built at edit time and stored in disk, so no runtime overhead B) they're faster and more robust than MeshColliders.

Thanks for this small lesson, I have never studied how collision detection works.

However, I test my asset with or without the mesh colliders, and the performances seems to be approximately the same. This is why it doesn't seems to me that colliders are the cause of these problems in performances.
Reply


Messages In This Thread
Multiple obi solvers - by lufydad - 17-01-2022, 10:42 AM
RE: Multiple obi solvers - by josemendez - 17-01-2022, 11:01 AM
RE: Multiple obi solvers - by lufydad - 17-01-2022, 03:21 PM
RE: Multiple obi solvers - by josemendez - 17-01-2022, 08:14 PM
RE: Multiple obi solvers - by lufydad - 19-01-2022, 05:18 PM
RE: Multiple obi solvers - by josemendez - 20-01-2022, 11:00 AM
RE: Multiple obi solvers - by lufydad - 21-01-2022, 03:50 PM
RE: Multiple obi solvers - by josemendez - 21-01-2022, 03:57 PM
RE: Multiple obi solvers - by lufydad - 21-01-2022, 04:39 PM
RE: Multiple obi solvers - by josemendez - 21-01-2022, 06:12 PM
RE: Multiple obi solvers - by lufydad - 24-01-2022, 02:10 PM
RE: Multiple obi solvers - by josemendez - 24-01-2022, 03:05 PM
RE: Multiple obi solvers - by lufydad - 24-01-2022, 04:10 PM
RE: Multiple obi solvers - by josemendez - 25-01-2022, 09:32 AM