Search Unity

Blend shape normals artefacts

Discussion in 'Animation' started by dnl_decarlo, Mar 24, 2018.

  1. dnl_decarlo

    dnl_decarlo

    Joined:
    Oct 24, 2016
    Posts:
    18
    Whit some corrective blendshapes unity generate artefacts on normal verteces even if the Blend shape draw a perfect geometry. Can anyone help on figure out why?

    Thanks everybody
     
    cvernon likes this.
  2. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,779
    Images of the problem needed to assist.
     
  3. dnl_decarlo

    dnl_decarlo

    Joined:
    Oct 24, 2016
    Posts:
    18
    the wireframe of the geometry is good, the corrective blendshape is working, but the normal vertex are very bad. they are like blocked in the pose of the first frame of the animation. the geometry is corrected by the blendshape when the leg moves, but the normal doesn´t do anything.

    Thanks theANMATOR2b for any kind of support
     

    Attached Files:

  4. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,779
    We have had a couple threads about this recently. Are you exporting via fbx from Maya?
    You may want to test with lights/shadows and a standard shader - just to test/see if that changes anything, but I don't think it will.

    Please consider filing a bug report on this - Also post which Unity version you are using, if you can reproduce in 2017.x versions.

    I'm testing out of 3D Max to attempt to reproduce.
     
  5. dnl_decarlo

    dnl_decarlo

    Joined:
    Oct 24, 2016
    Posts:
    18
    I have read all the the post on blendshapes and normal, but seems no one had a ufficial solution to that. I am exporting via fbx with maya and for now I am working with Lambert material in maya and standard shader in unity 2017.3.1f1. I also notice that someone post an issue tracker on this subject. Do you know what it can depend on? The weird thing: if I re-import the thx in a new project in maya, the issue doesn t exist. It produce only in unity.

    Btw thanks a lot,
    Seriously.
     
    theANMATOR2b likes this.
  6. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,779
    Looks like it's been an ongoing issues since 5.5.
    https://issuetracker.unity3d.com/is...using-deformed-skinned-mesh-with-blend-shapes
    https://issuetracker.unity3d.com/is...d-at-wrong-time-in-normal-calculation-process
    https://issuetracker.unity3d.com/issues/blendshapes-do-not-update-normal-directions


    I still have yet to test form 3D Max.

    @Mecanim-Dev this seems to be a recurring error. Has there been any notice of this problem? Thanks for reviewing.
     
    dnl_decarlo likes this.
  7. cvernon

    cvernon

    Joined:
    Jan 26, 2018
    Posts:
    5
    I'm trying to solve this problem also with facial blendshapes containing targets with overlapping vertex deltas. It looks like Unity saves fixed normals per blendshape target rather than recalculating normals on the deformed result which is what we would want.
     
    Xoduz likes this.
  8. WendelinReich

    WendelinReich

    Joined:
    Dec 22, 2011
    Posts:
    216
    Unfortunately this problem is still not solved, for our project is has reappeared in 2018.3.* and is still present in 2019.1.0b2. (It doesn't occur with 2018.2.)

    Below is an example using 2019.1.0b2 and two identical models. The screenshot is in-editor with Android as platform. The model on the left has blendshapes deactivated, the on the right has them activated around the beak, eyes and eyebrows, and the normal artefacts are clearly visible.

    At first I thought this was due to CPU skinning (because it first showed up on 2018.3, where GPU skinning is broken, see here). However, in 2019.1 it also happens with GPU skinning on. In fact, it's not even necessary to go to play mode, the issue occurs even in edit-mode when fiddling with blend-shape values by hand.

    EDIT: the problem occurs using both Legacy (Diffuse) and Standard shader, and with or without a directional light in the scene.

    EDIT: FIXED, see below.

    upload_2019-2-7_18-2-53.png
     
    Last edited: Feb 8, 2019
    chengkeng1987 and kanyvr1701 like this.
  9. kanyvr1701

    kanyvr1701

    Joined:
    Sep 9, 2017
    Posts:
    2
    I had the same issue. This was resolved by setting both Normals and Blend Shape Normals to "Calculate" in the Model section of the FBX. Hope this helps!
     
  10. WendelinReich

    WendelinReich

    Joined:
    Dec 22, 2011
    Posts:
    216
    It worked. You are a genius and deserve the Nobel prize!
     
    Antti2 likes this.
  11. fherbst

    fherbst

    Joined:
    Jun 24, 2012
    Posts:
    269
    I've got the same issue, and setting the Normals to "Calculate" did indeed work, but is not a good solution since it makes it impossible to define hard edges.

    EDIT: Filed a bug report, (Case 1132721) Blendshape normals not properly imported and blended

    EDIT2: Found a very old and related bug which is marked as duplicate, but can't find the non-duplicate - https://issuetracker.unity3d.com/issues/blendshapes-do-not-update-normal-directions
     
    Last edited: Mar 1, 2019
  12. WendelinReich

    WendelinReich

    Joined:
    Dec 22, 2011
    Posts:
    216
    Hard edges: well, AFAIK hard edges are really just split edges. If your 3D modeling program allows it (Blender does), you can simply split your hard edges upon export to FBX...
     
  13. fherbst

    fherbst

    Joined:
    Jun 24, 2012
    Posts:
    269
    Yes that's how hard edges always work in realtime (two vertices at the same point with different normals). That doesn't stop Unity from calculating them as smooth if it's set to "Calculate".

    Also, the point of the bug report is that with a properly exported mesh that has hard edges blendshapes break / don't respect the hard edges anymore.
     
    WendelinReich likes this.
  14. ykantbobreed

    ykantbobreed

    Joined:
    Oct 7, 2012
    Posts:
    2
    I tried this on my mesh and it decidedly *didn't* fix the issue. I'm still getting impossible normals on the part of the eyelid that starts as the epicanthic fold. Did anyone have a second answer?
     
  15. WendelinReich

    WendelinReich

    Joined:
    Dec 22, 2011
    Posts:
    216
    I think you need to be more specific; also consider filing a bug report.
     
  16. Volkerku

    Volkerku

    Joined:
    Nov 23, 2016
    Posts:
    50
    I got the same issue, blend shape normals are screwed, fbx from Maya 2018. I'm on Unity 2018.3.
    Calculating normals in Unity does not fix this, the models looms pretty bad this way.
     
  17. WendelinReich

    WendelinReich

    Joined:
    Dec 22, 2011
    Posts:
    216
    Again: this problem appears in some situations (like yours) but not others (like mine), so if you want to get this fixed, you need to be much more specific and optionally file a bug report...
     
  18. Rik_Vasquez

    Rik_Vasquez

    Joined:
    Aug 24, 2015
    Posts:
    10
    Confirming kanyvr1701 fix for Blender 2.79 fbx export (2 blend shapes) and Unity 2018.3.

    Tested face eye blinks using blend shape keys on timeline. Prior to fix there were shading errors occuring in other areas of face although only the eyelids were vert re-posed (for the closed state). Setting normals and blend shape normals to "calculate" in Model properties, in Unity, smoothed those areas out.