Author Topic: Error: Ogre .mesh.xml -> .bones  (Read 3101 times)

Offline kiffa

  • long
  • ***
  • Posts: 199
    • View Profile
Error: Ogre .mesh.xml -> .bones
« on: July 20, 2012, 04:50:34 am »
Converting .mesh.xml to .bones, error hanppend.
How to resolve it? Thanks!
Info:

Warning:  Rotation axis not normalized
 com.jmex.model.ogrexml.anim.SkeletonLoader loadSkele

// Many similar Warning.....

-- total 64 joint(s) --
0 name: CZ_scens09:dog_rigging_finshed_ok:br_bone, parent:
1 name: CZ_scens09:dog_rigging_finshed_ok:joint52, parent:
2 name: CZ_scens09:dog_rigging_finshed_ok:joint1, parent: 0:CZ_scens09:dog_rigg
ng_finshed_ok:br_bone
3 name: CZ_scens09:dog_rigging_finshed_ok:joint_zong, parent: 0:CZ_scens09:dog_
igging_finshed_ok:br_bone
4 name: CZ_scens09:dog_rigging_finshed_ok:veter_a, parent: 0:CZ_scens09:dog_rig
ing_finshed_ok:br_bone
5 name: CZ_scens09:dog_rigging_finshed_ok:joint53, parent: 1:CZ_scens09:dog_rig
ing_finshed_ok:joint52
6 name: CZ_scens09:dog_rigging_finshed_ok:joint2, parent: 2:CZ_scens09:dog_rigg
ng_finshed_ok:joint1
7 name: CZ_scens09:dog_rigging_finshed_ok:joint5, parent: 3:CZ_scens09:dog_rigg
ng_finshed_ok:joint_zong
8 name: CZ_scens09:dog_rigging_finshed_ok:joint73, parent: 3:CZ_scens09:dog_rig
ing_finshed_ok:joint_zong
9 name: CZ_scens09:dog_rigging_finshed_ok:veter_b, parent: 4:CZ_scens09:dog_rig
ing_finshed_ok:veter_a
10 name: CZ_scens09:dog_rigging_finshed_ok:joint54, parent: 5:CZ_scens09:dog_ri
ging_finshed_ok:joint53
11 name: CZ_scens09:dog_rigging_finshed_ok:joint3, parent: 6:CZ_scens09:dog_rig
ing_finshed_ok:joint2
12 name: CZ_scens09:dog_rigging_finshed_ok:joint6, parent: 7:CZ_scens09:dog_rig
ing_finshed_ok:joint5
13 name: CZ_scens09:dog_rigging_finshed_ok:joint74, parent: 8:CZ_scens09:dog_ri
ging_finshed_ok:joint73
14 name: CZ_scens09:dog_rigging_finshed_ok:veter_c, parent: 9:CZ_scens09:dog_ri
ging_finshed_ok:veter_b
15 name: CZ_scens09:dog_rigging_finshed_ok:joint55, parent: 10:CZ_scens09:dog_r
gging_finshed_ok:joint54
16 name: CZ_scens09:dog_rigging_finshed_ok:joint4, parent: 11:CZ_scens09:dog_ri
ging_finshed_ok:joint3
17 name: CZ_scens09:dog_rigging_finshed_ok:joint81, parent: 12:CZ_scens09:dog_r
gging_finshed_ok:joint6
18 name: CZ_scens09:dog_rigging_finshed_ok:joint80, parent: 13:CZ_scens09:dog_r
gging_finshed_ok:joint74
19 name: CZ_scens09:dog_rigging_finshed_ok:veter_d, parent: 14:CZ_scens09:dog_r
gging_finshed_ok:veter_c
20 name: CZ_scens09:dog_rigging_finshed_ok:joint56, parent: 15:CZ_scens09:dog_r
gging_finshed_ok:joint55
21 name: CZ_scens09:dog_rigging_finshed_ok:joint11, parent: 16:CZ_scens09:dog_r
gging_finshed_ok:joint4
22 name: CZ_scens09:dog_rigging_finshed_ok:joint38, parent: 16:CZ_scens09:dog_r
gging_finshed_ok:joint4
23 name: CZ_scens09:dog_rigging_finshed_ok:joint61, parent: 16:CZ_scens09:dog_r
gging_finshed_ok:joint4
24 name: CZ_scens09:dog_rigging_finshed_ok:joint82, parent: 17:CZ_scens09:dog_r
gging_finshed_ok:joint81
25 name: CZ_scens09:dog_rigging_finshed_ok:joint79, parent: 18:CZ_scens09:dog_r
gging_finshed_ok:joint80
26 name: CZ_scens09:dog_rigging_finshed_ok:joint57, parent: 20:CZ_scens09:dog_r
gging_finshed_ok:joint56
27 name: CZ_scens09:dog_rigging_finshed_ok:joint12, parent: 21:CZ_scens09:dog_r
gging_finshed_ok:joint11
28 name: CZ_scens09:dog_rigging_finshed_ok:joint39, parent: 22:CZ_scens09:dog_r
gging_finshed_ok:joint38
29 name: CZ_scens09:dog_rigging_finshed_ok:joint16, parent: 23:CZ_scens09:dog_r
gging_finshed_ok:joint61
30 name: CZ_scens09:dog_rigging_finshed_ok:joint83, parent: 24:CZ_scens09:dog_r
gging_finshed_ok:joint82
31 name: CZ_scens09:dog_rigging_finshed_ok:joint77, parent: 25:CZ_scens09:dog_r
gging_finshed_ok:joint79
32 name: CZ_scens09:dog_rigging_finshed_ok:joint58, parent: 26:CZ_scens09:dog_r
gging_finshed_ok:joint57
33 name: CZ_scens09:dog_rigging_finshed_ok:joint13, parent: 27:CZ_scens09:dog_r
gging_finshed_ok:joint12
34 name: CZ_scens09:dog_rigging_finshed_ok:joint40, parent: 28:CZ_scens09:dog_r
gging_finshed_ok:joint39
35 name: CZ_scens09:dog_rigging_finshed_ok:joint17, parent: 29:CZ_scens09:dog_r
gging_finshed_ok:joint16
36 name: CZ_scens09:dog_rigging_finshed_ok:joint59, parent: 32:CZ_scens09:dog_r
gging_finshed_ok:joint58
37 name: CZ_scens09:dog_rigging_finshed_ok:joint14, parent: 33:CZ_scens09:dog_r
gging_finshed_ok:joint13
38 name: CZ_scens09:dog_rigging_finshed_ok:joint41, parent: 34:CZ_scens09:dog_r
gging_finshed_ok:joint40
39 name: CZ_scens09:dog_rigging_finshed_ok:joint18, parent: 35:CZ_scens09:dog_r
gging_finshed_ok:joint17
40 name: CZ_scens09:dog_rigging_finshed_ok:joint60, parent: 36:CZ_scens09:dog_r
gging_finshed_ok:joint59
41 name: CZ_scens09:dog_rigging_finshed_ok:joint15, parent: 37:CZ_scens09:dog_r
gging_finshed_ok:joint14
42 name: CZ_scens09:dog_rigging_finshed_ok:joint42, parent: 38:CZ_scens09:dog_r
gging_finshed_ok:joint41
43 name: CZ_scens09:dog_rigging_finshed_ok:joint50, parent: 39:CZ_scens09:dog_r
gging_finshed_ok:joint18
44 name: CZ_scens09:dog_rigging_finshed_ok:joint49, parent: 39:CZ_scens09:dog_r
gging_finshed_ok:joint18
45 name: CZ_scens09:dog_rigging_finshed_ok:joint19, parent: 39:CZ_scens09:dog_r
gging_finshed_ok:joint18
46 name: CZ_scens09:dog_rigging_finshed_ok:joint33, parent: 39:CZ_scens09:dog_r
gging_finshed_ok:joint18
47 name: CZ_scens09:dog_rigging_finshed_ok:joint62, parent: 39:CZ_scens09:dog_r
gging_finshed_ok:joint18
48 name: CZ_scens09:dog_rigging_finshed_ok:joint51, parent: 43:CZ_scens09:dog_r
gging_finshed_ok:joint50
49 name: CZ_scens09:dog_rigging_finshed_ok:joint20, parent: 45:CZ_scens09:dog_r
gging_finshed_ok:joint19
50 name: CZ_scens09:dog_rigging_finshed_ok:joint34, parent: 46:CZ_scens09:dog_r
gging_finshed_ok:joint33
51 name: CZ_scens09:dog_rigging_finshed_ok:joint63, parent: 47:CZ_scens09:dog_r
gging_finshed_ok:joint62
52 name: CZ_scens09:dog_rigging_finshed_ok:joint21, parent: 49:CZ_scens09:dog_r
gging_finshed_ok:joint20
53 name: CZ_scens09:dog_rigging_finshed_ok:joint35, parent: 50:CZ_scens09:dog_r
gging_finshed_ok:joint34
54 name: CZ_scens09:dog_rigging_finshed_ok:joint64, parent: 51:CZ_scens09:dog_r
gging_finshed_ok:joint63
55 name: CZ_scens09:dog_rigging_finshed_ok:joint22, parent: 52:CZ_scens09:dog_r
gging_finshed_ok:joint21
56 name: CZ_scens09:dog_rigging_finshed_ok:joint36, parent: 53:CZ_scens09:dog_r
gging_finshed_ok:joint35
57 name: CZ_scens09:dog_rigging_finshed_ok:joint65, parent: 54:CZ_scens09:dog_r
gging_finshed_ok:joint64
58 name: CZ_scens09:dog_rigging_finshed_ok:joint23, parent: 55:CZ_scens09:dog_r
gging_finshed_ok:joint22
59 name: CZ_scens09:dog_rigging_finshed_ok:joint37, parent: 56:CZ_scens09:dog_r
gging_finshed_ok:joint36
60 name: CZ_scens09:dog_rigging_finshed_ok:joint66, parent: 57:CZ_scens09:dog_r
gging_finshed_ok:joint65
61 name: CZ_scens09:dog_rigging_finshed_ok:joint67, parent: 60:CZ_scens09:dog_r
gging_finshed_ok:joint66
62 name: CZ_scens09:dog_rigging_finshed_ok:joint68, parent: 61:CZ_scens09:dog_r
gging_finshed_ok:joint67
63 name: CZ_scens09:dog_rigging_finshed_ok:joint69, parent: 62:CZ_scens09:dog_r
gging_finshed_ok:joint68
-- --
Skeleton created out of jME OGRE skeleton, 64 joints
[ Fri Jul 20 10:22:21 CST 2012 ] - WARNING: skipping null TexCoords
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 731
        at com.threed.jpct.Object3D.<init>(Unknown Source)
        at raft.jpct.bones.Animated3D.<init>(Animated3D.java:120)
        at raft.jpct.bones.BonesImporter.importOgre(BonesImporter.java:199)
        at raft.jpct.bones.util.JMEOgreImporter.loadGroup(JMEOgreImporter.java:
12)
        at raft.jpct.bones.util.JMEOgreImporter.loadGroup(JMEOgreImporter.java:
8)
        at raft.jpct.bones.util.JMEOgreImporter.run(JMEOgreImporter.java:69)
        at raft.jpct.bones.util.JMEOgreImporter.main(JMEOgreImporter.java:170)

