# How to correctly create bullet rigid from custom .mesh in Ogre?

Being new to 3d programming and bullet physics in particular, I am wondering how a 3d model or the mesh generated out of it effects the accuracy of bullet physics simulation.

I have written a small Ogre 3d application in C++, including/using bullet for physics. In a small scene I add a plane as ground and three boxes (simple blender objects that come with Ogre) that have their initial position a bit over that ground. So after starting the application those three boxes fall down until they hit the ground plane, where they move a bit, depending on their initial height and rotation, until they come to a halt.

Watching that scene the bullet physics simulation looks very accurate and realistic, also the boxes seem to touch the ground very exactly.

Ok, then I have created a box model in Sketchup 8 and exported it to an Ogre .mesh file. Then I use this model instead for those three boxes in my scene. The C++ code itself is not changed at all (except that I load the new .mesh file for the boxes).

However, even though on the screen those new box models look exactly as the original ones, their movement is not correct any more. They fall to the ground plane fine, but then they move very weird, it looks not as realistic as before. Even worse, after they have stopped their movement those three boxes now "float" a bit over the ground plane, they do not touch it. I can also see their shadow now below the box on the plane, so they are really not touching the ground plane.

TL;DR: Scene with three boxes, falling down to the ground, simulated by bullet. That works fine with default Ogre (blender) .mesh files for the boxes. But with custom Sketchup models (.mesh files) instead for the boxes, but the same code, the bullet simulation does not work correctly any more.

My question is: how does the mesh of a model impact the accuracy of bullet?
And: what can I do to solve that issue with my custom Sketchup models?

PS: I load the .mesh file and convert it to a bullet rigid body as following:

m_pSceneMgr->createEntity("Cube1", "Cube.mesh");
...
BtOgre::StaticMeshToShapeConverter converter(m_pSceneMgr->getEntity("Cube1"));
btCollisionShape* colShape = converter.createBox();

• Ogre's box was probably an actual bullet physics box, and when you loaded the model it was used as a convex mesh. This could change the behavior slightly but the movement should still appear correct. – Grimshaw May 11 '13 at 17:12
• @DevilWithin: Maybe I have misunderstood your comment, but I simply load the .mesh file and then convert the entity to a bullet rigid. I have updated the original question accordingly to show some code. – Matthias May 11 '13 at 17:18

• Thanks, but unfortunately that does not help. Changing the createBox() call to createConvex() had an interesting effect on the boxes: they now balance on one of their edges after falling down to the ground. What bugs me is the fact that the original Ogre (Blender) meshes do work fine with the createBox() call. I would like to know: what (kind of) information can be (and is) encoded in those Ogre/Blender meshes, which my custom Sketchup models/meshes do not have? – Matthias May 11 '13 at 20:20