Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Showcase Physically corrected normal Skinning

Discussion in 'Graphics for ECS' started by kite3h, Aug 6, 2022.

  1. kite3h

    kite3h

    Joined:
    Aug 27, 2012
    Posts:
    192
    As we all know, the vertex normal value of linear blended weight skinning is actually fake normal.

    The original vertex normal is determined by the adjacent face, not the rotation of the bone.

    But we've been using crappy shader code like that for 30 years because there's no way to do it with a shade or parrall process.

    Now that we have a mesh shader, we can get rid of that pain, but it is still too
    painful work
    to handle multiple skins at the same time.

    Here's a simpler way to use custom buffers.

    In the tessellation shader, you can get the correct face normal value.

    This value is rendered in a custom buffer, and this value is read from the vertex shader in the actual render pass and processed.

    Of course, if the depth differs significantly or external values are culled.

    The following image is a color expression of the difference between the corrected normal and the actual vertex normal value.

    Naturally, if the movement of the bone is large or the weight blending is severe, the error value increases.
    Now, cutscenes already use the same geometry cache as alembic, so there is no need to use it, but if you want accurate skinning like Spider-Man, try it.

    .
     
  2. DreamingImLatios

    DreamingImLatios

    Joined:
    Jun 3, 2017
    Posts:
    4,166
    1) I couldn't see the difference in the video. Would you mind highlighting it?
    2) Why do you even need tesselation? Just use a compute skinning pipeline and have an extra compute skinning pass to process normals and tangents. Pass 1 = Blend shapes, Pass 2 = Skinning, Pass 3 = Normal and tangent reweighting