17-07-2021, 09:33 AM
Help Bad Performance in Build Mode
|
19-07-2021, 08:27 AM
(This post was last modified: 19-07-2021, 11:00 AM by josemendez.)
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). 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.
26-07-2021, 10:15 AM
(19-07-2021, 08:27 AM)josemendez Wrote: Hi there! 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 |
« Next Oldest | Next Newest »
|