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

(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?

I had exactly the same problem.

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