Hardware Skinning screws up my animations

Hi Guys

Ive been working on my game for a while now… and its coming along nicely… Recently i tried to switch to hardware skinning to improve performance by doing

SkeletonControl skeletonControl = geometry.getChild("bodyassaul").getControl(SkeletonControl.class);
        skeletonControl.setHardwareSkinningPreferred(true);

however when i do this most my models get distorted when i run animations on them… I think its somethign todo with the way ive imported them. Or because i have many characters of the same model
i used the direct blender importer. I have also tried resetting the skeliton as suggested by

the model looks fine when i look at it individually in the scene composer. but gets distorted when i load multiple instances of the same model in the game…

i have tried cloning each model to create multiple characters —
cloning when with .clone(true); to also clone the materials
calling deepClone()
i have also tried loading the same model multiple times calling

(Node) assetManager.loadModel(model.getPath()); 

but all have the same problem

i have also uploaded the mode here
https://www.dropbox.com/s/mdfi1wjjl12idyv/German_Private.j3o?dl=0

Did you load it with the blender loader?

yea… I right clicked on the .blend file and selected convert to j3o binary them loaded it by going

final Node name = (Node) assetManager.loadModel("Models/Soldier/stickfigure3.j3o");

We had the same issue, I think that @winhelp can give you some hints.

Upload blend file, not j3o, please.

here it is @winhelp

extremely grateful for taking the time to look at this guys

Your model look very good, I don’t know why it happens to you. Vertices don’t have to many bone groups. There is 24 doubled vertices - maybe they cause problems (select all (A) > (W) > Remove Doubles) We use Ogre importer for animations. I don’t know what is the core problem with HW skinning artifacts.

Here is model from ogre - it have only 4 animations (only for test). Ogre make j3o file different than SDK importer so there you need assing material again and rename parts of your model :frowning:
https://drive.google.com/open?id=0B2z_kShVsBHBNjg3UDZmajY1eW8

(First try remove doubled verts.)

IMO the issue might be that the blender exporter doesn’t setup the HW skinning buffers properly.
And if it works with ogre exporter it’s definitely a blinder loader issue.

1 Like

Ok thanks guys… When i first started i tried the ogre exporter and it was a bit too fiddly and I couldn’t get ti working… Where as the SDK was just right click and it worked… Ill revisit using the ogre exporter… If any of you can post some sources to the best upto date guides on how it works that would be greatly appreciated…

I use ogre, never had any problems. This is the video that helped me get it going

1 Like

Ok came back to this and got it working. Just to help others…

Alot of the documentation talks about using v2.69 of blender. but that doesnt seem to work on never version on mac os. So i went with version 2.79a of blender. But then the the version of the script installed by the ide doesnt work so that needs to be upgraded to the latest version of the script https://bitbucket.org/iboshkov/blender2ogre
and it all worked as per the youtube video above!!

thanks all for you help

1 Like