blend2bam icon indicating copy to clipboard operation
blend2bam copied to clipboard

Compound physics bodies not supported

Open Clockwork-Muse opened this issue 5 years ago • 3 comments

Blender 2.91+ supports compound physics bodies: image

During blender sim: image

... but the converter doesn't recognize the type:

Unknown collision shape (COMPOUND) for object (Cube)
Could not create collision shape for object (Cube)

Panda node tree:

ModelRoot Scene T:(pos 0 -2 1) S:(LightAttrib)
  PandaNode Cube
    GeomNode Cube (1 geoms: S:(CullFaceAttrib MaterialAttrib TextureAttrib))
    PandaNode Cube.001 T:m(pos 0.225866 0 0)
      BulletRigidBodyNode Cube.001 (1 shapes) active mass=1
        GeomNode Cube.001 (1 geoms: S:(MaterialAttrib TextureAttrib))
    PandaNode Torus T:m(pos 0 0.207598 0)
      BulletRigidBodyNode Torus (1 shapes) active mass=1
        GeomNode Torus (1 geoms: S:(MaterialAttrib TextureAttrib))

... and because of that, the object falls apart: image

Sample blender file

Clockwork-Muse avatar Feb 05 '21 00:02 Clockwork-Muse

For the record, in Panda, a compound shape is made by simply attaching multiple CollisionSolid objects to the same CollisionNode, so it should be supportable.

rdb avatar Feb 05 '21 00:02 rdb

Compound shapes are also supported by the glTF extension being used for collision shapes. In other words, this should be a pretty straightforward add. However, both blend2bam and panda3d-gltf would need to be updated.

Moguri avatar Feb 05 '21 02:02 Moguri

For the record, in Panda, a compound shape is made by simply attaching multiple CollisionSolid objects to the same CollisionNode, so it should be supportable.

I'm aware (and of the way to do it in Bullet), but it means I have to write the code to do it until the exporters are updated.

Clockwork-Muse avatar Feb 05 '21 16:02 Clockwork-Muse