Check BlandShape Normal

Since Unity 2018, when importing fbx into Unity, the BlendShape normal is automatically recalculated. As a result, there is a possibility that artifacts are produced on the model’s surface.

Details

If the BlendShape normal is (0, 0, 0), the value of the surface normal should not be changed. It seems that the original BlendShape normal is replaced by the recalculated BlendShape normal, resulting in unexpected changes on the model’s surface

Validate surface normal using MToon’s debugging options

Drag fbx to the Hierarchy window and select it. In the Inspector, click Select -> Materials -> Extract Materials and choose a folder to save these materials.

Next, select all materials

and change Shader to VRM/MToon.

Surface normal validation

At this point we set all the materials to MToon for surface normal validation only, so setting up textures’ properties is not required.

To visualize the surface normal, go to Options - Debugging Options - Visualize and select Normal:

../../_images/mtoon_normal.gif

debug normal

Select a GameObject containing SkinnedMeshRenderer with BlendShape. Drag the slider while observing surface normals:

We can see surface normals around nose tip and mouth are not correct.

../../_images/broken_normal.jpg

debug normal

  • Surface normals around the norse tip

  • and mouth (e.g. tongue, lower lip)

are totally different

モデル情報

  • vroid さんの vrm を blender に import

  • blender から fbx export

  • unity に import

したものです。

BlendShape の法線をなおす

上記の方法で BlendShape がおかしいことが分かった場合に修復する方法。

fbx の Model タブを選択。

Legacy Blend Shape Normals をチェックして Apply。

../../_images/legacy_normal_fixed.jpg

fixed normal

BlendShape がなおっていることを確認します。

修正前との違い

鼻先、下唇に加えて、舌が全然違う法線になってます。