Author Topic: How to export the mesh and skeleton xml to bones file  (Read 16623 times)

Offline Carlos Mateo

  • byte
  • *
  • Posts: 16
    • View Profile
How to export the mesh and skeleton xml to bones file
« on: January 20, 2016, 10:49:14 pm »
Hello I'm new using bones to export a model to my Android App with JPCT-AE.

I have read the tutorial and I have exported my model from Blender within the Ogre3D plugin, and I have obtained the mesh and skeleton file.

My problem is that I don't know how to export it to bones file. I don,t know where I can find the JMEOgreImporter and how to use it.

Thank you in advance.

Offline raft

  • Moderator
  • quad
  • *****
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: How to export the mesh and skeleton xml to bones file
« Reply #1 on: January 21, 2016, 08:51:34 am »
there are scripts in the scripts folder, you can use them. which behind the scenes uses importer classes in raft.jpct.bones.util package.

by using desktop samples, for example OgreSample you can load directly Ogre3D model and inspect your model, skeleton and and animations.

Offline Carlos Mateo

  • byte
  • *
  • Posts: 16
    • View Profile
Re: How to export the mesh and skeleton xml to bones file
« Reply #2 on: January 22, 2016, 12:21:33 pm »
Thank you, I got it...my problem now is that I want to rotate a bone programmatically with its respective mesh. I have access to the skeleton of the animatedGroup3D and then to the respective joint, but it doesn't have an option to rotate it. How can I get it??

Thanks in advance

Offline raft

  • Moderator
  • quad
  • *****
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: How to export the mesh and skeleton xml to bones file
« Reply #3 on: January 22, 2016, 12:58:31 pm »
have a look at ProceduralAnimationSample. and also this thread

Offline lbb19930915

  • byte
  • *
  • Posts: 7
    • View Profile
Re: How to export the mesh and skeleton xml to bones file
« Reply #4 on: November 18, 2016, 05:27:12 am »
I have the same question.There are just a bones.jar,and how can I use it? Is there a example?please~

Offline lbb19930915

  • byte
  • *
  • Posts: 7
    • View Profile
Re: How to export the mesh and skeleton xml to bones file
« Reply #5 on: November 18, 2016, 08:00:30 am »
I have the same question.There are just a bones.jar,and how can I use it? Is there a example?please~

I now understand how wo use the commandLine.But I enter the following error. Can anybody help me?(__.mesh.xml is my mesh file)
java -classpath /Users/mac02/Desktop/studiospace/test/JpctTest/app/libs/bones.jar  raft.jpct.bones.util.JMEOgreImporter -out /Users/mac02/Desktop/jpct/che.bones -in /Users/mac02/Desktop/jpct/__.mesh.xml
Exception in thread "main" java.lang.NoClassDefFoundError: com/jmex/model/ogrexml/OgreLoader
   at raft.jpct.bones.util.JMEOgreImporter.loadGroup(JMEOgreImporter.java:109)
   at raft.jpct.bones.util.JMEOgreImporter.loadGroup(JMEOgreImporter.java:88)
   at raft.jpct.bones.util.JMEOgreImporter.run(JMEOgreImporter.java:69)
   at raft.jpct.bones.util.JMEOgreImporter.main(JMEOgreImporter.java:170)
Caused by: java.lang.ClassNotFoundException: com.jmex.model.ogrexml.OgreLoader
   at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
   at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
   ... 4 more

Offline raft

  • Moderator
  • quad
  • *****
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: How to export the mesh and skeleton xml to bones file
« Reply #6 on: November 18, 2016, 02:42:07 pm »
use the provided scripts in scripts folder instead of directly using JMEOgreImporter. if you provide no arguments to script it will display usage