Collada to Bullet loader/importer

Physics APIs, Physics file formats, Maya, Max, XSI, Cinema 4D, Lightwave, Blender, thinkingParticles™ and other simulation tools, exporters and importers
Post Reply
Srekel
Posts: 2
Joined: Tue Oct 09, 2007 8:59 am

Collada to Bullet loader/importer

Post 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. :)
User avatar
projectileman
Posts: 109
Joined: Thu Dec 14, 2006 4:27 pm
Location: Colombia
Contact:

Re: Collada to Bullet loader/importer

Post 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.
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA
Contact:

Re: Collada to Bullet loader/importer

Post 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
Srekel
Posts: 2
Joined: Tue Oct 09, 2007 8:59 am

Re: Collada to Bullet loader/importer

Post 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. :)
ngaloppo
Posts: 11
Joined: Wed Dec 06, 2006 1:59 am
Location: Chapel Hill, NC

Re: Collada to Bullet loader/importer

Post by ngaloppo »

Bullet 2.63 has those files in a new ColladaConverter libary library in Extras/BulletColladaConverter
Thanks Erwin, that's really useful!
chrisa
Posts: 3
Joined: Thu Mar 28, 2013 9:50 am

Re: Collada to Bullet loader/importer

Post by chrisa »

is this still available anywhere?
Starfox
Posts: 37
Joined: Wed Jul 27, 2011 12:01 am

Re: Collada to Bullet loader/importer

Post 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.
Post Reply