Something wrong with mesh made in Blender and joints..

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
Nerexis
Posts: 27
Joined: Sun Dec 09, 2007 4:18 pm

Something wrong with mesh made in Blender and joints..

Post by Nerexis »

I made simple character mesh and i attached armature to it in Blender.
Armature works fine in Blender and i exported it to .b3d format by Gandalf's exporter but game dont see armature part...

I want to move one bone:

Code: Select all

IAnimatedMeshSceneNode *abc = smgr->addAnimatedMeshSceneNode(smgr->getMesh("meshes/abc.b3d"));
	abc->setJointMode(EJUOR_CONTROL)
	abc->getJointNode("arm")->setPosition(vector3df(2,2,2));
But it says:
"Joint with specified name not found in skinned mesh.: arm"

Whats wrong?
Here is my .blend file:
http://www.speedyshare.com/831374413.html
Nerexis
Sorry for bad English.
Frank Dodd
Posts: 208
Joined: Sun Apr 02, 2006 9:20 pm

Post by Frank Dodd »

I really do not know much about creating and exporting animations in blender yet but it appears that your object does not have an action associated with the armature. When an action has been associated with the armature in Blender the Blitz3D exporter will then put the name of the action in the Action name box or you will be able to select an action if you attach multiple ones I assume.

I very roughly (because I didn't really know what I was doing) attached an action to the armature the name of the action appeared in the box, the name of the armature joint also appeared in the .b3d file (i renamed it to my_arm) because the word ARm appears in the file associated with the Armature I suspect, I was then able to use my IrrlichtWrapper joint animation example to quickly load the file and get a hold of the joint object.

However I was unable to move the joint by rotating the object I suspect there might be something else wrong in there, perhaps someone with more experience can suggest an explanation.
Nerexis
Posts: 27
Joined: Sun Dec 09, 2007 4:18 pm

Post by Nerexis »

I added action to armature and still same error.
Nerexis
Sorry for bad English.
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

Can you list down the steps you did starting from setting-up the armature down to parenting. I'll respond only after you write the steps you made.

Thanks.
Image
Nerexis
Posts: 27
Joined: Sun Dec 09, 2007 4:18 pm

Post by Nerexis »

1. When i done modelling i added armature then extruded it
2. I turned on Enevelope mode then i scalled enevelopes to attach each polygon to bones
3. In object mode i selected character model then i added Armature modifier and i wrote Armature in OB editbox
4. Added action in Action Editor
5. Exported

I dont know if it's correct cuz im not experienced with Blender.
Nerexis
Sorry for bad English.
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

Thank you,

Now, can you write down the steps you made to parent the bone to the mesh? Or parent the mesh to bone?

I guess that's step #3...

Well, step #3 will not work if you're using Gandalf's B3D exporter.

Do you want to know the answer? please respond with a yes in your next reply.
Image
Nerexis
Posts: 27
Joined: Sun Dec 09, 2007 4:18 pm

Post by Nerexis »

Yes.. and what is different way to do this?
Nerexis
Sorry for bad English.
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

Ok, you replied with a Yes...

Here's the answer:

For step #3, you will have to parent the armature to the bone. Now, how do you do that? Well, follow the steps shown below:

1) You have to have only one armature, select that in object mode.

2) You have to have only one mesh. Hold down the shift key and select the mesh.

3) Press ctrl+P and select 'Named Groups'

Note: That is how I remember it at the moment, it will most probably incomplete since I don't have Blender running at the moment. But that is generally how you do it.

PS: I might have switched the mesh-armature parenting. So if step #1 and #2 doesn't work, try switching it by selecting the armature first and parent it to the mesh.
Last edited by dlangdev on Mon Dec 29, 2008 9:42 pm, edited 1 time in total.
Image
Nerexis
Posts: 27
Joined: Sun Dec 09, 2007 4:18 pm

Post by Nerexis »

Works :O Tyvm :)
Nerexis
Sorry for bad English.
Post Reply