Problem with Blender Import with Animation

I am working with the snapshot from Git right now and have found 2 Problems

  1. The Bones in some Animations are scaled strange mainly in the y-Axis this is caused by the Blender Importer

  2. The Animations aren’t playing right I don’t now if there is a change with the weights but it seams that there is a bug, because some points of the mesh are not affected by the Animation

I don’t know if there is someone that says “Ah, I know how to fix that”. The other option is that I work out where the Problem is and try to fix it because the new Blender Importer seams a little bit better and I really want to use it.

But Tips on where to search are appreciated.

Here is the Object, if anyone want to try it out
https://cloud.xenoncloud.net/f/700db1f515/

This is a good guide:
http://wiki.jmonkeyengine.org/doku.php/jme3:external:blender?s[]=blender

The first issue sounds like it might be solved by using “Apply scale” on the rig.

I know the guide, but thanks for the tip

EDIT:

The Scale is already applied

Also the skeleton and and the mesh cant be set to different spots. Sometimes you have to clear positions and rotations.

There is a problem with the Blender importer in JME, it was mentioned here: Hardware skinning - strange effect - #33 by FrozenShade

Try with ogre.

Applying Rotation and Location also makes no difference

Without animation

Idle Animation

Run and Hit Animations are great except of the spikes that you can see between the legs of the 2. picture

Also scale. And make sure you apply them to both the armature and the model.

Kinda offtopic maybe, but since it’s about import. Is there any way to import kinematics (at least bones) from 3ds to jme? The best working importer I’ve found so far is from .obj (even that is not perfect as diffuse mapping sometimes goes nuts somehow), but there’s no bone data. Anyone with such an experience around?

@Torsion
Just use directly from the .blend file

Yes I applied it on Mesh and Armature.

I am not sure if it is applied the blend File I shared.

I am working with the jme for 3 Years and imported x Objects from Blender. :smile:

I also imported this Object with an older version of the Blender Importer where the Animation works.
I simply want to know if somebody knows where this could come from. To FIX it MYSELF or maybe someone else.
Or I search for the Problem but the Blender Importer is extrem Big.

It is allready annoying that there is no good Exporter or Importer in Blender (Yes I mean the obj Exporter) :smile:

And the second Problem I don’t know seams a bug in playing the Animation itself. Yes, I testet this stuff.
But the 2. Problem I don’t care right know.

@Torsion
Yes the diffuse Mapping is crazy, but also look if the right normal Map is set in the .mtl
Sometimes it uses the diffuse as normalmap(map_bump)
But that is not a problem with the Importer in the jme.
The Exporter is the source of all evil (Blender, …)
Only relative Paths are accepted at the importer what can also lead to Problems.
The relative Paths shouldn’t leave the asset Dir at any time

EDIT

Does someone know how to contact the author of the Blender Importer (jmekaelthas)?

I don’t know if that is going to help but when I had similar problem with my exports (the armature animations worked fine in blender but NOT in JME upon export), I was going mad - I applied scale, rotation and location - did everything by the book and nothing seemed to work. Then I discovered that the problem lied in the weights of the bones - my guess is that you have applied armature to your character with “Armature Deform > With Automatic Weights” method. In my case this has caused the problems as the armature was not applied properly to the mesh so I had to adjust weights of the bones manually - and that worked. Also check your “Rest Position” in blender if it is placed correctly within mesh.

Also don’t know if this will help, but I recently had major problems with animations. I took the same blend file, removed all from the NLA editor and re-added them and bam it worked. Strange stuff. (I checked the file it was exporting, was totally messed up till I did that)

Here’s another I also forgot about

Often they’ll have two armatures, why this happens I don’t know.

One will have one or two messed up animations, then checking deeper into the node there will be a second armature.

Could be the case, though you’ve likely checked this already.

I quickly try to export/import your model via my WIP sbuf pipeline. And it raised lot of warning, some due to BinormalTangentGenerator. but also due to too many influencer (weigths + bone) on vertex for animation (jme only take care of 4):

08:09:29.539 [LWJGL Renderer Thread] WARN  jme3_ext_remote_editor.ReqHandler - vertex influenced by more than 4 bones : 5, only the 4 higher are keep.
08:09:29.539 [LWJGL Renderer Thread] WARN  jme3_ext_remote_editor.ReqHandler - vertex influenced by more than 4 bones : 9, only the 4 higher are keep.
08:09:29.539 [LWJGL Renderer Thread] WARN  jme3_ext_remote_editor.ReqHandler - vertex influenced by more than 4 bones : 9, only the 4 higher are keep.
08:09:29.539 [LWJGL Renderer Thread] WARN  jme3_ext_remote_editor.ReqHandler - vertex influenced by more than 4 bones : 11, only the 4 higher are keep.
08:09:29.539 [LWJGL Renderer Thread] WARN  jme3_ext_remote_editor.ReqHandler - vertex influenced by more than 4 bones : 9, only the 4 higher are keep.
08:09:29.539 [LWJGL Renderer Thread] WARN  jme3_ext_remote_editor.ReqHandler - vertex influenced by more than 4 bones : 9, only the 4 higher are keep.
08:09:29.539 [LWJGL Renderer Thread] WARN  jme3_ext_remote_editor.ReqHandler - vertex influenced by more than 4 bones : 9, only the 4 higher are keep.
08:09:29.539 [LWJGL Renderer Thread] WARN  jme3_ext_remote_editor.ReqHandler - vertex influenced by more than 4 bones : 8, only the 4 higher are keep.
08:09:29.539 [LWJGL Renderer Thread] WARN  jme3_ext_remote_editor.ReqHandler - vertex influenced by more than 4 bones : 11, only the 4 higher are keep.

Can I used your .blend to improve/debug the xbuf pipeline ?

the author of the blender importer is named @Kaelthas on the forum.

1 Like

I have no problem if you use the model to improve the xbuf pipeline.(It is only a test model)
I hope your Format let me sleep a bit better in the future.

The multiple bones “problem” and the the “problem” with the BinormalTangentGenerator were fixed in a later version of the engine, I think.

I have worked a long time with this Version, because I had a big problem with the latest “stable” version of the sdk.

Maybe it were the Problems with the bones and the BinormalTangentGenerator

I am sorry, because I should have said that earlier.

@JESTERRRRRR A good idea but it didn’t fixed it
@pavel3d The Automatic Weights Method was used as base, but the method isn’t very good so…

Thanks,

I did a capture at the end of the animation right_block. it will help me to debug, but it can also help you. As you right arm bone is too low. and skin weight as some trouble.

You’re right @nehon did some fix on binmormalTangentGenerator. I’ll copy/backport it (I would like to provide a xbuf compatible with 3.0). but the limitation about number vertex weight stay to 4 in master (iirc).

Maybe you could during import take the 4 bones that have the more influence on a vertex. This way the issue would be really minimal.

Ok, thanks.

I thought it was fixed because I never saw the Warning again and the code that was producing the warning was changed a lot, but I never really digged into it, because it was doing what it should.

I think @nehon solution would be great, because for an artist it isn’t really easy to look after.

But why is the limit in the first place. I don’t get it.

I already take the 4 major influencer (xbuf sort them) and recompute the weigth for the 4. But it’s not enough or I have a bug in the code/approach.

https://github.com/xbuf/jme3_xbuf/blob/master/jme3_xbuf_loader/src/main/java/jme3_ext_xbuf/Xbuf.xtend#L221

Sorry for highjacking

See here : Switching between attachmentNodes? - #11 by Momoko_Fan

2 Likes