# UE4.20:Shader Model ES3\_1のSkeletalMeshのボーン数制限の変更について/About change of bone limit of SkeletalMesh of Shader Model ES3\_1

**URL:** <https://forums.unrealengine.com/t/ue4-20-shader-model-es3_1-skeletalmesh-about-change-of-bone-limit-of-skeletalmesh-of-shader-model-es3_1/431124>\
**Category:** Rendering\
**Tags:** Mobile, unreal-engine, crash, japanese, Rendering, skeletalmesh, question\
**Created:** [August 7, 2018, 6:33am UTC](https://forums.unrealengine.com/t/ue4-20-shader-model-es3_1-skeletalmesh-about-change-of-bone-limit-of-skeletalmesh-of-shader-model-es3_1/431124 "2018-08-07T06:33:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hmse](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@hmse](https://forums.unrealengine.com/u/hmse)\
**Post date:** [August 7, 2018, 6:33am UTC](https://forums.unrealengine.com/t/ue4-20-shader-model-es3_1-skeletalmesh-about-change-of-bone-limit-of-skeletalmesh-of-shader-model-es3_1/431124/1 "2018-08-07T06:33:26Z")

</div>

(I write English translation at the bottom.)

UE4.19.1 で動作確認したプロジェクトをUE4.20.1 に更新して動作を確認しようとした際に起きた問題についてです。

UE4.20 でiOS/Android で特定のレベルに入るとクラッシュする現象を確認したため  
Github版のUE4.20 を使用してXcode を使用してiOS版のクラッシュ位置を確認したところ、

Engine/Source/Runtime/Engine/Private/GPUSkinVertexFactory.cpp　内の

FGPUBaseSkinVertexFactory::FShaderDataType::UpdateBoneData()

この部分のアサートに失敗してクラッシュしていました。

check(NumBones \* sizeof(FSkinMatrix3x4) \<= sizeof(GBoneUniformStruct));

このコードを確認したところ、SkeletalMeshのボーン数が75以内であることをチェックしているようだったのですが、ゲームで使用しているSkeletalMeshのボーン数は100を超えています。  
ボーン数を削減したところクラッシュせず動作していることも確認しました。

UE4.19 と比較したところ以前はシェーダーモデル ES\_2 の場合にのみこちらの分岐に進むため Vulkan/Metal を含む ES3\_1 の場合はこの制限を受けずメッシュを表示することができていたようなのですが、 UE4.20 での変更で ES3\_1 もこの部分の制約を受けるようになっているようです。

なぜこの制約が追加されてしまったのでしょうか。  
この問題により UE4.20 で正常に動作させることができないのですが、この制限を回避する方法はありませんか？

* * *

(Machine translation)

It is about the problem that occurred when updating the project confirmed to operate with UE 4.19.1 to UE 4.20.1 and checking its operation.

I confirmed the phenomenon of crashing when entering a specific level on iOS / Android in UE 4.20  
I checked crash position of iOS version using Xcode using Github version of UE 4.20,

Engine/Source/Runtime/Engine/Private/GPUSkinVertexFactory.cpp

FGPUBaseSkinVertexFactory::FShaderDataType::UpdateBoneData()

I failed to assert this part and it crashed.

check(NumBones \* sizeof(FSkinMatrix3x4) \<= sizeof(GBoneUniformStruct));

I confirmed this code and seemed to check that SkeletalMesh’s bone count is within 75, but the number of bones of SkeletalMesh used in the game exceeds 100.  
I also confirmed that it worked without crashing when I reduced the number of bones.

As compared with UE 4.19, it used to be this branch only in the case of shader model ES\_2, so in the case of ES 3 \_ 1 including Vulkan / Metal it seems that mesh could be displayed without receiving this limitation, ES3\_1 seems to be restricted by this part due to the change in UE 4.20.

Why was this constraint added?  
Because of this problem I can not operate normally on UE 4.20, but is there a way to avoid this restriction?

---

<div class="post-metadata">

**Author:** ![serioussam909](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@serioussam909](https://forums.unrealengine.com/u/serioussam909)\
**Post date:** [August 26, 2018, 5:01pm UTC](https://forums.unrealengine.com/t/ue4-20-shader-model-es3_1-skeletalmesh-about-change-of-bone-limit-of-skeletalmesh-of-shader-model-es3_1/431124/2 "2018-08-26T17:01:56Z")

</div>

I had exactly the same problem.

Change this line:  
[https://github.com/EpicGames/UnrealEngine/blob/f509bb2d6c62806882d9a10476f3654cf1ee0634/Engine/Source/Runtime/Engine/Public/GPUSkinVertexFactory.h#L89](https://github.com/EpicGames/UnrealEngine/blob/f509bb2d6c62806882d9a10476f3654cf1ee0634/Engine/Source/Runtime/Engine/Public/GPUSkinVertexFactory.h#L89)  
Replace 75 with 256.
