Skip to content
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

Add Physics 3D benchmarks #76

Merged
merged 8 commits into from
Jun 19, 2024
Merged

Conversation

OverloadedOrama
Copy link
Contributor

@OverloadedOrama OverloadedOrama commented Jun 18, 2024

Adds the following benchmarks from #36:

  • 🟥CPU🟥 Area3D : Place 2000 kinematic bodies, move around 1000 Area2D nodes of different chapes. Measure performance for 10 seconds.
  • 🟥CPU🟥 CharacterBody : Make a complex scene (maybe using gridmap). Throw 1000 CharacterBodies running around and jumping randomly.Measure performance for 10 seconds.
  • 🟥CPU🟥 Triangle Mesh : Open a complex triangle mesh geometry collision, trow 1000 bodies on it, measure performance for 20 seconds.
  • 🟥CPU🟥 SoftBody : Create a cloth softbody, throw 500 rigid bodies on it. Measure performance for 10 seconds.
  • 🟪Algorithm🟪 RayCast: Measure how much it takes doing 10000 raycasts in a complex scene (lots of shapes). From random pairs of points.

🟥CPU🟥 Rigid Bodies : Throw 2000 shapes next to each other in a pit, let them solve and stack, measure performance for 20 seconds is already implemented in rigid_body_3d.gd.

Overall very similar benchmarks to #72, but in 3D. For the triangle mesh benchmark, I didn't know which mesh to use, so I used a scene made by @Erevoid and I added collisions to it. Let me know if it's complex enough.

Results on my PC

{
"benchmarks": [
{
"category": "Physics > Area 3d",
"name": "1000 Area 3d",
"results": {
"idle": 131.7,
"physics": 34.43,
"time": 0.075
}
},
{
"category": "Physics > Character Body 3d",
"name": "1000 Character Bodies 3d",
"results": {
"idle": 135.6,
"physics": 88.44,
"time": 0.134
}
},
{
"category": "Physics > Raycast 3d",
"name": "10 000 Raycast 3d",
"results": {
"time": 877.6
}
},
{
"category": "Physics > Softbody 3d",
"name": "Softbody 3d 500 Rigidbodies",
"results": {
"idle": 22.22,
"physics": 5.114,
"time": 0.085
}
},
{
"category": "Physics > Triangle Mesh",
"name": "Triangle Mesh 3d 1000 Rigidbodies",
"results": {
"idle": 61.1,
"physics": 10.85,
"time": 0.066
}
}
],
"engine": {
"version": "v4.3.beta1.official",
"version_hash": "a4f2ea91a1bd18f70a43ff4c1377db49b56bc3f0"
},
"system": {
"cpu_architecture": "x86_64",
"cpu_count": 12,
"cpu_name": "AMD Ryzen 5 1600 Six-Core Processor",
"os": "Linux"
}
}

Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally, it works as expected.

Thanks!

@Calinou Calinou merged commit f1ee9eb into godotengine:main Jun 19, 2024
@OverloadedOrama OverloadedOrama deleted the physics-3d branch June 19, 2024 22:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants