Search Unity

  1. The 2022.1 beta is now available for testing. To find out what's new, have a look at our 2022.1 beta blog post.
    Dismiss Notice

Normals on skinned meshes.

Discussion in 'Editor & General Support' started by Zomby138, Aug 19, 2010.

  1. Zomby138

    Zomby138

    Joined:
    Nov 3, 2009
    Posts:
    657
    Hello everyone.

    I'm having serious trouble with the normals on skinned meshes while changing the position and scale of bones.

    If I rotate a bone, then the normals on the mesh are updated correctly.

    If I translate (move) a bone, then the normals don't seem to be updated at all.

    If I scale a bone, then the normals are updated incorrectly, they actually seem to move the opposite way to how they should in most cases. I think what it's doing it scaling the normal in the same space as the mesh and then re-normalizing it. This is not the correct way to do it.

    Re-calculating correct normals on the fly should be easy for moving or scaling bones. Blender has no trouble doing it extremely fast.

    I function RecalculateNormals() does not help, and then it messes up the UV seams.

    Are there any known work-arounds for this problem ? Is it something that might be fixed in a update ? Am I just missing a setting somewhere ?

    Thanks to anyone who might be able to help me.
     
  2. Zomby138

    Zomby138

    Joined:
    Nov 3, 2009
    Posts:
    657
    I have a really weird work around for this now, which might help others if they find that this is a problem for them.

    If you have a skinned cloth physics componant attached yo your skinned mesh, then the normals will be updated correctely on the fly. This is even if the skinned cloth componant is not active! If you untick it then it STILL seems to work.

    Madness.
     
  3. callen

    callen

    Joined:
    Dec 31, 2013
    Posts:
    27
    This no longer seems to work (9 1/2 years later, what a surprise), the Cloth component has to be enabled to update normals. And I cannot figure out how to have it enabled but not actually affect mesh vertices, which turns my characters to goo.
     
  4. Graham-B

    Graham-B

    Joined:
    Feb 27, 2013
    Posts:
    289
    Running into the same issue, I wish there was a solution to recalculate the skinned mesh normals properly...

    Would be nice if we could see how exactly the cloth component is recalculating the normals and create our own script without the cloth aspect.
     
    Last edited: Sep 15, 2020
    Andimator likes this.
  5. niskander

    niskander

    Joined:
    Dec 30, 2019
    Posts:
    2
    I'm having the same issue in 2021... Adding a cloth component fixes it but I'm not sure if it's possible to turn off all the cloth functionality
     
    Graham-B likes this.
  6. Graham-B

    Graham-B

    Joined:
    Feb 27, 2013
    Posts:
    289
    I'd still love to see a solution for this, such a glaring issue...
     
  7. Graham-B

    Graham-B

    Joined:
    Feb 27, 2013
    Posts:
    289
    Any update on this issue?
     
unityunity