Compound Shapes Questions
Posted: Sun Feb 10, 2013 7:13 pm
1) Do compound shapes have as much overhead as if each collider were a separate rigidbody? (I'm about to use Unity3D's implementation of PhysX as an example, but I am asking about how the Bullet physics engine handles this situation particularly.) A few weeks ago I was doing physics experiments in Unity3D (it uses the PhysX engine), and I noticed that my CPU was starting to choke on ~8,000 rigidbody cubes (just plain simple, primitive, cubes). Now that is an excessive amount of rigidbodies, understandably, but what is concerning is I then turned those 8,000 cubes into 80, but gave each of those 80 rigidbodies about 100 compound colliders (as cube shapes as well). When I ran the scene again, I was expecting to have ultra smooth performance as I thought I was mainly simulated 80 rigidbodies, but it crawled just as slow as when I had 8,000 individual rigidbody cubes. Maybe someone can explain if this is how all physics engines work or if there is just something odd about how Unity3D has implemented the PhysX engine? Also, I had run tests on the 80 rigidbody setup (with the 100 compound shapes) where they were all significantly separated as not to collide with each other, and it was STILL maxing the CPU. They were not asleep because they were falling under the influence of gravity, I'm just trying to simulate a lot of motion for my game. Would this situation run much faster if I were to use the Bullet physics engine?
2) Is there a visual method for piecing together compound shapes? Like in the situation of my previous example where you have maybe 100 compound colliders on a single rigidbody. Is there a known way to use a program like blender or something to visually encapsulate your object with many colliders and import that into bullet?
Thanks!
2) Is there a visual method for piecing together compound shapes? Like in the situation of my previous example where you have maybe 100 compound colliders on a single rigidbody. Is there a known way to use a program like blender or something to visually encapsulate your object with many colliders and import that into bullet?
Thanks!