Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Bad Performance in Build Mode
#11
(16-07-2021, 02:30 PM)josemendez Wrote: Package received! Will take a look at it during the weekend, and get back to you as soon as I find something.
Awesome! Thanks for taking the time!
Reply
#12
Hi there!

The cause for bad performance is simply that you have way too many colliders: every individual lamppost, wall, bush, etc is a ObiCollider in your scene. There's around 2000 of them. Even though Obi uses spatial partitioning to prune out distant colliders and collision resolution for nearby colliders is done in parallel, it still needs to check if they need to have their data copied to raw arrays every frame/copy their data, so that they can be processed in parallel.

This checking/copying is what's eating up most of your time away, as evidenced by the profiler: ObiColliderWorld.UpdateWorld takes 9.69 ms out of a total of 10 ms. (The rope simulation itself is barely visible in the timeline, so simulation is not an issue).

[Image: mqmBMda.png]

Solution: either limit the amount of colliders present at once (tile your world and only load colliders in the current tile), or merge colliders together. Simply merging chunks into a MeshCollider or a DistanceField will improve performance a lot.
Reply
#13
(19-07-2021, 08:27 AM)josemendez Wrote: Hi there!

The cause for bad performance is simply that you have way too many colliders: every individual lamppost, wall, bush, etc is a ObiCollider in your scene. There's around 2000 of them. Even though Obi uses spatial partitioning to prune out distant colliders and collision resolution for nearby colliders is done in parallel, it still needs to check if they need to have their data copied to raw arrays every frame/copy their data, so that they can be processed in parallel.

This checking/copying is what's eating up most of your time away, as evidenced by the profiler: ObiColliderWorld.UpdateWorld takes 9.69 ms out of a total of 10 ms. (The rope simulation itself is barely visible in the timeline, so simulation is not an issue).

[Image: mqmBMda.png]

Solution: either limit the amount of colliders present at once (tile your world and only load colliders in the current tile), or merge colliders together. Simply merging chunks into a MeshCollider or a DistanceField will improve performance a lot.

Hey,

thanks for taking the time to look into this. That really makes sense. I'll try to bake all the obi colliders in a mesh collider and check how performance is affected.

Thanks for the great support and have a great week!

xeetsh
Reply