-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bullet] Bullet Physics bad performance in GridMap #34963
Comments
In my experience performance especially bad on meshes with generated trimesh collision when an object collides with a part of the terrain that isn't flat, not sure if that is related. |
I also tried to use generated convex collision and performances were also bad |
When I tried to run your project (in a relatively recent 3.2 master) I got 'Parser Error: Mixed tabs and spaces in indentation'. |
@burstina Script parsing doesn't depend on your editor settings, but you do need to convert indentation when saving to fix non-compliant scripts. |
I unferstand that, but in editor the script has spaces only, no tabs at all, I don't know the reason you get tabs. |
You are absolutely right burstina, I just reunzipped the project and opened in a different text editor and there are only spaces. My Godot is set to use tabs (tabs, 4, auto indent, convert indent on save, draw tabs, NOT draw spaces) and it seems to mess up auto converting when running the project. I'll open an issue for this as it seems to be a bug. (Sorry didn't mean to derail this issue) Edit-> Ah got it I think, your spaces are not in multiples of 4.. e.g.
|
I just edited mail message to attach "GridMap.txt": people with indentation issues can download this txt , rename to Gridmap.gd and replace old Gridmap.gd. |
Can confirm that this issue still exists in 3.2.1. In my case I have created a large world from multiple Gridmaps with static colliders. I load gridmaps dynamically so only gridmaps close to player are loaded and visible. Everything was working fine in Godot 3.1 but starting from 3.2 the background loading is very slow because of static colliders (without colliders the loading is fast). Gridmap and colliders works fine once loaded. Loading works also fast when using Godot Physics instead of Bullet. It also seems that it's not possible to do loading from background thread. If I load Gridmaps by calling call_deferred from background thread it's still as slow as before. |
@codespren Can you reproduce this issue in Godot 3.2 alphas/betas/RCs? You can download them here. |
@Calinou I tested my personal project with few alphas and betas and had same slowness in all of them, including alpha 0. I did some more testing but unfortunately have problems to reproduce the difference between 3.1 and 3.2. However, I made a simple test project where gridmaps are loaded from code without threads and at least in that test the loading is very slow but there's no significant difference between 3.1 and 3.2: Gridmaps: 1 Gridmaps: 2 Gridmaps: 3 Gridmaps: 4 |
This is another clockbait bug, the performance issue is not in physics simulation but during addition of collision shapes, which make it similar to #30027 |
Godot version:
3.2 beta5
OS/device including version:
Windows 10
Issue description:
running this MRP stress test, Bullet is really slow compared to GodotPhysics.
I see bigger FPS drop when application is procedurally filling the gridmap, When the filling cycle ends, FPS turns good.
Steps to reproduce:
run MRP using Bullet and look at top-left label: showing FPS and Gridmap radius
run MRP using GodotPhysics and look at top-left label: showing FPS and Gridmap radius
Minimal reproduction project:
Project: GodotPhysics.zip
gridmap.gd tabless (for editor tab-to-space indentation issues) gridmap.txt
The text was updated successfully, but these errors were encountered: