Search Unity

Is it possible to create blendshape masks?

Discussion in 'Animation' started by stoney88, Mar 31, 2020.

  1. stoney88

    stoney88

    Joined:
    Jun 13, 2018
    Posts:
    6
    I imagine a bit of coding might need to be done for this, and while I am NOT looking for someone to solve this issue for me, I am hoping someone can point me in the right direction.

    The image below shows a character I'm working with and I'm trying to get the blendshapes for her customization features to play nice together. However, there are micro deformations in vertexes on her face that create some funkiness when try turning up multiple blendshapes.



    I'd like to be able to assign a vertex mask to certain blendshapes to keep them from affecting certain parts of the face. I.e. lowering her mouth should not put dimples in her chin as can be seen in the image on the right. And widening the nose should not cause creases in the bridge of the nose.

    My initial thought was that this might have been smoothing groups, but alas, it is not. It is indeed micro deformations in vertexes being added together across multiple blendshapes.

    Appreciate any and all help y'all can offer.
     
  2. Olmi

    Olmi

    Joined:
    Nov 29, 2012
    Posts:
    1,553
    You probably have some issues with your blend shapes if they affect wrong vertices. I'd definitely correct that problem in the source, i.e. in the DCC app the models were made with.

    You probably could edit the mesh weighting with code, like process vertices based on some threshold to clamp out some 0.1% type effects, which still show up if gesture morphs are a bit so-so quality...
    https://docs.unity3d.com/ScriptReference/Mesh-boneWeights.html
     
  3. stoney88

    stoney88

    Joined:
    Jun 13, 2018
    Posts:
    6
    Thank you!

    I will definitely look into this.
     
  4. wetcircuit

    wetcircuit

    Joined:
    Jul 17, 2012
    Posts:
    1,409
    When you import the figure, try toggling "Legacy Blend Shapes". That should stabilize the normals.
     
  5. stoney88

    stoney88

    Joined:
    Jun 13, 2018
    Posts:
    6
    I'll give that a try too. Thank you!
     
  6. stoney88

    stoney88

    Joined:
    Jun 13, 2018
    Posts:
    6
    I think I got it. Thank you all!
     
    wetcircuit likes this.
  7. vidar626

    vidar626

    Joined:
    Dec 18, 2013
    Posts:
    1
    nice! care to share what your solution was? did toggling legacy blend shapes work or what?