# Skeletal mesh performance

**URL:** <https://forum.babylonjs.com/t/skeletal-mesh-performance/40522>\
**Category:** Questions\
**Created:** [May 5, 2023, 9:34am UTC](https://forum.babylonjs.com/t/skeletal-mesh-performance/40522 "2023-05-05T09:34:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Charge](https://avatars.discourse-cdn.com/v4/letter/c/f475e1/32.png) [@Charge](https://forum.babylonjs.com/u/Charge)\
**Post date:** [May 5, 2023, 9:34am UTC](https://forum.babylonjs.com/t/skeletal-mesh-performance/40522/1 "2023-05-05T09:34:22Z")

</div>

Hi,  
This thread: [Baked animation performance - #24 by arcman7](https://forum.babylonjs.com/t/baked-animation-performance/32023/24) discusses a number of animation optimisations. One thing that really caught my attention was the following post by @Evgeni_Popov:

> Their mesh size is 260 triangles while the arachnid is 1794.
> 
> In addition, they optimized the calculation for their use case:
> 
> - only rotation and position for bones (no scaling). So they only do two texture reads to get the quaternion and position values, while we do 4 reads to build a 4x4 matrix.
> - only two bones max
> 
> So they do `2*2=4` texture reads in total, while we do `4*4=16` because the arachnid has NUM\_BONE\_INFLUENCERS = 4.

Would it be possible for Babylon.JS to support skeletal meshes that will not be scaled? It seems like optionally using a skeleton that does not support scaling would be a good trade-off if it means halving the number of texture reads.

Thanks.

---

<div class="post-metadata">

**Author:** ![bghgary](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/bghgary/32/48532_2.png) [@bghgary](https://forum.babylonjs.com/u/bghgary)\
**Post date:** [May 5, 2023, 5:58pm UTC](https://forum.babylonjs.com/t/skeletal-mesh-performance/40522/2 "2023-05-05T17:58:07Z")

</div>

@Evgeni_Popov Any thoughts?

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [May 6, 2023, 8:09am UTC](https://forum.babylonjs.com/t/skeletal-mesh-performance/40522/3 "2023-05-06T08:09:49Z")

</div>

I think that should be possible, I have added it to the Animation Improvements issue:

> <https://github.com/BabylonJS/Babylon.js/issues/13534>
>
> Collecting here the list of improvements related to the animation system we woul…d like to see in our version 7:
> 
> \- \[\] Improved Animation Memory management (Draft https://github.com/BabylonJS/Babylon.js/pull/13434)
> \- \[x\] Animation Blending
> \- \[\] Animation Group Blending/Layering
> \- \[\] Animation Sequencing
> \- \[x\] Skeleton Retargeting (identical skeleton shape and identical bone hierarchy)
> \- \[\] Skeleton Retargeting (different skeleton shape and identical bone hierarchy)
> \- \[\] Skeleton Retargeting (different skeleton shape and different bone hierarchy)
> \- \[\] Bones management helper (position in world space....)
> \- \[\] Animation management helper (visual debugger without meshes....)
> \- \[\] Can we remove \`Skeleton.needInitialSkinMatrix\` and everything related to it? It seems it's an old feature not used anymore...
> \- \[\] Optimize performances in a "Not using scale" mode (send only translation+quaternion to the shader, not a whole mat4x4)
> 
> The issues will be refined in their own one once will start the next release.
> 
> Here is a list of related forum thread/issues this should be able to address:
> \- https://forum.babylonjs.com/t/animations-storing-key-frames-in-typed-arrays/36566/18
> \- https://forum.babylonjs.com/t/how-to-bind-separate-glb-file-such-as-cloth-etc-to-armature/37574
> \- https://forum.babylonjs.com/t/usd-3000-reward-anyone-figured-out-retargeting-yet/36629/30
> \- https://forum.babylonjs.com/t/additive-animations-distorted/37751
> \- https://forum.babylonjs.com/t/usd-1000-reward-moving-bones-to-different-position/37929
> \- https://forum.babylonjs.com/t/gltf-animation-loops-when-i-click-how-to-stop-the-loop/38477/6
> \- https://forum.babylonjs.com/t/baked-texture-animations-with-animation-groups/32518/11
> \- https://forum.babylonjs.com/t/skeletal-mesh-performance/40522

---

<div class="post-metadata">

**Author:** ![Charge](https://avatars.discourse-cdn.com/v4/letter/c/f475e1/32.png) [@Charge](https://forum.babylonjs.com/u/Charge)\
**Post date:** [May 6, 2023, 7:46pm UTC](https://forum.babylonjs.com/t/skeletal-mesh-performance/40522/4 "2023-05-06T19:46:07Z")

</div>

Thank you @Evgeni_Popov, I hope this will end up being a very nice performance improvement 😃
