Page 1 of 1

Collada demo? Where?

Posted: Tue Jun 01, 2010 5:40 pm
by lilezek
I've looked for collada demo in bullet folder, in google, in this forum, but I only found people talking about it, nothing useful. Can anyone tell me where can I find a Collada into bullets demo?

Re: Collada demo? Where?

Posted: Tue Jun 01, 2010 6:49 pm
by Erwin Coumans
Bullet now has its own built-in binary serialization for the .bullet format in Bullet/Demos/SerializeDemo.

COLLADA_DOM, libxml and Demos/ColladaDemo have been moved to the Dynamica Maya plugin project. You can download it from http://dynamica.googlecode.com
Thanks,
Erwin

Re: Collada demo? Where?

Posted: Wed Jun 02, 2010 1:50 pm
by lilezek
Then how can I export a model from blender, and import it in bullet?

Re: Collada demo? Where?

Posted: Wed Jun 02, 2010 5:40 pm
by Erwin Coumans
lilezek wrote:Then how can I export a model from blender, and import it in bullet?
You can use the modified Blender 2.49b and export a .bullet file using a python command. See a included .blend file for an example, just press 'p' and spacebar).
See http://bulletphysics.org/mediawiki-1.5. ... ialization or http://code.google.com/p/bullet-physics ... loads/list for patch and Windows precompiled binary.

Hopefully a future version of Blender 2.5 or later will include .bullet export natively (without patch)
Thanks,
Erwin

Re: Collada demo? Where?

Posted: Sat Jun 26, 2010 10:19 pm
by youen
Just a precision about the "press 'p' and spacebar", because it took me some time to understand : 'p' starts the blender game engine, and spacebar triggers the export script to create the .bullet file. This trigger is set up in the test scene, again with the blender game engine. I guess it is set up this way because the game engine needs to be loaded before the script works. Trying to execute the script alone does not work. Hope this may save time to someone reading this post :-)

This leads to a question too : is there another way to export a bullet file from blender ? I would like a python script that works on its own, without starting the game engine. My objective is to write a little script to export meshes (using the ogre exporter) and a bullet file, in one click, without needing to set up weird things in the scene. It seems weird to me that bullet does not have a proper toolchain to export assets from blender. I would be happy to contribute anything I might write, but I don't know blender well, so I'm not sure...

Yet another question : is it possible to export a bullet triangle mesh as a static body ? It does not seem to work (the bullet file does not contain the collision shape). Using a convex shape works, but my mesh is not convex, so it's not the result I want...

Edit : it seems the collision shape is exported when using a "rigid body" in blender, instead of "static". Then I set the body mass to zero in code, to have a static body.