-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
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
Poor optimizations in the physics engine #7690
Comments
Personally I understand why Godot has it's own physics engine; but I think the best long term solution to issues like this would be to eventually migrate to Bullet physics, or allow it as an option. |
So can you provide a minimal example? |
https://notabug.org/bkeys/DMUX/archive/master.tar.gz |
On your other issue about meshes, I saw an image of your truck. This image shows a over complicated collision shape. |
Just for reference, I just added collision meshes to my terrain plugin using the trimesh collision helper, and it worked like a charm: https://www.youtube.com/watch?v=531szCVfZPw |
I started testing Godot 3.0 alpha1, and I can confirm that mesh-to-mesh collisions on even simple shapes gives a noticable lag. I used some of the assets from Kenney which are fairly simple, and added
|
Curious about the reorganizing hierarchy step. Does the jitter happen if the hierarchy is left as-is? Or if you have a Spatial as the root? |
I never reproduced this issue with primitive collision shapes (boxes, capsules...). |
I couldn't find a good way organizing it so that the mesh followed the body in this case. I had some troubles with the scene since it was inhereted and the mesh would be duplicated. Not completely sure why the generation function generates children for a mesh - seems kinda useless to me? |
Just built the latest version from git 30 mins ago and it was worse - may have to do with some a lot of messages with |
Running latest code (35d5724) on Windows 10. If anyone's interested-here's the project: |
yeah, there is a bug in the convex polygon shape I never got to solve.
Using basic shapes instead solves the problem.
If all goes well, we will be merging bullet as back-end soon
…On Sun, Aug 20, 2017 at 7:05 PM, Espen Breivik ***@***.***> wrote:
Running latest code (35d5724
<35d5724>)
on Windows 10.
Notice the extreme lag spikes when colliding with other objects. There is
also a small heightened edge on the roads themselves that causes some
intererence.
If anyone's interested-here's the project:
Alpha-1-Test.zip
<https://github.com/godotengine/godot/files/1237387/Alpha-1-Test.zip>
[image: racing-lag]
<https://user-images.githubusercontent.com/1427902/29498822-afef1e66-8603-11e7-92f6-7f775346acd9.gif>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#7690 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AF-Z27mDq447KzkJCt0KFHW9221IszQDks5saK2-gaJpZM4LzB_T>
.
|
@reduz thanks for the reply! I also used this scene when testing the version 14c11fb97a1916759915e0e706d25a440b4f21da from the godot fork created by @AndreaCatania and switched to the Bullet-engine, but it had worse issues with collision shapes, and I experienced other periodic lags. As an example - the pylons just tunneled through the road at the beginning using the Bullet engine implementation. (It also didn't handle the huge static collision shape which is a simple scaled plate - but I now the old Godot saying - you shouldn't scale collision shapes). So the best build I have tested for now is the "official" Alpha1. It might be a crap scene, and I have very limited experience with 3D in general - but consider this a "naive" approach to creating a 3D scene with pre-exiting assets 😄 Also, personally I have no idea how I would start constructing a simple collision shape for pre-existing meshes - it seems like a near impossible task in the editor without any tooling for assistance (like you have in 2D editors). I would probably need to do this in a 3D program? |
@DjPale In this case I created a simple shape in Wings 3D software, who is very easy to learn and to use. Then I use Godot mesh menu to create the collision shape from this mesh. |
@DjPale I've fixed the problem with scaled objects. Now The ground is working correctly. |
@AndreaCatania re-compiled your branch, works like a charm! I also used |
According to previous comment and the fact that bullet is now merged I think this one can be closed :) |
Operating system or device - Godot version:
Fedora 25 (Linux)
Issue description:
Collision shapes on even simple meshes can cause serious performance hits on the smallest collisions. Here is a video of a car of mine colliding with my roads, which collision shape seems to be that of a cube, at the least a very simple mesh
It is common also for after the performance hit for the mesh to seemingly teleport elsewhere and collide right though objects.
![output](https://cloud.githubusercontent.com/assets/12195202/22479710/c46eafcc-e7bc-11e6-8bdb-288b3e15a87c.gif)
Steps to reproduce:
I can create a simple scene (using non default objects like the cube), say a car and a much simpler map, and I will get similar behavior
The text was updated successfully, but these errors were encountered: