Help Bad Performance in Build Mode - Printable Version +- Obi Official Forum (https://obi.virtualmethodstudio.com/forum) +-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html) +--- Forum: Obi Rope (https://obi.virtualmethodstudio.com/forum/forum-4.html) +--- Thread: Help Bad Performance in Build Mode (/thread-3023.html) Pages:
1
2
|
RE: Bad Performance in Build Mode - xeetsh - 17-07-2021 (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! RE: Bad Performance in Build Mode - josemendez - 19-07-2021 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. RE: Bad Performance in Build Mode - xeetsh - 26-07-2021 (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 |