Support Compound Shapes for collisions.
The proposal is very simple: instead of using a single collision shape for rigidbody / object, add the ability to use more than one and create awesome concave objects with simple primitive shapes (boxes, spheres, capsules, hulls...)!
For example, if more than one primitive convex shape is used, Blender should combine the shapes in a single compound shape (like Bullet suggests in this case with btCompoundShape()).
I hope everyone understand that exploiting this native functionality of physics engines is better than emulating this with a lot of rigid bodies and constraints.
This is supported in many physics engines, and it is good not only for Blender's performance during the simulation and the rumored "Interactive Mode", but it is good for every developers that want to export physics data for any external interactive applications (the native support for exporting of .bullet file is another proposal I made some week ago :P).
Thank you!
5 Comments
Hi, i just added compound shapes. If you know how to compile blender yourself, here is the patch: developer.blender.org/D5797
No idea how long it takes for the patch to be approved, but i don't expect it to be in the 2.81 release.
* @Dadido3 * It looks awesome. Great work! If not in the 2.81 at least now we are a step more in the right direction. Thanks, really!
* @Dadido3 * Thank you for adding this!
How would a user define what shapes get used?
* @Jason van Gumster * I can think of 2 ways:
a) the "awesome way": the collision shapes become "first class citizens" and they can be edited in the world and shared between rigid bodies (what changes is in fact the positioning/length, a lot of shapes could be easily reused by different rigid bodies, in fact bullet suggests to do that if you have shapes that differs only on positioning / orientation).
b) the "less awesome" way, but satisfactory too: by composing a list of objects that contain the primitive shape, created and positioned in the world for exactly that purpose. This is very similar to what BGE did, but there was no list, just a hierarchy of nodes marked as "compound" in that case.