Page 1 of 1

Attaching bones to meshes in game

Posted: Sun Oct 26, 2008 10:03 pm
by Daystar
I want to make a character customization system in one of my other projects, what I wanted to do is make it so that the player puts his or her character together from various modeled meshes then once done the bone would be added to the custom mesh in game. My question is is this possible and if so how would I go about doing it?

Re: Attaching meshes to bones in game

Posted: Sun Oct 26, 2008 10:06 pm
by Lambda
Daystar wrote:I want to make a character customization system in one of my other projects, what I wanted to do is make it so that the player puts his or her character together from various modeled meshes then once done the bone would be added to the custom mesh in game. My question is is this possible and if so how would I go about doing it?
Yes, you can call meshnode->getJointNode( "name" )->addChild( weaponmesh );

Also, you can take a look there -> http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=30682

Re: Attaching meshes to bones in game

Posted: Sun Oct 26, 2008 11:10 pm
by Acki
Lambda wrote:Yes, you can call meshnode->getJointNode( "name" )->addChild( weaponmesh );

Also, you can take a look there -> http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=30682
he wants it the other way, create a mesh and attach bones to it
(so the subject is misleading, it should be "Attaching bones to meshes in game")... :lol:
and this is not possible with Irrlicht, I think...
also it must be possible in some way, because the mesh loaders also can do it,
or how do they create meshes with bones !?!?! :shock:

Posted: Mon Oct 27, 2008 8:16 am
by JP
i guess it's possible for irrlicht but not for irrlicht users, i.e. creating bones is private to irrlicht so not accessible to users of the library. If you want access you can always make it public by editing the irrlicht source, probably best to add some functions to smgr like create/addBone.

Posted: Mon Oct 27, 2008 10:47 am
by Daystar
JP wrote:i guess it's possible for irrlicht but not for irrlicht users, i.e. creating bones is private to irrlicht so not accessible to users of the library. If you want access you can always make it public by editing the irrlicht source, probably best to add some functions to smgr like create/addBone.
so what ur saying is that I would have to figure out how to make bones in the format im using?

Posted: Mon Oct 27, 2008 10:51 am
by JP
No, you'd just have to expose the irrlicht functions that create bones, i.e. look though the source code and see how irrlicht creates bones when loading skeletal meshes and then allow those functions to be used outside of irrlicht.

Posted: Mon Oct 27, 2008 12:18 pm
by hybrid
Or better ask Luke about his plans. I think he's going to expose some more functionality.

Posted: Mon Oct 27, 2008 1:20 pm
by Daystar
Thanks all, I PM Luke and he told me how to do it thanks. When I get it working Ill post my code.