Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Dynamically calculate blendshape mesh normals

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

  1. cvernon

    cvernon

    Joined:
    Jan 26, 2018
    Posts:
    5
    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. cvernon

    cvernon

    Joined:
    Jan 26, 2018
    Posts:
    5
    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:
    653
    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.
     
unityunity