-
Notifications
You must be signed in to change notification settings - Fork 67
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
Bepu docs update : constraints & some additional informations #374
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fantastic, thanks ! Just a couple of things to discuss
@@ -22,6 +22,7 @@ This section explains how physics components work, how to add them to your proje | |||
* [Constraints](constraints.md): Join physics objects together, constrain them around points | |||
* [Physics Queries](raycasting.md): Operations to find objects in the scene | |||
* [Physics Update](physics-update.md): Updating logic alongside physics | |||
* [FAQ](faq.md): Frequently asked questions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New pages should also be added to the toc.yml file :P
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
If physics causes your game to hang for a while when simulating for the first time, it may be related to just-in-time compilation. If it becomes a problem, consider running a small simulation that hits all the relevant codepaths (a bunch of objects colliding with constraints applied) behind a loading screen. Using an ahead-of-time compilation toolchain would also work. | ||
### General | ||
- **JIT Compilation Spikes**: Large spikes in physics step time after launch may be due to JIT compilation. Consider running a small simulation behind a loading screen to prime all relevant code paths. AOT compilation can also help. | ||
- **Thread Oversubscription**: If recurring spikes occur (especially in the solver), the operating system may be oversubscribing threads. Too many threads vying for CPU time can stall physics. In such cases, reduce the number of threads used by the simulation or by other parts of the engine. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can users access that from their game ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They now can set the Thread count => stride3d/stride#2571
- **Use Simple Shapes**: Spheres and capsules are fastest, then boxes and triangles, followed by cylinders and convex hulls. | ||
- **Keep Hulls Small**: If using convex hulls, minimize vertex count. Complexity directly affects collision cost. | ||
- **Limit Concave and Mesh Shapes**: Use compounds of simpler shapes instead of concave meshes whenever possible. If absolutely necessary, keep the triangle count low and shapes uniform in size. | ||
- **Reuse Shapes**: Avoid creating many duplicate, large shapes (like complex hulls or meshes). Reusing shapes reduces memory bandwidth and cache issues. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's not accessible to users, I think we share shapes only in specific circumstances, maybe something to add as a todo on the engine side ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That WAS not accessible ! stride3d/stride#2570 (:
Let me know once I can merge this 🙂 |
@Nicogo1705 could be Eideren's comments resolved so this could be merged, even though it might need more follow up updates/content? It seems there is already very helpful content here so we don't need to wait. Thanks. |
Well, everything is done, except stride3d/stride#2570 |
Thanks, well, we can wait then. |
No description provided.