Blender 2.59->Ogre->jme3 Armature problem

http://img703.imageshack.us/img703/4341/85472209.png


I'm following the same process as shown here: http://www.youtube.com/watch?v=QiLCs4AKh28&feature=my_liked_videos&list=LLOfue_tw_SzbnC1HHpzoVnw and everything works perfectly except that the armature is rotated and offset from its model, even though in Blender they are in the same location. I'm somewhat of a nub when it comes to jme and to blender, I was wondering if anyone has had this problem before?

I’ve experienced issues along those lines, make sure to clear rotation, location, scale and origin for both your model and armature. You may need to adjust the ‘swap axis’ in the exporter, sometimes this helped me.

That fixed the offset, but the armature is still rotated perpendicular to the model on the x-axis, regardless of me fiddling with the swap axis. Any other ideas?

Sounds like rotation has not been cleared (alt+r) on both

The rotation has been cleared too, along with scaling translation and origin. I’ve tried messing with the swap axis and simply rotating the model in Blender to match where the armature is in the game. Could the exporter possibly be funky? I’m using the one installed from jMonkey’s tools menu on Blender v2.59.

dunno, sounds like the exact issue I had before. If you share the blend file I can have a quick look at it for you.

@fishlicka said:
I'm using the one installed from jMonkey's tools menu on Blender v2.59.


try the blender2ogre exporter

https://rapidshare.com/files/1108990132/shaman.blend Here’s the blend file.



I tried Blender2Ogre. I have all the command line tools installed and everything, but when I try to import the exported files I get



java.lang.NullPointerException

at com.jme3.scene.plugins.ogre.MeshLoader.applyMaterial(MeshLoader.java:215)



I’ve been messing around with configurations and converting the .mesh.xml to a j3o, with the same error any time. But it occurred to me, is there a downside to simply coverting directly from .blend to .j3o?



Thanks for all your help.

Hi @fishlicka

I think that the problem is the root bone is not in vertical position.



Check this thread Importing animations from blender 2.62 using ogre xml: things to check if you are getting problems



blender2ogre 0.5.5 and 0.5.6-preview8 work fine with blender 2.62.

blender2ogre 0.5.7-preview1 works fine with blender2.63a, but this version of blender2ogre is not supported by jm3 (the xml structure is different).

Ah thank you very much! I rotated the bone and the armature went with it. There were a couple more innacuracies, but I think they will be rectified if a make a new model in 2.62.

@fishlicka: There’s no material assigned to the model. Due to a bug in the exporter, the model isn’t correctly exported. Nothing we can do about it.

@H said:
blender2ogre 0.5.5 and 0.5.6-preview8 work fine with blender 2.62.
blender2ogre 0.5.7-preview1 works fine with blender2.63a, but this version of blender2ogre is not supported by jm3 (the xml structure is different).

man.. -.- and we get all the complaints :(

Version 0.5.7 had some issues when importing models with animation. It has been fixed in SVN, thanks.

@normen: Sorry for that. It was not a complaint, I was just pointing out that the xml files generated by blender2ogre 0.5.7-preview1 do not work with jm3. Sorry again!!

Yea it is getting to the point where we need to build in some protection around the various versions of the ogre exporter, or at least have a recommended Blender+ogreExporter page.

Having to clear transforms and set a non-transformed root bone is also madness. Is this something we can handle or is it the ogre exporter botching it?

@H said:
@normen: Sorry for that. It was not a complaint, I was just pointing out that the xml files generated by blender2ogre 0.5.7-preview1 do not work with jm3. Sorry again!!

It wasnt a complaint to you, thanks for the info btw. I was just pointing out the actual issue when people say "its hard to import models to jme".
@Sploreg said:
Having to clear transforms and set a non-transformed root bone is also madness. Is this something we can handle or is it the ogre exporter botching it?

I agree on this especially as the ogre importer has/had a few issues like these (all geometry comes in at 0/0/0 etc). It never was really good with relative transforms.

@Sploreg: No, there’s no workaround if the ogre exporter gives us corrupted data. Garbage in garbage out.

As for the Blender loader, the issue regarding animation transforms is currently critical priority, we are waiting for @Kaelthas for a fix. See issue 498.

@Momoko_Fan said:
@Sploreg: No, there's no workaround if the ogre exporter gives us corrupted data. Garbage in garbage out.

Okay, as I suspected it was a problem with the ogre loader. I will modify the wiki to say what ogre exporter versions work with what blender versions.
@Sploreg said:
Okay, as I suspected it was a problem with the ogre loader. I will modify the wiki to say what ogre exporter versions work with what blender versions.

Maybe we should also bundle another version of the exporter with the SDK? Its in the OgreTools plugin.

Alright I added a wiki page where we can all report what versions of Blender and OgreXML exporter work. I’ve entered the version I use that works (after trying several combinations of the two), everyone please enter your working versions.

https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:advanced:ogrecompatibility

Hopefully, in time, this page can disappear.

1 Like