Author Topic: [SOLVED]exporting Blender>Ogre>Bones  (Read 51819 times)

Offline efaj

  • byte
  • *
  • Posts: 32
    • View Profile
[SOLVED]exporting Blender>Ogre>Bones
« on: December 27, 2011, 02:11:11 pm »
Exception in thread "main" java.util.NoSuchElementException: tag [-in] not found
   at raft.jpct.bones.util.ComLineArgs.getArg(ComLineArgs.java:97)
   at raft.jpct.bones.util.ComLineArgs.getArg(ComLineArgs.java:115)
   at raft.jpct.bones.util.JMEOgreImporter.main(JMEOgreImporter.java:149)

It's not due to Bones, as the exporter (Blender 2.61 to Ogre) is giving my errors already, but I'm curious: What does this error mean? What in particular is missing? (And just in case, which is the file that I should pass to jmeOgre2Bones.sh ? )
« Last Edit: January 05, 2012, 04:46:04 pm by efaj »

Offline raft

  • Moderator
  • quad
  • *****
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: tag [-in] not found
« Reply #1 on: December 27, 2011, 02:16:46 pm »
if you give no arguments it will display a help

basic usage is as follows:
Code: [Select]
JMEOgreImporter [options] -in <ogre.mesh.xml> [ogre.mesh.xml...]
for example:
Code: [Select]
JMEOgreImporter -out myFile.bones -in MyOgre.mesh.xml
you got the exception because you give at least one argument but omit the mandatory -in tag

Offline efaj

  • byte
  • *
  • Posts: 32
    • View Profile
Re: tag [-in] not found
« Reply #2 on: December 27, 2011, 03:09:13 pm »
-infinite amounts of facepalm- Ok, now it got past that. And it got me more intrigued o.O

Code: [Select]
Skeleton created out of jME OGRE skeleton, 16 joints
Exception in thread "main" java.lang.NullPointerException
at raft.jpct.bones.BonesImporter.convertJMEMeshData(BonesImporter.java:438)
at raft.jpct.bones.BonesImporter.importOgre(BonesImporter.java:193)
at raft.jpct.bones.util.JMEOgreImporter.loadGroup(JMEOgreImporter.java:112)
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)
The error the exporter gave me was regarding:
Error: root bone has non-zero transform (location offset)
So, I'd assume what should be missing is the armature/skeleton... but that line points to a mesh array, and it prints as if apparently the skeleton was alright.

Anyways, this time it goes to any Blender user out there:
Error: root bone has non-zero transform (location offset)
How do I fix that? I already tried CTRL+A to apply everything it gave me an option to and didn't help. In Edit Mode it doesn't work, so as to maybe set it to the bone directly.

Offline raft

  • Moderator
  • quad
  • *****
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: tag [-in] not found
« Reply #3 on: December 27, 2011, 03:23:15 pm »
are you sure you are using latest version? as mentioned in this thread that exception is solved

i'm not a Blender guy. so I can't help you about that.

have you tried clearing transform of root bone?

Offline efaj

  • byte
  • *
  • Posts: 32
    • View Profile
Re: tag [-in] not found
« Reply #4 on: December 27, 2011, 04:37:29 pm »
Checking at the source, it looks like it was already applied on my version. And the modified date matches. Anyways, re-downloading from http://www.aptalkarga.com/bones/bones.zip .

Same thing happened... and now I downloaded ones preconverted. (Ninja is converted correctly though)

And about the transform issue... if I knew how, I would. I've been googling and asking around, and nothing found nor any reply yet.

Offline raft

  • Moderator
  • quad
  • *****
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: tag [-in] not found
« Reply #5 on: December 27, 2011, 04:41:52 pm »
interesting. i'll pm my email to you. if you send me mesh amd skeleton files, i'll have a look..

Offline efaj

  • byte
  • *
  • Posts: 32
    • View Profile
Re: tag [-in] not found
« Reply #6 on: December 28, 2011, 01:53:16 am »
I followed this recomendations that seem to be in general more "export friendly" http://www.stonetrip.com/developer/forum/viewtopic.php?f=24&t=24553
Except for the way the bone is placed, instead of extending on X, it extends on Z (which is like Ninja is)
Now, the root bone error is gone and the exporter shows no error and the correct amount of animations, etc, exported.
Bones script gives the same errors though.

Sent you two, one before I applied the fix, and the latest with the fix.

Offline bili

  • byte
  • *
  • Posts: 39
    • View Profile
Re: tag [-in] not found
« Reply #7 on: December 28, 2011, 02:15:25 am »
plz go to my post #4 in http://www.jpct.net/forum2/index.php/topic,2475.0.html thread for more details.

Offline raft

  • Moderator
  • quad
  • *****
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: tag [-in] not found
« Reply #8 on: December 28, 2011, 01:35:25 pm »
please download and try this version:
http://www.aptalkarga.com/bones/bones_beta.zip

this fixes the NullPointerException. indeed this is a workaround. i consider this as a jME bug. it places a null texture buffer among others. anyway..

but you will encounter another problem. it's either caused by jME or Blender exporter, I'm not sure yet. play with exporter options and try to switch off "shared geometry"

Offline efaj

  • byte
  • *
  • Posts: 32
    • View Profile
Re: tag [-in] not found
« Reply #9 on: December 28, 2011, 02:23:04 pm »
My exporter gives me no options... hmm... jME.

I'm going to browse around jME stuff and see what I can do and export stuff the way they do and see if there are related problems there.
Now I'm almost sure it has to be the exporter.

EDIT: Nope, I'm using the exporter they all use... at least the ones with 2.6
« Last Edit: December 28, 2011, 03:11:02 pm by efaj »

Offline raft

  • Moderator
  • quad
  • *****
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: tag [-in] not found
« Reply #10 on: December 28, 2011, 03:56:36 pm »
nope, it's jME. and I guess I fixed it. please re-download the beta from the link above

Offline efaj

  • byte
  • *
  • Posts: 32
    • View Profile
Re: exporting Blender>Ogre>Bones
« Reply #11 on: December 29, 2011, 04:41:51 am »
My laptop broke... I'll have to check this later...  :'(

Offline efaj

  • byte
  • *
  • Posts: 32
    • View Profile
Re: exporting Blender>Ogre>Bones
« Reply #12 on: December 30, 2011, 01:21:34 pm »
You know... I had downloaded it on my laptop, and now I was going to redownload it to my netbook to try it here... but it's downloading at 0.1 kbps o.O
Is your server undergoing maintenance or what?

Offline raft

  • Moderator
  • quad
  • *****
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: exporting Blender>Ogre>Bones
« Reply #13 on: December 30, 2011, 01:36:06 pm »
must be a temporary or local issue. i can download with more than >300kbps

Offline efaj

  • byte
  • *
  • Posts: 32
    • View Profile
Re: exporting Blender>Ogre>Bones
« Reply #14 on: December 31, 2011, 10:29:50 am »
Yup, it downloaded smoothly now.
Alright, tried it and sweet! It's on screen and it shows me the animation option (I'm testing using the LoadBonesFormatSample...
But, it's not getting animated the walk and some faces are missing: Bottom chest area, all the back, and upper part of left leg (Also, there's some in both legs that when rotated show like weird parts of the texture, from the upper areas... maybe some chest but I also see some skin, so it may be head too, but I think it may be the model -Ok, never mind this, I found there's some extra faces inside the legs and I'm on them-)
*sigh* the netbook gets stuck with Blender... couldn't even check for those faces. I'll have to postpone the 3D dev for now. How did it looked in your test -if any-?