Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Someone wrote a Unity shader to make photorealistic animated faces

Discussion in 'General Discussion' started by HonoraryBob, Jun 8, 2021.

  1. HonoraryBob

    HonoraryBob

    Joined:
    May 26, 2011
    Posts:
    1,212
    I came across this on Twitter: custom Unity shader that makes eyes blink realistically (apparently using a vertex shader effect) and adds things like sweat or water running down the face as well as photorealistic skin etc: https://twitter.com/Sakura_Rabbiter/status/1401925341656981507

    It looks to me like it just uses a tiling normal map to get skin detail (fairly repetitive) and a facial texture adapted from a photo and likewise for the eye texture. The main difficulty, I would think, is deforming the vertices of the eyelids to produce a convincing blinking motion (which also includes deformation of the skin under the eye) but I would think that could just be done by having the shader move vertices in an elliptical zone around the eye, after passing the coordinates to the shader.
     
  2. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    Ok, the eye looks creepy, but otherwise pretty awesome work.
     
    HonoraryBob likes this.
  3. SoyUnBonus

    SoyUnBonus

    Joined:
    Jan 19, 2015
    Posts:
    42
    That normalmap detail for the skin is also applied on the eyebrow. As always, it can be improved, it's still pretty cool though!
     
    HonoraryBob likes this.
  4. HonoraryBob

    HonoraryBob

    Joined:
    May 26, 2011
    Posts:
    1,212
    She said she used HDRP, but I don't see why this couldn't be done in the normal Unity rendering pipeline. Is there any reason it couldn't ?
     
    Joe-Censored likes this.
  5. BrandyStarbrite

    BrandyStarbrite

    Joined:
    Aug 4, 2013
    Posts:
    2,068
    Wow! That is some amazing work there.

    But something about the eye animation looks scary though.:p
     
  6. N1warhead

    N1warhead

    Joined:
    Mar 12, 2014
    Posts:
    3,884
    I suppose it might have just been because Shadergraph may have been easier for them.

    EDIT: There is an eye master graph I believe, so probably helped a bit.
     
  7. koirat

    koirat

    Joined:
    Jul 7, 2012
    Posts:
    2,009
    Is the eye shader the same that comes with unity ?
     
  8. Lesnikus5

    Lesnikus5

    Joined:
    May 20, 2016
    Posts:
    131
    It seems to me that the eyelid closure was done with blendshape, not with a shader.
     
  9. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    9,753
    I hate how "photorealistic" has been redefined to mean "high fidelity" because nothing about the texture, movement, lighting, or anything else is "photorealistic" or even eye realistic.
     
  10. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,323
    In all honesty, the skin around that eye reminds me of a raw chicken breast that hasn't been cooked yet. Jello-like translucency of the skin is quite similar to that.
     
  11. scottymclue

    scottymclue

    Joined:
    May 13, 2021
    Posts:
    107
    Good heavens that looks pretty smart indeed! Especially if it is just a shader.

    Now we don't think unity has anything like this, although if you look at their latest demo, they have a very sophisticated eye rig to experiement with inside the main character of the heretic demo I believe. Of course metahumans does such a thing out of the box like magic :)

    https://forum.unity.com/threads/my-foray-into-unity.1111525/page-2#post-7249433