Posts: 50
Threads: 14
Joined: Nov 2021
Reputation:
0
(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.
Posts: 6,323
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
(24-01-2022, 02:10 PM)lufydad Wrote: There are 49 mesh colliders, with an average of 103 triangles for one collider.
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.
Hi there,
In that case we're back to square one: I have no idea what could be causing this.
I know your project is big, but would it be possible for you to strip your scene of all non-essential content, to try and get the simplest setup that reproduces this problem and share it with me? Otherwise all I can do is guesswork.
Posts: 50
Threads: 14
Joined: Nov 2021
Reputation:
0
(24-01-2022, 03:05 PM)josemendez Wrote: Hi there,
In that case we're back to square one: I have no idea what could be causing this.
I know your project is big, but would it be possible for you to strip your scene of all non-essential content, to try and get the simplest setup that reproduces this problem and share it with me? Otherwise all I can do is guesswork.
Unfortunately, I'm under a non-disclosure agreement, therefore I even can't share you an empty scene with only the asset...
However, I thank you for all your help !!!
If I find something more precise that affect performances, I'll share it to you.
Once again thank you !
Posts: 6,323
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
25-01-2022, 09:32 AM
(This post was last modified: 25-01-2022, 09:35 AM by josemendez.)
(24-01-2022, 04:10 PM)lufydad Wrote: Unfortunately, I'm under a non-disclosure agreement, therefore I even can't share you an empty scene with only the asset...
What I meant was stripping the project of any sensible content until there's only Obi stuff in there that reproduces the problem. An empty scene with only Obi in it cannot possibly be under NDA right?
This is usually the best way to get help or report bugs: by creating a minimal reproducible example.
(24-01-2022, 04:10 PM)lufydad Wrote: However, I thank you for all your help !!!
If I find something more precise that affect performances, I'll share it to you.
Once again thank you !
You're welcome! Let me know if I can be of any help.
kind regards,
|