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
     
    Deleted User likes this.
  2. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    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,790
    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,790
    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. Deleted User

    Deleted User

    Guest

    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.
     
    ARon_w and Xoduz like this.
  8. WendelinReich

    WendelinReich

    Joined:
    Dec 22, 2011
    Posts:
    228
    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:
    228
    It worked. You are a genius and deserve the Nobel prize!
     
    JonasLuz and Antti2 like this.
  11. fherbst

    fherbst

    Joined:
    Jun 24, 2012
    Posts:
    802
    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:
    228
    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:
    802
    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:
    228
    I think you need to be more specific; also consider filing a bug report.
     
  16. Volkerku

    Volkerku

    Joined:
    Nov 23, 2016
    Posts:
    114
    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:
    228
    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:
    17
    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.
     
  19. SammmZ

    SammmZ

    Joined:
    Aug 13, 2014
    Posts:
    174
    I want to up this topic from the Nov 2019, because "calculating" normals is not an option when you use corrective blendShapes. Because corrective blendShape should use normals taken from the specific pose, not the default T pose (which is taken for calculation during importing model)
     
  20. AGregori

    AGregori

    Joined:
    Dec 11, 2014
    Posts:
    527
    Exactly. Experiencing the same issue as late as 2019.3.0.
     
  21. legrandcolin

    legrandcolin

    Joined:
    May 31, 2019
    Posts:
    2
    up, this is a big problem Im facing now, we use corrective to create a customizable face character...when the eyelid close and I call my corrective for that particular situation it messes the normals up :S
     
    anisimovdev likes this.
  22. dethjester

    dethjester

    Joined:
    Apr 6, 2020
    Posts:
    1
    This is still a issue. Has anyone found a solution. Possibly pre calculating normals for correctives? I don't think FBX holds onto blendshape normals. Has anyone tried another format or found a way to ingest precalcualted normals per blendshape? This is plaguing any sort of high end facial blendshape rig.
     
  23. fherbst

    fherbst

    Joined:
    Jun 24, 2012
    Posts:
    802
  24. brinca

    brinca

    Joined:
    Mar 29, 2015
    Posts:
    33
    Having had this same problem on Unity 2019.4.3f1, I resolved it by setting "Blend Shape Normals" to None, in the model's import settings.

    Note that I kept "Normals" to Import, and "Smoothness Source" to Prefer Smoothing Groups, which allowed the model's original hard edges to be kept split, even when distorted by the blend shape's influence.
     
  25. fherbst

    fherbst

    Joined:
    Jun 24, 2012
    Posts:
    802
    QA replied to me and said the solution is to keep them on "import" and turn on "legacy blend shapes". Apparently the "new" way has never worked correctly, was rolled out nonetheless years ago, and is still being fixed, and this is known internally.
     
  26. brinca

    brinca

    Joined:
    Mar 29, 2015
    Posts:
    33
    The option "Legacy Blend Shapes" seems to disable blend shape normals, so I guess the end result is the same as setting "Blend Shape Normals" to none... ;)

    Either way, it's working in my case, so I'm happy... (for now)
     
  27. MatVic

    MatVic

    Joined:
    Aug 13, 2020
    Posts:
    2
    I confirm that the issue still exists in the recent version 2019.4.20f.
    The "Legacy Blend Shapes" option doesn't work in my case. Same situation using "Blend Shape Normals" to None.

    I would like to share with you the solution that I have found today: I see that the problem is caused by setting a Vertex Group to blend with the relative shape (generally the Basis one). If you remove that and adjust your shape key in order to work without the Vertex Group, the issue about the Blend Shapes should be resolved in the FBX export.
    I have resolved this issue with this trick for now... I think that it is a bug of the Blender FBX export feature.

    I don't know for Maya or other 3D modeler... I hope it can be helpful to someone
     
  28. Hummy91

    Hummy91

    Joined:
    Jun 7, 2017
    Posts:
    67
    Was this ever solved in any version of Unity? There is from my tests currently no way to use BlendShapes as correctives with everything functioning. The closest you can get is to effectively disable the blend shape normals thus resulting in a visually correct blendshape but without normals, therefore all the shading and material interaction is lost. (2021.3.18F1). Note that to reproduce this issue, you need a corrective blendshape for extreme joint angles, usually in the 100-150 degree range.
     
    Wolfram likes this.