Search Unity

Dynamically calculate blendshape mesh normals

Discussion in 'General Graphics' started by Deleted User, Mar 13, 2018.

  1. Deleted User

    Deleted User

    Guest

    I have a face mesh with blendshapes. When two or more shapes overlap, the normals do not have the desired effect. Does Unity associate a fixed set of normals per blendshape target? Is there a way to tell Unity to dynamically recalculate the mesh normals after the blendshape evaluation so the blendshape result looks correct? I found the Normals setting can be set to Calculate on the mesh but that only seems to apply when the asset is imported.

    Thank you.
     
  2. Deleted User

    Deleted User

    Guest

    Following up, the only way I've been able to work around this is to call SkinnedMeshRenderer.BakeMesh, compute the desired normals on the new mesh, render the baked mesh and hide the original mesh through display layers. Obviously this is not ideal. The normal calculation occurs in a compute shader which helps. Is there no way to do this in a single render path?
     
  3. Zomby138

    Zomby138

    Joined:
    Nov 3, 2009
    Posts:
    659
    I've always wondered about this too. Cloth has its normals recalculated on the fly, it would be nice to have it for blendshapes too.