Author Topic: Bones using jme library which does not support morph animation  (Read 14903 times)

Offline kkl

  • float
  • ****
  • Posts: 291
    • View Profile
Hi,

I'm using Blender2Ogre to export ogre mesh. It seems like the exporter uses morph animation instead of pose animation (morph animation is similar to pose animation as described by ogre http://www.ogre3d.org/docs/manual/manual_78.html).

It prompts error when attempt to convert mesh.xml to bones
Code: [Select]
        Exception in thread "main" java.lang.IllegalArgumentException: jointIndex: -1
        at raft.jpct.bones.MeshChannel.<init>(MeshChannel.java:39)
        at raft.jpct.bones.MeshChannel.<init>(MeshChannel.java:25)
        at raft.jpct.bones.BonesImporter.convertJMEMeshChannel(BonesImporter.java:609)
        at raft.jpct.bones.BonesImporter.importOgre(BonesImporter.java:259)
        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:169)

I backtracked the code and notice jme library in Bones does not support morph animation. Do we have a newer jme library which support for that? If we use latest version, does it break anything?

Offline AGP

  • quad
  • ******
  • Posts: 1726
    • View Profile
Re: Bones using jme library which does not support morph animation
« Reply #1 on: March 27, 2016, 10:39:10 pm »
I think that the way we're expected to import models into bones is extremely "hacky." I'm trying to circumvent that by creating a JSON-serialized (as opposed to Java-serialized) format that gets exported right out of Max (later, I expect to convert the Max Script to Blender's Python as well). The script is coming along nicely, but I haven't had to create an AnimatedGroup from its product yet, so I don't how long that will take.

To answer your question, I don't think there's a usable new importer (from what I gather, jME3 actually has FEWER importers than 2 to begin with).

Offline raft

  • Moderator
  • quad
  • *****
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: Bones using jme library which does not support morph animation
« Reply #2 on: March 29, 2016, 09:29:21 am »
I backtracked the code and notice jme library in Bones does not support morph animation. Do we have a newer jme library which support for that? If we use latest version, does it break anything?
nope, sorry. simply Bones doesnt support morph animation.

and why do you need morph animation with Bones? that kind of animation is what jPCT supports out of the box. export to a jPCT supported format (like MD2) and use that.

Offline kkl

  • float
  • ****
  • Posts: 291
    • View Profile
Re: Bones using jme library which does not support morph animation
« Reply #3 on: March 29, 2016, 02:57:19 pm »
Quote
I think that the way we're expected to import models into bones is extremely "hacky."
Agree with u, AGP. I notice even from blender2orge to bones, all the processes are written by different entity, which output different results.

Quote
and why do you need morph animation with Bones?
Hi raft, i checked blender2orge and they always export mesh xml with xml tag "animation" with value "mesh", in which the jme library will return -1 for jointIndex. I tried hacking the blender2orge exporter plugin by changing xml tag from "mesh" to "submesh" and somehow it works in Bones now.

Quote
export to a jPCT supported format (like MD2) and use that
I thought of that too, but the latest Blender seems to not supporting md2 export anymore and I can't find any other similar plugin for it.

Offline Varanda

  • byte
  • *
  • Posts: 29
    • View Profile
Re: Bones using jme library which does not support morph animation
« Reply #4 on: March 29, 2016, 06:08:43 pm »
I am using Blender exporter for both scene and bones for the last few days. Bones addon (Ogre) is a bit tricky to use. Trace dump sometimes brings wrong information (unless you really debug the root cause).

Here some tips:

- Even for meshes with Materials without file textures you need to unwrapp and add an image as texture. Make sure you load the image in UV Editor (only in material/texture property tab is not enough).
- Make sure that you do not have any mesh in edit mode when running the exporter. Otherwise, the exporter crashes.
- MOST IMPORTANT OF ALL: Always give a destination folder other than your project root. The first thing that the exporter does in to delete the destination directory (entire content). I lost my entire project when I run the exporter first time. JUST IN CASE MAKE A BACKUP before using this exporter.