Hottbj exporting problem

Hi,

I created a model for my game with a bone animation and when I try to export it in blender using hottbj 0.4a, i get

an error saying: Unexpected parent type for Arma-modified object 'Eye.L': 7

Thanks in advance for help

Hmm,…isn't latest realse 0.4b? But I don't think that this is the problem.



Can you describe your scene? Afaik armatures have to be toplevel and must not be

child of anything. E.g. you have a node a and what an aramature attached to it (hottbj says:no!)

For that you would have to export the model and parent it programmatically!



(if you like you can also send your blend file and I will have a look)

I sent you the blend file, also I made sure the armatures were top level. 

Puh,…really strange error! Beside that error! You can't export this with hottbj. It does not support exporting 'armatured' meshes with colour/material-indexing. My suggestions:



1)You could bake the material to a texture

or

2) export with ogre3d. <-- use this! Ogre is much better supported! Look in the wiki about it



Ogre-export seems to work  but I don't know if it really works as there were some issues saying:"vertex without boneassignment"…



Sry, that I can't help more! Good luck

thanks for your help  :)! I'll try ogre and if that doesn't work ill make a texture.

I get this error when trying to import into my game:

...
CURRENT ROOT spine1
NEW ROOT thigh.L
java.lang.IllegalStateException: Cannot have more than one root bone in skeleton
        at com.jmex.model.ogrexml.anim.Skeleton.<init>(Skeleton.java:72)
        at com.jmex.model.ogrexml.anim.SkeletonLoader.loadSkeleton(SkeletonLoader.java:150)
        at com.jmex.model.ogrexml.OgreLoader.loadMesh(OgreLoader.java:598)
        at com.jmex.model.ogrexml.OgreLoader.loadModel(OgreLoader.java:225)
        at com.jmex.model.ogrexml.OgreLoader.loadModel(OgreLoader.java:177)
...


:?

Are you using jME2.01? I think this is fixed for SVN-Version. (BTW: In most cases it isn't a good idea

to have more than one root node for one mesh…)

yes, i'm using 2.0.1, i'll update it now.

also how do I set which bone is the root?

Well it is a hierarchy and the first one is the root. In blender you can see/set a bones parent with selecting it in EDIT-Mode. There you can select "child of". In the end there should be only one that is not child of any bone (this is the root-bone)

thanks!,

I fixed it and now I get a null pointer exception at the line:

Node model = (Node) loader.loadModel(meshURL);


I checked the url and made sure it was correct too.

...
java.lang.NullPointerException
        at com.jmex.model.ogrexml.anim.BoneAnimationLoader.loadAnimation(BoneAnimationLoader.java:143)
        at com.jmex.model.ogrexml.anim.BoneAnimationLoader.loadAnimations(BoneAnimationLoader.java:243)
        at com.jmex.model.ogrexml.OgreLoader.loadMesh(OgreLoader.java:602)
        at com.jmex.model.ogrexml.OgreLoader.loadModel(OgreLoader.java:225)
        at com.jmex.model.ogrexml.OgreLoader.loadModel(OgreLoader.java:177)
...

Did you had this warnings about vertices that have no bone-assignment?!? The problem

is that ogre assumes that every vertice has an assignment. So you have to find that vertices.

(For the beginning you could select all vertices of the mesh, set weight to 0.01 select the vertex-group

of the root and press assign. The result might look a bit strange, but for now we just want to make it

work,… :smiley:

I did as you said, but it still gives 3 warnings. (instead of 9)

Next time you should mention what warning. Good I know it is about

3 Vertices have more than 4 Bone-Influnces. (As effect of the assign-all-action)

There is a script you can use to solve this:

http://www.jmonkeyengine.com/forum/index.php?topic=14026.msg101211#msg101211

it exported without any warnings.  XD

but after trying to import into my game i get the same null pointer exception + warnings:

Jul 20, 2010 5:49:08 PM com.jmex.model.ogrexml.anim.SkeletonLoader loadSkeleton
WARNING: Rotation axis not normalized
Jul 20, 2010 5:49:08 PM com.jmex.model.ogrexml.anim.SkeletonLoader loadSkeleton
WARNING: Rotation axis not normalized
Jul 20, 2010 5:49:08 PM com.jmex.model.ogrexml.anim.SkeletonLoader loadSkeleton
WARNING: Rotation axis not normalized
Jul 20, 2010 5:49:08 PM com.jmex.model.ogrexml.anim.SkeletonLoader loadSkeleton
WARNING: Rotation axis not normalized
Jul 20, 2010 5:49:08 PM com.jmex.model.ogrexml.anim.SkeletonLoader loadSkeleton
WARNING: Rotation axis not normalized
Jul 20, 2010 5:49:08 PM com.jmex.model.ogrexml.anim.SkeletonLoader loadSkeleton
WARNING: Rotation axis not normalized
Jul 20, 2010 5:49:08 PM com.jmex.model.ogrexml.anim.SkeletonLoader loadSkeleton
WARNING: Rotation axis not normalized
Jul 20, 2010 5:49:08 PM com.jmex.model.ogrexml.anim.SkeletonLoader loadSkeleton
WARNING: Rotation axis not normalized
Jul 20, 2010 5:49:08 PM com.jmex.model.ogrexml.anim.SkeletonLoader loadSkeleton
WARNING: Rotation axis not normalized
Jul 20, 2010 5:49:08 PM com.jmex.model.ogrexml.anim.SkeletonLoader loadSkeleton
WARNING: Rotation axis not normalized
Jul 20, 2010 5:49:08 PM com.jmex.model.ogrexml.anim.SkeletonLoader loadSkeleton
WARNING: Rotation axis not normalized
Jul 20, 2010 5:49:08 PM com.jmex.model.ogrexml.anim.SkeletonLoader loadSkeleton
WARNING: Rotation axis not normalized
Jul 20, 2010 5:49:08 PM com.jmex.model.ogrexml.anim.SkeletonLoader loadSkeleton
WARNING: Rotation axis not normalized
Jul 20, 2010 5:49:08 PM com.jmex.model.ogrexml.anim.SkeletonLoader loadSkeleton
WARNING: Rotation axis not normalized
Jul 20, 2010 5:49:08 PM com.jmex.model.ogrexml.anim.SkeletonLoader loadSkeleton
WARNING: Rotation axis not normalized
java.lang.NullPointerException
        at com.jmex.model.ogrexml.anim.BoneAnimationLoader.loadAnimation(BoneAnimationLoader.java:143)
        at com.jmex.model.ogrexml.anim.BoneAnimationLoader.loadAnimations(BoneAnimationLoader.java:243)
        at com.jmex.model.ogrexml.OgreLoader.loadMesh(OgreLoader.java:602)
        at com.jmex.model.ogrexml.OgreLoader.loadModel(OgreLoader.java:225)
        at com.jmex.model.ogrexml.OgreLoader.loadModel(OgreLoader.java:177)

Hmm,…one last thing might be to apply scale to the mesh.

  • select mesh
  • ctrl-a (scale and rotation…)





    If that does not work send me the current blend-file! (If you are faster then 10min cause I

    will go to sleep soon)

sent, hope i'm not bothering you too much, and thank you for the fast replies!

hope i'm not bothering you too much



Not if you just stop coding :D

Ok,...the problem is that ogre seem not to like one keyframe animations. So if you want it
you have to add another keyframe to the restpos-animation or just delete it, as you don't
need it for exporting (unlike to hottbj)

With a bit luck we are at the end... (more or less)

Success! It worked! :smiley: :smiley: :smiley:

thank you for everything!

Puh,…no I can go to sleep in peace :smiley:



Keep on rocking!