Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question WINDUP demo video question - how did they do the tear on face?

Discussion in 'Virtual Production' started by akent99, Nov 22, 2022.

  1. akent99

    akent99

    Joined:
    Jan 14, 2018
    Posts:
    588
  2. ChrisKKang

    ChrisKKang

    Unity Technologies

    Joined:
    May 19, 2020
    Posts:
    1
    Hey akent99, the dropping tear is a custom shader effect for all the characters in the short. You could be inspired by any classic raindrop shader instance like: https://www.shadertoy.com/view/ltffzl

    I posted a simple breakdown here also: https://www.artstation.com/artwork/48Lq18

    One thing you need to know is we use a diffusion profile that could fit both the skin and tear rendering from some certain perspectives. But for general use, I highly recommended you give the teardrop layer a specific profile to achieve a more accurate result.
     
    marc_tanenbaum likes this.
  3. akent99

    akent99

    Joined:
    Jan 14, 2018
    Posts:
    588


    I used the Art of Code shader (referenced by that shader) and loved it in the built in render pipeline. However when I upgraded to HDRP, my understanding is the shader used a "grab buffer" (?), which is not supported in HDRP. So I have not found a shader as good or as clear for HDRP. (I am still learning, so I may have that wrong.) In particular, my understanding of the grab buffer is you can access the image before it hits the glass, then you can do refraction etc by sampling the original at different coordinates, resulting in the lens sorts of effects. Because the HDRP is put together differently, you can only do that effect with a camera lens effect in HDRP (?). But then its hard to follow the face contours etc.

    So I have been trying to understand how to achieve the same effect in HDRP. I was after both a rainy window (I bought a HDRP asset from the store for this, but it does not look as good as the Art of Code shader) and a "tears on face" shader.

    When you say "layer" here, are you talking about a separate mesh, or lighting layer, or ...? I was trying to understand the mechanics of getting a tear to roll down the skin with a trail like that. I am using Shader Graph with a fairly simple face skin shader so I can add it into all my existing characters once I work out how to do it.

    Thanks for the info!
     
  4. akent99

    akent99

    Joined:
    Jan 14, 2018
    Posts:
    588
    I should note the tear effect on the cheek sounds easier than transparent glass / window rain because I have the underlying texture without need for a grab buffer etc. (The drops forming in the eye before going down the cheek I was playing with some real blobby shapes, but don't really have a good solution for yet.) I just need to work out how to animate the texture setting for a single character in a scene. But when you mentioned having a different diffusion profile that gave me pause that I am missing something.

    Note: I am creating a video, so I don't need perfection that will work in a game in all circumstances. A cheat for a single camera shot is fine.