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

is this still the case? i’ve been looking around and didn’t find any recent threads but perhaps there has silently been some work done similar to unity’s animation instancing :smiley:

Directly no. While the skeleton will be the same, there is a more painful, probably not exportable way, to do this now, I believe. It is on my mental list to check out, but I have forgot the feature’s name. Try a forum search “baked skeleton animation”

Pretty sure you’re thinking of the Vertex Animation Texture (VAT) feature, which supports instances. I haven’t tried it either yet (on my list too) but here’s the doc for it. :slight_smile: