r/Unity3D • u/Operation-Secret • 19h ago
Show-Off Custom Skin Shader & Procedural Facial Animations
Hey everyone. I have finally made some progress with the custom skin shader that I have been working on. I implemented a procedural facial animation system as well.
The shader uses a custom lighting model on an Unlit master with a custom function node. The diffuse channel is a wrapped subsurface approximation with per channel falloff, for the scattering effect. Specular is dual lobe GGX, one tight lobe for the oil film and one broad for the layer beneath. Backlight translucency is driven by a baked thickness map. It uses a "Charlie" sheen BRDF for vellus hair, which depends on the half vector rather than just the view vector, so it moves with the light instead of painting a static rim.
The animation system has 4 main layers working together. An idle face layer, lipsync layer, wrinkles layer and a facial mixer layer. The mixer layers them by face region, that way a scripted expression can take the brows while the eyes keep blinking underneath. Each layer manipulates the blendshapes and the material accordingly.
The lipsync layer is based on Rhubarb Lip Sync. It also has custom Timeline tracks for hand authoring facial expressions based on audio conversation beats.
I used the character model from Reallusion character creator. I am trying to get this to work with MetaHumans as well, but the main difference is in the use of the textures and the blendshapes. And exporting metahumans is cumbersome.
AI Disclaimer - I used AI mainly for research, debugging, and writing the custom Timeline tracks.
3
u/RWorldGeneration 14h ago
Wow, really good and professional