Page 1 of 1

Collada to Bullet loader/importer

Posted: Tue Oct 09, 2007 9:10 am
by Srekel
Hi

I've searched the forums and google but haven't really found a good answer to the question so I thought I'd throw it out.. I see everywhere that Bullet has support for Collada, but there's no info on how to load a collada file into bullet.
There is the Collada viewer in the demos, but from the look of it, it doesn't use any collada loader class in bullet. Instead it has it's own class for doing that. Surely it must be possible to have a Collada loader in the actual Bullet API?

The perfect thing would be to have something along the lines of this:

Code: Select all

btRigidBody* body = btLoadCollada( "C:\mymodel.dae" );
m_dynamicsWorld->addRigidBody(body);
Note that I'm very new to bullet so there might be more stuff (such as setting transformation etc.) that should be done in the code above, but in principle something like that would be really nice.

What are the options available now? Copying the ColladaConverter.h and cpp into your own projects? If so, why isn't it a part of Bullet?

Thanks for any help. :)

Re: Collada to Bullet loader/importer

Posted: Tue Oct 09, 2007 11:41 am
by projectileman
What I found in bullet is that there is piece of code that it's more like a Collada demo. There isn't a ready-to-use class that manages serialization and COLLADA.

Re: Collada to Bullet loader/importer

Posted: Tue Oct 09, 2007 10:06 pm
by Erwin Coumans
Yes, it should be straightforward to copy and paste the ColladaConverter.h and cpp into your own project. Those are ready-to-use classes that manages serialization and COLLADA.

[NEW] Bullet 2.63 has those files in a new ColladaConverter libary library in Extras/BulletColladaConverter

Thanks for the suggestion!
Erwin

Re: Collada to Bullet loader/importer

Posted: Wed Oct 10, 2007 4:06 pm
by Srekel
I think that would make a lot of sense. It should perhaps not belong in the core, as you say, but as some kind of extra library. That will make it a lot easier for the person "responsible" for the collada loader to update it. Or rather, it will make it easier for everyone who will not have to copy-paste the files manually into their projects when they need an update.

Not to mention that it will be a lot easier to wrap by automatic language wrappers, such as Py++. Don't know how important this is to most people, but it is to me. :)


Or is there a risk that people will want to write their own versions of the collada loader? I mean, perhaps they really need custom processing stuff done. It seems to me that it shouldn't be the case - if the collada loader can take any dae-file exported from say Blender, and create the appropriate hierarchies of shapes and rigid bodies and constraints, I'm not sure what else one could want. Perhaps some sort of callback for each object, or something like that? That could be formalized too (instead of everyone doing their own version). This of course depends on how much work is needed...

Just my opinions. :)

Re: Collada to Bullet loader/importer

Posted: Tue Oct 16, 2007 2:19 pm
by ngaloppo
Bullet 2.63 has those files in a new ColladaConverter libary library in Extras/BulletColladaConverter
Thanks Erwin, that's really useful!

Re: Collada to Bullet loader/importer

Posted: Sat Mar 30, 2013 6:21 am
by chrisa
is this still available anywhere?

Re: Collada to Bullet loader/importer

Posted: Wed Jun 05, 2013 4:26 am
by Starfox
chrisa wrote:is this still available anywhere?
I'm starting work on a fork of OpenAssetImport ( http://assimp.sourceforge.net ) with Collada physics support if you're interested - early feedback and testing would be awesome.