[SOLVED] Converting to .j3o

Hello.
Just started the tutorial :slight_smile: About HelloAssets.
All fine when I use the original Ninja.msh.xml model, but when I convert to .j3o file this is what I get:
(upload://70WIGdTnT3Cr1c8tMw9tdU2IW0l.jpeg)
Same happend with other modles like Elephant but not with the town scene.
Any help?

ninja

1 Like

How are you converting the model? Code? Sdk?

SDK by right click convert to j3o Binary

Are you using SDK v3.3?

If so you might need to call applyBindPose() on Armature after loading the model.

skinningControl.getArmature().applyBindPose();
3 Likes

I am using v3.3 and thx, it works now:

Spatial ninja = assetManager.loadModel("Models/Ninja/Ninja.mesh.j3o");
SkinningControl scNinja = ninja.getControl(SkinningControl.class);
scNinja.getArmature().applyBindPose();
2 Likes

Is this something the SDK could easily support when converting?
Or is that only relevant when wanting to see the T-Pose?

Yes, can be done by calling saveInitialPose() on Armature before exporting j3o.

SkinningControl sc = model.getControl(SkinningControl.class);
sc.getArmature().saveInitialPose();

But is this something people would want? I mean is there a reason why this is not default?

That’s the default behavior for GltfLoader

Not sure why it is not the default for Ogre loader.

Does ogre even convert to the new system?

Yes.

Then it might be best to solve this at Ogre Importer Level, right?

Yep

2 Likes

I guess adding armature.saveInitialPose(); after below line should do the trick.

2 Likes