Hi!
I have been using Obi Softbody for quite sometime now, and I always have a hard time optimizing the entire Obi system. I changed the backend setting to burst already, downloaded all the required packages (Burst, Collections, Mathematics and Jobs) and set all the constraint iterations to minimum parameters (if possible, 1), but the game still lags PARTICULARLY when two or more softbodies are in contact. I cannot attach a screenshot of the game, because it is still under development, but I will try my best to describe the game system.
I would appreciate any advice from you, as I have been struggling quite some time with this problem. Even with just 2 softbodies enabled, the game lags and I do not know what to do anymore. Also, the Jobs settings return to default everytime I open the editor and because of this, I have to set it every single time. Is this normal behavior?
Looking forward to your reply!
I have been using Obi Softbody for quite sometime now, and I always have a hard time optimizing the entire Obi system. I changed the backend setting to burst already, downloaded all the required packages (Burst, Collections, Mathematics and Jobs) and set all the constraint iterations to minimum parameters (if possible, 1), but the game still lags PARTICULARLY when two or more softbodies are in contact. I cannot attach a screenshot of the game, because it is still under development, but I will try my best to describe the game system.
- Upon level start, there is one Obi solver in the scene. Multiple softbody prefabs will be instantiated as children of this solver. Upon instantiation, the softbody component is disabled to save memory and is only enabled once a certain condition is met. The softbodies are enabled one by one. I attached a screen capture of the solver (solver.png).
- Upon meeting another condition, the softbody prefab as a whole is deleted. Including all the Obi-related components. The softbody prefab's heirarchy is included below (heirarchy.png). Center and KeyHolder are just empty transforms, while Skin (skin.png) and Player (softbody.png) are where Obi components are included. I attached a screen capture of these two as well.
- The mesh of the softbody I am using has 3328 vertices, 3332 triangles and 2 submeshes.
- The softbody blueprint parameters are attached below. Please refer to blueprint.png.
- I took a screenshot of the Profiler during the time when the game lags and attached it below. During this time, the game is practically unplayable and just freezes. The weird thing about this is if you set backend to Oni, the freeze issue disappears on the editor, but freezes nonetheless when you build the game on Android. Setting backend to Burst freezes on either environments. For the screenshot, please refer to solver.png.
I would appreciate any advice from you, as I have been struggling quite some time with this problem. Even with just 2 softbodies enabled, the game lags and I do not know what to do anymore. Also, the Jobs settings return to default everytime I open the editor and because of this, I have to set it every single time. Is this normal behavior?
Looking forward to your reply!