Open pwab opened 5 years ago
Thanks for the feedback. I just tagged the v1.0 release, which swaps out the individual MeshInstances for a single MultiMeshInstance. Performance appears significantly improved on my system; however, there is now code (gdscript) that must update the per-instance transforms of all CollisionShapes on every physics frame.
Perhaps you could run the new version and see how the results compare to what you got above.
Furthermore, the code updating the transforms could be optimized further, some ideas include:
I just created a csharp branch, where performance critical code that updates the multimesh transforms was re-written in c#.
it's a little strange, if i increase the "physics jitter fix" in the settings i get better performance (i have it at 400 in the picture below). the whole tower with 4k cubes can come down without super low fps, ( i added physics material to, friction 0.9 and bounce 0.4 ) the lagging starts awhile after the tower has collapsed.
I ran your project on this system:
After draining every bit using anything written below I got this:
I tried your list of possible perfomance improvements:
It is. As far as I know it won't get any performance updates in the future because Bullet is and will be the standard engine for 3D physics.
30 works fine for me - even if the tower is collapsing in a different way. Below that you're getting a lot of wrong movement and the cubes seem to behave more like a liquid. I changed it back to 50 to get comparable results.
Worked but did not have a massive effect. I guess this boosts the GDScript performance a lot but not the physics system. I got a min_fps of 24 in editor and 30 when exported in DEBUG and 40 when exported as RELEASE.
I removed the directional light and I got a few more fps.
Same here. Switched everything graphics related to zero but did't noticed anything. I'm still not sure if switching
rendering/threads/thread_model
has an effect.There are a few things that could be considered too:
I tracked my performance with the following addtion:
Last result