Author Topic: Skeletal model file location in the project?  (Read 18032 times)

Offline neo187

  • int
  • **
  • Posts: 73
    • View Profile
Skeletal model file location in the project?
« on: September 11, 2011, 10:31:21 pm »
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!

Offline raft

  • Moderator
  • quad
  • *****
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: Skeletal model file location in the project?
« Reply #1 on: September 11, 2011, 10:47:46 pm »
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.

Offline neo187

  • int
  • **
  • Posts: 73
    • View Profile
Re: Skeletal model file location in the project?
« Reply #2 on: September 12, 2011, 11:48:19 am »
Ok cool. How can I launch the conversion script to convert the xml file?

Thank you for the reply, very helpful.

Offline raft

  • Moderator
  • quad
  • *****
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: Skeletal model file location in the project?
« Reply #3 on: September 12, 2011, 11:53:04 am »
script files displays help if no argument is given. anyway, here is an example

Code: [Select]
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

Offline neo187

  • int
  • **
  • Posts: 73
    • View Profile
Re: Skeletal model file location in the project?
« Reply #4 on: September 12, 2011, 12:48:11 pm »
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.