Skeletal model file location in the project?

Started by neo187, September 11, 2011, 10:31:21 PM

Previous topic - Next topic

neo187

Hello

Am just exploring the Bones framework, I can't seem to understand where the mesh file needs to be placed in order to be loaded correctly. In the ninja demo I understand that the loading is done with this line:

Resources res = getResources();
masterNinja = BonesIO.loadGroup(res.openRawResource(R.raw.ninja));


But if I look in the project's res/raw folder I can only find the ninja.group.bones file and not the xml ones, which otherwise I can find the the Bones project in the Samples/Data/Ninja folder...

Could anyone shed some light?

Thank you!

raft

ninja demo uses Bones' native format which is the recommended format. you can use the scripts provided or BonesIO class to convert from Ogre to Bones format

Bones format is recommended because it's faster and Bones uses jME's Ogre loader so it needs jME classes in classpath to load Ogre files.

neo187

Ok cool. How can I launch the conversion script to convert the xml file?

Thank you for the reply, very helpful.

raft

script files displays help if no argument is given. anyway, here is an example

jmeOgre2Bones -out myGroup.bones -rotation x180 -in myMesh.xml

note: what is unusual here is -in argument is always the last. that's because there may be more then one in file

neo187

Thanks for the speedy reply, I had figured after playing around a bit with it.... For other "slow" users like me who don't get it immediately and may be reading this, it's a command to run from the command prompt. What I did was to copy the entire "Bones" project folder to the desktop, then changed the command directory to my Desktop and ran this command:

C:\.......\Bones\script\jmeOgre2Bones -out ninja.group.bones -in ninja.mesh.xml


Thanks for your help Raft.