Search Unity

Character Kit - High end skin shaders and more for HDRP

Discussion in 'Assets and Asset Store' started by pauldrummond, Jan 31, 2019.

  1. pauldrummond

    pauldrummond

    Joined:
    Oct 30, 2014
    Posts:
    145
    Working on eye shadowing for the iris. HDRP doesn't provide access to the scene lighting so there's some trickery involved.

     
  2. jjejj87

    jjejj87

    Joined:
    Feb 2, 2013
    Posts:
    1,117
    looking good mate, can't wait for full release!
     
  3. pauldrummond

    pauldrummond

    Joined:
    Oct 30, 2014
    Posts:
    145
    It's coming together slowly but I hope to get an early release ready soon.
     
  4. pauldrummond

    pauldrummond

    Joined:
    Oct 30, 2014
    Posts:
    145
    I have a sort-of-working iris highlighting solution that will react to a specified key light, but I plan to replace this with something better.

     
  5. Kemp-Sparky

    Kemp-Sparky

    Joined:
    Jul 7, 2013
    Posts:
    72
    This is looking good! Tension maps are also something I have been very interested in adding to my characters.
     
  6. pauldrummond

    pauldrummond

    Joined:
    Oct 30, 2014
    Posts:
    145
    Wrinkle maps are still planned. I'm working on the eye shaders and control rig at the moment though.
     
  7. LastAtlas

    LastAtlas

    Joined:
    Jun 9, 2013
    Posts:
    15
    Any updates? :) Is this all done in shader graph?
     
  8. pauldrummond

    pauldrummond

    Joined:
    Oct 30, 2014
    Posts:
    145
    Been busy with client work, but will have an update soon. The asset is a mixture of shader graph, custom shader code and scripting for the control rigs.
     
  9. LastAtlas

    LastAtlas

    Joined:
    Jun 9, 2013
    Posts:
    15
    Thanks for the speedy response, glad you are still working on it :) Guessing you have no idea how it will be priced yet?
    Also when you say custom shader code do you mean custom nodes added into shader graph? For example if I wanted to modify the skin shader so it handled colors differently would it be likely to be possible using shader graph?
     
  10. pauldrummond

    pauldrummond

    Joined:
    Oct 30, 2014
    Posts:
    145
    Yes, I’m using custom code nodes within shader graph. You will be able to edit the graphs if required, although I’d advise working on copies.
     
  11. pauldrummond

    pauldrummond

    Joined:
    Oct 30, 2014
    Posts:
    145
    I'm sorry about the lack of updates, but I've had to take some time off due to sickness. Hopefully back soon.
     
  12. pauldrummond

    pauldrummond

    Joined:
    Oct 30, 2014
    Posts:
    145
    A quick recording to show the single layer eye shader. The eye controller rig allows you to specify a main light to simulate scattering in the lens.



     
    Last edited: Jan 10, 2020
    one_one likes this.
  13. pauldrummond

    pauldrummond

    Joined:
    Oct 30, 2014
    Posts:
    145
    I've been unable to work on this for a while. Will try to get some time for it soon.
     
  14. merpheus

    merpheus

    Joined:
    Mar 5, 2013
    Posts:
    202
    Is it possible to open source with it's current state? Maybe we can send Pull Requests to further develop it as community?
     
  15. pauldrummond

    pauldrummond

    Joined:
    Oct 30, 2014
    Posts:
    145
    Unity have released the digital human assets package from The Heretic. Hopefully this can be used to solve some of the difficult issues. It looks like I was on the right track with the eye occlusion. It needs to be implemented with DOTS. Standard game object approach is just too slow.
     
  16. pauldrummond

    pauldrummond

    Joined:
    Oct 30, 2014
    Posts:
    145
    Had a chance to look into the Heretic Digital Human asset. Good news: I was on the right track with vertex tracking for eye occlusion and my ideas about the lens modelling were 'almost' right. Bad news: It's still hideously complex and there are almost no comments in the code. The Unity demo team really don't like providing documentation.

    UPDATE: There's no documentation at all.
     
    Last edited: May 14, 2020
    one_one likes this.
  17. LastAtlas

    LastAtlas

    Joined:
    Jun 9, 2013
    Posts:
    15
    How are you going with all this? I am looking through the Gawain asset and it's somewhat difficult to figure out what's going on, especially since it seems to be largely made up of compiled content generated by snapperstools which I guess is not really possible to reverse engineer.
     
  18. pauldrummond

    pauldrummond

    Joined:
    Oct 30, 2014
    Posts:
    145
    The Heretic is impressive but I haven’t found it particularly useful as nothing is documented.
     
  19. pauldrummond

    pauldrummond

    Joined:
    Oct 30, 2014
    Posts:
    145
    Working on blendshapes for the demo scene. These are used in the base animation, but also for the procedural controls, e.g. moving the eyes to look at something. They will also drive the wrinkles system.

     
    Unlimited_Energy and one_one like this.
  20. pauldrummond

    pauldrummond

    Joined:
    Oct 30, 2014
    Posts:
    145
    Working on the expression poses:

     
    one_one likes this.
  21. pauldrummond

    pauldrummond

    Joined:
    Oct 30, 2014
    Posts:
    145
    I dug into The Heretic code and was able to copy their custom pass solution for the tear line / edge blending. Seems resource intensive so I'll keep working on it.
     
    one_one likes this.
  22. pauldrummond

    pauldrummond

    Joined:
    Oct 30, 2014
    Posts:
    145
    Improved tearline / edge blending:

     
    one_one likes this.
  23. one_one

    one_one

    Joined:
    May 20, 2013
    Posts:
    621
  24. pauldrummond

    pauldrummond

    Joined:
    Oct 30, 2014
    Posts:
    145
    Thank you. I'll watch it all later when I have a moment. My skin shader currently blends low-res textures for four different types of detail across the face. Perhaps this talk has some techniques I can borrow.
     
    one_one likes this.
  25. pauldrummond

    pauldrummond

    Joined:
    Oct 30, 2014
    Posts:
    145
    It was a good presentation. Seems like my system is very close to what was described.
     
    one_one likes this.
  26. socialtrens

    socialtrens

    Joined:
    Oct 23, 2017
    Posts:
    65
  27. pauldrummond

    pauldrummond

    Joined:
    Oct 30, 2014
    Posts:
    145
    The skin shaders use detail textures which are shared across the entire project, so the textures unique to a character (albedo, normal, SSS etc) can remain low resolution. The detail textures are blended on top of the base to add fine detail.

    What's not shown here is the third level of detail; the unique wrinkle maps which fill in important areas such as the eyes and mouth, and react to deformation.



    There's nothing to stop you using higher resolution textures for the character base, blending in the details for even better results.

    This example is the standard shader based on HDRP Lit. There is also an advanced version using HDRP StackLit which supports dual-lobe specular. This is more resource-intensive but will give better results for close-ups, cutscenes etc.
     
    one_one likes this.
  28. pauldrummond

    pauldrummond

    Joined:
    Oct 30, 2014
    Posts:
    145
    To be clear, the standard skin shader uses HDRP LitShader. The more advanced version uses StackLit, and is intended for cutscenes and demos. It’s too resource-intensive to use in a game.

    Other developers are working on skin shaders and I spotted a rather nasty forum conversation where a customer accused them of false advertising because the shader was based on HDRP LitShader. To be clear, what I plan to deliver is a mixture of custom shaders created in Shader Graph, HLSL nodes, scripts and textures.
     
    one_one likes this.
  29. pauldrummond

    pauldrummond

    Joined:
    Oct 30, 2014
    Posts:
    145
    Here's the standard skin shader blending in wrinkles based on the strength of the jaw-open blendshape:

     
    one_one likes this.
  30. one_one

    one_one

    Joined:
    May 20, 2013
    Posts:
    621
    So that's driven by blendshape weights, rather than tension maps?
     
  31. pauldrummond

    pauldrummond

    Joined:
    Oct 30, 2014
    Posts:
    145
    Yes. Blend shapes are commonly used for facial animation, so we might as well use the weights as an intensity control for the normal maps. I want to fit in with common workflows rather than imposing extra systems. That said, I may look at tension maps as an alternative driver too.
     
  32. one_one

    one_one

    Joined:
    May 20, 2013
    Posts:
    621
    How are parts of the wrinkle normal map linked to specific blend shapes?
     
  33. pauldrummond

    pauldrummond

    Joined:
    Oct 30, 2014
    Posts:
    145
    Mask maps. I’m working on a demo.
     
    LukeDawn likes this.
  34. pauldrummond

    pauldrummond

    Joined:
    Oct 30, 2014
    Posts:
    145
    Blinking blend shape with compression normal blended in:

     
  35. LukeDawn

    LukeDawn

    Joined:
    Nov 10, 2016
    Posts:
    404
    Outstanding work so far.
     
  36. pauldrummond

    pauldrummond

    Joined:
    Oct 30, 2014
    Posts:
    145
    I haven't been able to work on this for a while. Hopefully things will ease up in the new year. Stay safe and healthy everyone.
     
    tredpro, LukeDawn and one_one like this.
  37. merpheus

    merpheus

    Joined:
    Mar 5, 2013
    Posts:
    202
    Man do you have any plan to release the asset anytime this year? I mean, I am gonna need a solution in a month or so, latter is, me writing custom hlsl shaders for SSS, wrinkle maps, and eyes and it is a good amount of work. So any updates would be appreciated.
     
  38. pauldrummond

    pauldrummond

    Joined:
    Oct 30, 2014
    Posts:
    145
    I’m afraid I haven’t been able to work on this for a while. Paying work is hard to find at the moment so I have to concentrate on that.
     
    one_one likes this.
  39. socialtrens

    socialtrens

    Joined:
    Oct 23, 2017
    Posts:
    65
    still waiting for this
     
  40. rafaga

    rafaga

    Joined:
    Mar 20, 2009
    Posts:
    4
    Any progress? This could be the best skin solution for HD.
     
  41. pauldrummond

    pauldrummond

    Joined:
    Oct 30, 2014
    Posts:
    145
    Unfortunately I haven't been able to work on this for a while. I'm having to concentrate on paid work for the moment.
     
  42. pauldrummond

    pauldrummond

    Joined:
    Oct 30, 2014
    Posts:
    145
    A quick video of wrinkle mapping:
     
  43. pauldrummond

    pauldrummond

    Joined:
    Oct 30, 2014
    Posts:
    145
    The blend shape weight driver to control wrinkle mapping is working. Adding the component to the skinned mesh allows us to set up eight mask zones for areas such as right eye, left eye, right cheek etc. We then turn on handlers for the blend shapes that should drive the wrinkles. In the example shown the 'browDownLeft' blend shape defines maximum blend weights for the 'eye left', 'brow left' and 'brow middle' mask zones. Negative values indicate compression, positive values indicate stretching. As the strength of the 'browDownLeft' blend shape increases these mask zone weight values are used to blend in the compressed and stretched normal maps.



    As everything is driven by blend shape weights it should fit most workflows. It doesn't matter how the skinned mesh is being animated; timeline animation clip, face capture, or user controlled rig, as long as blend shapes are being used the correct compression/stretch normal maps will be blended in.

    The demo head uses the standard 52 ARKit blend shapes.
     
    LNMRae likes this.
  44. pauldrummond

    pauldrummond

    Joined:
    Oct 30, 2014
    Posts:
    145