Offline raft

  • Moderator
  • quad
  • *****
  • Posts: 1974
    • View Profile
    • http://www.aptalkarga.com
Re: Error: Ogre .mesh.xml -> .bones
« Reply #1 on: July 20, 2012, 05:11:03 am »
warnings are not important, nevermind about them.

about the exception, strange, jPCT typically throws it when indexed geometry has missing vertices.

which 3d editor and Ogre3D exporter do you use?

try playing with exporter options. if possible try disabling indexed geometry. if none helps send me your xml files and let me have a look..

Offline kiffa

  • long
  • ***
  • Posts: 199
    • View Profile
Re: Error: Ogre .mesh.xml -> .bones
« Reply #2 on: July 20, 2012, 06:27:18 am »
Thanks!

I used OgreMax to export mesh.xml from Maya2012,  first i tried to export a simple (Skeleton)animated mesh without pose animation, and all was ok(export xml -> convert to .bones -> run on phone).

Then i tried to export a complex  dog mesh with pose animation and morph animation, my settings is like this: object settings -> mesh animation -> mesh animation type -> Skeleton + pose, add mesh animation -> track -> skin(threre are 3 options: object、skin、shape, i don't know how to choose...), when i exported,  an error happed, i get the skeleton.xml without animation info( null <animations />). Here was the log:

// Warning: Could not reach pose on CZ_scens09:dog_rigging_finshed_ok:global_Move translate, rotate. //
//    -- Connection from CZ_scens09:dog_rigging_finshed_ok:global_CTLS to CZ_scens09:dog_rigging_finshed_ok:global_Move.translate may need to be broken.
//    -- Connection from CZ_scens09:dog_rigging_finshed_ok:global_CTLS to CZ_scens09:dog_rigging_finshed_ok:global_Move.rotate may need to be broken.
// Warning: Could not reach pose on CZ_scens09:dog_rigging_finshed_ok:global_scal scale. //
//    -- Connection from CZ_scens09:dog_rigging_finshed_ok:global_CTLS to CZ_scens09:dog_rigging_finshed_ok:global_scal.scale may need to be broken.
// Warning: Could not reach pose on CZ_scens09:dog_rigging_finshed_ok:joint81 rotate. //
//    -- Constraint CZ_scens09:dog_rigging_finshed_ok:joint81_orientConstraint1 on CZ_scens09:dog_rigging_finshed_ok:joint81 may need to be disabled.
// To disable IK, constraints, and expressions, you can use the Modify->DisableNodes menu.
Other connections can be broken using the script editor.
// Or, to reset the saved pose on a joint, select the joint and enter 'dagPose -reset -name CZ_scens09:dog_rigging_finshed_ok:bindPose3'.
// Error: Pose not achieved. See diagnostics in Script Editor. //


So i changed my exporter to OgreExpoter, which didn't report error and  i get the skeleton.xml with animation info, but when i tried to convert it to .bones, error happend.

How can i send my xml to you? Please give me your email addr. And what should i send to you? Only a skeleton.xml or skeleton.xml + mesh.xml?

Many thanks!   

Offline raft

  • Moderator
  • quad
  • *****
  • Posts: 1974
    • View Profile
    • http://www.aptalkarga.com
Re: Error: Ogre .mesh.xml -> .bones
« Reply #3 on: July 20, 2012, 06:35:10 am »
I've sent you PM my email address. send please both skeleton.xml and mesh.xml.

strange, I was more than happy with OgreMax for 3dsMax. I would expect same performance from OgreMax for Maya.

Offline kiffa

  • long
  • ***
  • Posts: 199
    • View Profile
Re: Error: Ogre .mesh.xml -> .bones
« Reply #4 on: July 20, 2012, 07:13:08 am »

I will send xml to you soon, and i found some warning from maya when expoted mesh:

Writing mesh binary...
WARNING: the mesh 'mayaExport' includes vertices with more than 4 bone assignments. The lowest weighted assignments beyond this limit have been removed, so your animation may look slightly different. To eliminate this, reduce the number of bone assignments per vertex on your mesh to 4.

WARNING: the mesh 'mayaExport' includes vertices without bone assignments. Those vertices will transform to wrong position when skeletal animation enabled. To eliminate this, assign at least one bone assignment per vertex on your mesh.

WARNING: the mesh 'mayaExport' includes vertices without bone assignments. Those vertices will transform to wrong position when skeletal animation enabled. To eliminate this, assign at least one bone assignment per vertex on your mesh.


Offline kiffa

  • long
  • ***
  • Posts: 199
    • View Profile
Re: Error: Ogre .mesh.xml -> .bones
« Reply #5 on: July 20, 2012, 09:10:03 am »
I've sent an email with xml to you, thanks!

Offline raft

  • Moderator
  • quad
  • *****
  • Posts: 1974
    • View Profile
    • http://www.aptalkarga.com
Re: Error: Ogre .mesh.xml -> .bones
« Reply #6 on: July 20, 2012, 06:39:09 pm »
well, strange indeed. let Egon have a look at that
http://www.jpct.net/forum2/index.php/topic,2862.0.html

Offline raft

  • Moderator
  • quad
  • *****
  • Posts: 1974
    • View Profile
    • http://www.aptalkarga.com
Re: Error: Ogre .mesh.xml -> .bones
« Reply #7 on: July 20, 2012, 08:28:42 pm »
is there an exporter option like "use shared geometry"? if so please try disabling it..

Offline kiffa

  • long
  • ***
  • Posts: 199
    • View Profile
Re: Error: Ogre .mesh.xml -> .bones
« Reply #8 on: July 23, 2012, 02:05:59 pm »
I had modified the model、the skin and the animation,and  exported them by using OgreExporter from maya, and succeed to convert it to .bones.
But when i run it, crash happened.
Info:

07-23 19:59:18.765: E/AndroidRuntime(7078): java.lang.ArrayIndexOutOfBoundsException
07-23 19:59:18.765: E/AndroidRuntime(7078):    at raft.jpct.bones.Animated3D.applySkeletonPose(Animated3D.java:467)
07-23 19:59:18.765: E/AndroidRuntime(7078):    at raft.jpct.bones.Animated3D.animateSkin(Animated3D.java:265)
07-23 19:59:18.765: E/AndroidRuntime(7078):    at ddd.pd.MySurfaceView$MyRenderer.onDrawFrame(MySurfaceView.java:190)
07-23 19:59:18.765: E/AndroidRuntime(7078):    at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1363)
07-23 19:59:18.765: E/AndroidRuntime(7078):    at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1118)


