Bullet + Blender + COLLADA + compound objects = bug?

Please don't post Bullet support questions here, use the above forums instead.
User avatar
gennoevus
Posts: 39
Joined: Sun Oct 10, 2010 4:39 am

Bullet + Blender + COLLADA + compound objects = bug?

Post by gennoevus »

Hello!

I'm not sure if I'm making some mistake or if I've found a bug. I really hope it's the former!

Let's say I'm exporting a 2x2 rigid body cube and a 0.8x0.8 rigid body cube from blender 2.49b using the COLLADA 1.4 exporter plugin (0.3.162)

When I export, and I look inside the *.dae, I find this:

Code: Select all

<shape>
    <box>
        <half_extents>1.00000 1.00000 1.00000</half_extents>
    </box>
</shape>

...

<shape>
    <box>
        <half_extents>0.40000 0.40000 0.40000</half_extents>
    </box>
</shape>
... which is correct as far as I can see. But! If I make a compound object of these two shapes, they:
a) both get the same 'half_extent' dimentions (i.e. they both say <half_extents>0.40000 0.40000 0.40000</half_extents> when the size of the boxes hasn't changed)
b) there doesn't seem to be anything in the XML that describes the parent/child relationship between the 2 boxes.

Code: Select all

<library_physics_models>
        <physics_model id="Scene-PhysicsModel" name="Scene-PhysicsModel">
            <rigid_body name="Plane-RigidBody" sid="Plane-RigidBody">
                <technique_common>
                    <dynamic>false</dynamic>
                    <mass>0</mass>
                    <instance_physics_material url="#Plane-PhysicsMaterial"/>
                    <shape>
                        <instance_geometry url="#Plane_001"/>
                    </shape>
                </technique_common>
            </rigid_body>
            <rigid_body name="Cube_001-RigidBody" sid="Cube_001-RigidBody">
                <technique_common>
                    <dynamic>true</dynamic>
                    <mass>1.0</mass>
                    <instance_physics_material url="#Cube_001-PhysicsMaterial"/>
                    <shape>
                        <box>
                            <half_extents>0.40000 0.40000 0.40000</half_extents>
                        </box>
                    </shape>
                </technique_common>
            </rigid_body>
            <rigid_body name="Cube-RigidBody" sid="Cube-RigidBody">
                <technique_common>
                    <dynamic>true</dynamic>
                    <mass>1.0</mass>
                    <instance_physics_material url="#Cube-PhysicsMaterial"/>
                    <shape>
                        <box>
                            <half_extents>0.40000 0.40000 0.40000</half_extents>
                        </box>
                    </shape>
                </technique_common>
            </rigid_body>
        </physics_model>
    </library_physics_models>
    <library_physics_scenes>
        <physics_scene id="Scene-Physics" name="Scene-Physics">
            <instance_physics_model url="#Scene-PhysicsModel">
                <instance_rigid_body body="Plane-RigidBody" target="#Plane"/>
                <instance_rigid_body body="Cube_001-RigidBody" target="#Cube_001"/>
                <instance_rigid_body body="Cube-RigidBody" target="#Cube"/>
            </instance_physics_model>
        </physics_scene>
    </library_physics_scenes>
The settings should be right because it behaves correctly when using the blender game engine.

Any ideas?
User avatar
gennoevus
Posts: 39
Joined: Sun Oct 10, 2010 4:39 am

Re: Bullet + Blender + COLLADA + compound objects = bug?

Post by gennoevus »

I someone knows anything, please help!

Even if you are not sure, any ideas are welcome! I'm in serious trouble if I can't get to the bottom of this ...
User avatar
gennoevus
Posts: 39
Joined: Sun Oct 10, 2010 4:39 am

Re: Bullet + Blender + COLLADA + compound objects = bug?

Post by gennoevus »

Nothing eh?

No one on any forum has been able to help, which is a bit of a shame. Other people must have the same problem!

I MUST have this problem solved because it is critical for what I am working on now. If no one can help me, I'll help myself! I'm learning Python now, and I'll code an exporter that keeps all the game logic/physics engine data in tact.

Although I'll probably have it export into my own file format (i.e. not COLLADA), I'll upload the script and file format specification once I'm done so that anyone else who encounters this problem will not have to suffer like I am.