Skeletion problem

I am trying to import a mesh with skeleton, from maya. I have three files, rabbit.mesh, rabbit.material, rabbit.skeleton(here notice that this skeleton file has no .xml)



When i try to reveal the skeleton using the following code,



[java] control = model.getControl(AnimControl.class);

control.addListener(this);



SkeletonDebugger skeletonDebug = new SkeletonDebugger("skeleton", control.getSkeleton());

Material mat = new Material(assetManager, "Common/MatDefs/Misc/WireColor.j3md");

mat.setColor("m_Color", ColorRGBA.Green);

mat.getAdditionalRenderState().setDepthTest(false);

skeletonDebug.setMaterial(mat);

model.attachChild(skeletonDebug);[/java]



is gives me a java.lang.NullPointerException exception error.



Without this code the program runs fine, but the models is a bit distorted, the parts of the models is displaced.



Is there still an issue with .skeleton file?

the rabbit model can be found in the following link. Can anyone point me out why I cant display the skeleton.



http://www.mediafire.com/?bqx6y0jqts3f75d

I ve found a weird work around…



After exporting, the skeleton file is needed to be converted to skeleton.xml using OGRECommandLineTools(found in OGRE Tool download Section).Then I deleted the .skeleton and recompiled the mesh to j3o. Then it worked fine.





Is there something wrong?

no, the importer is for OgreXML

it is just the skeleton file that needs to be of skeleton.xml format and the .skeleton is needed to be removed.

If you have to use the command line tool on the file its binary before and xml afterwards… If not then renaming the skeleton file should suffice.

yes.



But, i point i was mentioning is, isn’t the .mesh converter in not applicable containing skeleton.I figured it out just by some random setting.Shouldn’t is be modified?

I thought that jMP automatically converted both .mesh and .skeleton files to their xml equivalents? No need to do it manually.

This is a mixed case as it seems, the model is xml and the skeleton binary (at least from what I understood)

This is a mixed case as it seems, the model is xml and the skeleton binary (at least from what I understood)


No.Both are in binary.

By default the maya exporter (found on OGRE website) converts all in binary, no xml.But jMonkey only accepts binary mesh, not binary skeleton.This is where problem started. It(j3o converter) converts .mesh to .j3o but skeleton info remains untouched.That's why I needed to convert the skeleton data to .xml from binary. Only after that the conversion includes skeleton info.

Kinda messy. Every time, export(to .mesh) > convert(to .xml) > delete(the old .skeleton file, otherwise the problem remains) > compile to j3o.

here is a final version of the rabbit model, it contains "standing" & "walking" animating.
http://www.mediafire.com/?389073mjyk4zouo

Hope this helps to fix the problem.

Oh, then you just need to convert/import the binary file, jMP can do that.

jMP can do that.

about Binary skeleton file, I tried and failed.

Give a try with the new model i've provided.
You wont be able to get the animation or skeleton working, without external conversion.

Hm… So the command line tools apparently dont convert the skeleton belonging to a mesh automatically… But thats not good, I cannot search the whole disk for the skeleton… I’d have to search the skeleton file path in the xml file and then run the converter on it… This is not good, anyone know of an option for the converter so it converts the skeleton automatically when it converts the mesh?



Edit: Added a fix to svn that searches for a skeleton file with the same name as the mesh and converts it too if it exists (only searches in mesh folder)

Hm.. So the command line tools apparently dont convert the skeleton belonging to a mesh automatically.


sorry, I just missed a little.
I convert the rabbit.skeleton to rabbit.skeleton.xml. The .mesh remain untouched.Then, after deleting rabbit.skeletion, u need to compile .mesh.

rabbit.mesh, rabbit.skeleton.xml, rabbit.material, texture file...this compiles correctly.

And the xml file contains the name of the skeleton file.

updated from svn.



But, the problem remains.


This is not good, anyone know of an option for the converter so it converts the skeleton automatically when it converts the mesh?


as far i have seen those converter, it works file by file.Mesh and skeleton needs to be done independently.
But skeleton is the only one that is needed, here.

Its in jMP, it will compile it in the next nightly version of jMP.

you mean next alpha release?



Thanks, :slight_smile:

no, tomorrow morning when the nightly compiles

1 Like

updated few minutes ago.



…



now we have some serious issues, the converter is not working.No matter what type of mode(with skeleton or without), the Error message appears.



“Error converting rabbit

java.lang.IllegalStateException: Cannt find save file!”



:frowning:

Oh, yeah, might be, its due to some other changes in the model conversion stuff.