Parenting an object to a skeleton cause animation delay and performance drop

#1

Hello,

I come back with the other skeleton issue I had.

If we parent an object to a skeleton the animation doesn’t follow perfectly the skeleton.
I made a simple babylon export to show the issue.
http://files.cynaptek.com/Babylon_Parentin_Skinned_Issue.zip

Also this cause some performance drop which can be see on a more demanding scene.
Maybe it’s the performance drop causing the issue, I’m not really sure.

0 Likes

#2

Can you repro in the pg?
Here is a doc to reference external assets:
https://doc.babylonjs.com/resources/external_pg_assets

1 Like

#3

Sure here it is
https://www.babylonjs-playground.com/#TH16ID#6

Little explanation :
the smallers cube are parented and jaggering.
The bigger one are skinned.

Everything exported from 3ds Max. Not sure if that will change something.

0 Likes

#4

Did you make sure to turn off animation optimizations in 3dsmax?

0 Likes

#5

The effect is greatly reduced but the performance hit is still there.
And you can still see the small cubes have a more hard time to catch up. Like if the animation wasn’t smooth.

https://www.babylonjs-playground.com/#TH16ID#7

If it’s not visible enough I can send you a private playground with my mesh.

0 Likes

#6

Is this better?
https://www.babylonjs-playground.com/#TH16ID#8

0 Likes

#7

It did fixes the simple example but I don’t think the issue is fully fixed.

Here is a pg with the mesh I’m working with
https://www.babylonjs-playground.com/#TH16ID#10

To explain a bit,
Hand_Skin, Hand_Muscles and Hand_Connective_Tissue are all skinned.
They move perfectly.

All the Hand_Bones_xxx and Hand_Bones_Cartillage_xxx are parented.
You should be able to see them slide.

Also on my full scene when the meshes Hand_Bones_xxx and Hand_Bones_Cartillage_xxx are displayed they cause a 20 fps performance drop on a GTX 1080.
The performance hit is present even when the animation is not playing.

In the Playground I don’t see it but I suppose it might be linked to the sliding issue or the parenting which would cause more processing to move the object than the skinned one.

Let me know if I can do something else to help tackle this.

0 Likes

#8

20fps is just insane :slight_smile: How many meshes? How is the stats tab of the inspector?

It is not obvious what to see in the playground you linked does not :frowning: (What should I look at ?)

Regarding the parenting question: Are the parented meshes animated? (I mean do they got an animation timeline?) or are they only parented? (Which is the desired effect as they will only be animated because their parent is animated)

0 Likes

#9

I sent you a private message with more explanations and another build that you can check.

1 Like