My codes:

Code: [Select]
// onSurfaceCreated

     AnimatedGroup group = BonesIO.loadGroup(mResources.openRawResource(R.raw.dog));
     mDog = group.get(0);  // Animated3D mDog;

      mDog.setTexture("dog");
      mDog.translate(0, 0, 0);
      mDog.strip();
      mDog.build();

      mWorld.addObject(mDog);


// onDrawFrame
 
      mDog.animateSkin(f, 0);    // float f = 0.1f;
      f += 0.1;
     
      mFrameBuffer.clear();
      mWorld.renderScene(mFrameBuffer);
      mWorld.draw(mFrameBuffer);
      mFrameBuffer.display();

Offline raft

  • Moderator
  • quad
  • *****
  • Posts: 1974
    • View Profile
    • http://www.aptalkarga.com
Re: Error: Ogre .mesh.xml -> .bones
« Reply #9 on: July 23, 2012, 02:29:51 pm »
I've seen that the first time. looking at the code, this is most possibly caused by invalid exported data, ie: exporter's fault.

I would suggest using OgreMax

Offline kiffa

  • long
  • ***
  • Posts: 199
    • View Profile
Re: Error: Ogre .mesh.xml -> .bones
« Reply #10 on: July 23, 2012, 02:44:45 pm »
I tried OgreMax, but it couldn't export skeleton animation info. I don't know why. :-\

I made blend-shape animation and skeleton animation, and i exported them with adding 2 mesh-animation(one is skin-ani, the other is shape-ani), but there were only pose-animation-info in .mesh.xml, no skeleton-animation-info in .skeleton.xml.


Offline raft

  • Moderator
  • quad
  • *****
  • Posts: 1974
    • View Profile
    • http://www.aptalkarga.com
Re: Error: Ogre .mesh.xml -> .bones
« Reply #11 on: July 23, 2012, 02:47:28 pm »
you can ask for that in Ogre3D forums.

I used OgreMax with 3dsMax and was quite happy with it. I would expect same performance from OgreMax for Maya