Is a skeleton which is in an instance need to be exported differently?

@Deltakosh, the code for the Blender exporter of skeletons is almost unchanged in the area of generating the matrix of a bone, ignoring the preserveZUpRight stuff recently added by someone. I added the rest pose, but it is just a call of a function twice.

In maybe 2017, I though you commented that a skeleton needed to be built a certain way in order to also work on instances. I never did anything about it. I tried searching the old forum for ‘skeleton and instance by you’, but did not see what I though was there.

I am now in the process of subclassing BABYLON.InstancedMesh, and I want to be able to pose them individually. Ultimately, I am going to have to come up with a test scene, where there are multiples all with different poses. Still, does this ring any bells?

Well, made very simple scene with one mesh (joined 2 cubes), with a 2 bone armature. Here is rest pose:

Here is posed:

When exported as posed, looks as expected in sandbox:

I duplicated a mesh, which I need to absolutely verify that looks right in the babylon file with instance and a single armature. It looks right in the sandbox.

I guess, if I can inline the .babylon in a PG, I can experiment on how or if one can be on the rest pose & the other posed.

Ok, now in the playground, here https://www.babylonjs-playground.com/#X2SHRG

Not sure how to set different poses for different instances. Could have swore, it was a feature of a skeleton in an instance that they could run different animations, right?

Instances cannot have different poses. They will imply more differences that just a world matrix.

They must be cloned

1 Like