Saurabh Jethani / Creating realistic skin in UE4
Greetings everyone, in this article I’ll try my best to showcase how I approach creating skin for UE4.
Also this article includes using XYZ Multi-channel Faces maps and the new XYZ tileable MicroSkin library.
Here is also the MicroSkin Discovery page.
Hope this will be helpful!
Part 1- Introduction to Multichannel FacesSo texturingXYZ has released these awesome new maps. That changes the whole game how we are used to texture faces. The detailed use of these maps can be found:
Tip: To make things easier, go to ZBrush.
Fill your face with white, then paint all the landmarks (Brows, eyelids, nazalfold, nose, jaw, border of lips, etc.) using red paint. Create a texture through polypaint, export it out and multiply on top of your photoshop layer, you’ll have a guideline to place the points easily.
So I use Red and Green channel from my displacement map in zbrush to add pores. I keep things in layer to make them non destructive. Before applying the displacements I like to add a random noise which breakups the perfect feel from the sculpt and gives it more organic look.
Note: One cool thing Jeremy showed me, Just inflate your mesh by a small amount to get better looking pores.
Instead of the ones that just goes in and out.
Inflating does change your primary sculpt. So to fix that, save a morph target in lower subdiv. On highest, inflate the pores. Go back to lower subdiv, using morph bring back your primary info. That way you’ll maintain both your primary information and the inflate on pores.
Part 2- Textures
So the textures I used were: Primary: Albedo, Cavity, AO, Normal, Roughness Secondary: MicroNormal, Normal weight, Detail Tilables(Normal and Cavity), Detail Tilables Zones, Roughness Tilables Optional: Specular, Translucency, Height |
- Primary:
Albedo: Color information for the face. Since the new XYZ maps comes with albedo packed together. My color info matches my displacement, I just saved out the albedo and did hand painting to add information specific to my character. If you are looking for hand painting the whole albedo, this is an awesome video to watch! Cavity: Cavity map is just a black and white map where everything is white, but all the pores are black. Cavity map in going to be used in lot of places, this one helps us a lot to bring back the pore informations we lose from subsurface shader. I still extract cavity from zbrush, but have heard good things about Knald for baking it out. AO: Ambient occlusion baked down from high poly to low poly mesh. Normal: Normal information baked down from high poly to low poly mesh. Roughness: I still believe it’s one of the most artistic map for skin, in terms of how they are constructed. Everyone have their own way of making one, but the common principles still remain the same:
|
Note: If you want to use a texture for roughness, the material supports it. I am using a zone map inside UE4 for roughness, that gives me the ability to change my roughness in real time inside UE4. That get rids of the back and forth, and I can look dev easily.
The map is an RGBA map, where zones are separated into channels.White color in channels will define the zones, whereas the black parts will be unchanged.
A map with ALPHA channel should be exported as ‘TGA 32bit’.
- Secondary
MicroNormal: Micro Normal map is applied on top of our original normal map to enhance some of the micro details. I extract it out of Blue channel of our XYZ displacement. Run it through a software like Crazybump to convert it into normal map. DetailTilable: Detail tilables for pores. They will tile on our model to give us finer details which even a 8k map cannot capture. Detail tiling require two maps. Normal and Cavity. If you wanna use your own normal map, make sure you extract a cavity map out, software like Knald can do that. But hey, Why go for something else when you can go for the best one available. DetailTilablesZone: RGBA map that defines where each tilables will affect the face. The Red channel controls the 1st tilables. Followed by G B A controlling 2 3 4 respectively. The material allows for 8 Tilables, the option needs to be turned on. After enabling, the second R G B A controls 5 6 7 8. Normal Weight: A black and white map, which globally controls where the MicroNormal and DetailTilable affects. For example, lips have their own specific details. There should not be much or any random breakup. So we mask out that area with a Normal Weight map. Roughness Tilables: Just a black and white noise map, which break up the roughness on micro level, giving your pores and detail tiles more moisture and life. |
- Optional:
We do not need these maps, but the material supports the use of them in case you need them. Specular: Specular map instead of values and sliders. I will recommend not using a spec map, in most cases it seems to break the shader. Translucency: Defines the opacity of zones on face. Flat values work just fine. In case you need a RGBA zone map, the material supports that too. Height: Height map does comes in play for super closeup. |
Adam Skutt came up with this trick to have your height map control the intensity of tilables using height map. For example, a mole will stretch the skin in micro level, resulting in the pores to be less intense. Height map helps with that, plus it also gives the face displacement. Which is an overkill but it’s there if you need it.
Make sure the tesselation multiplier is more than 1.
I extract the height map from Green channel of XYZ displacement map. Clamp that inside photoshop to get more black and white.
Part 3- Skin Material
Download the UE Skin Material here:
So here is the material system I’ve build using MEET MIKE material as a starting point. The texture sample source is set to Shared enabling us more than 16 maps.
We probably will never use all the settings it has, but I wanted to have all the possible options I could have think of, incase someone needs it.
So here is what our material is doing. The names in the shader should be self explanatory, but if you need a reference guideline. Here it is.
Note: If you want to use 8 Tilables. Under Tile04, there is a switch named Unlock Next Level. Yes! That’s what I name it. Just turn it on, and you’ll have other 4 tilables on.
Part 4- Skin Shading
The unreal skin shader has gotten super super awesome!!
For this one we are using subsurface profile ‘SP_Head’ from meet mike demo.
There are no specific values that’ll make your skin look realistic. It comes down to finding good references and matching those.
There are two elements I feel are important for skin shading:
- Subsurface
- Specular
Transmission I keep to default value most of time.
Unreal recommends 0.5 as a default specular value. But an important thing unreal has added in is the ability to have dual lobe specular.
Skin has two specular lobes instead of one, which makes for better rendering. The dual specular helps achieve extra spec and gloss around the highlights to mimic the oily surface of the skin. It helps skin look better, both in micro and portrait level.
Adding a cavity map helps remove specular reflections inside pores non-destructively. It can be baked into the specular map, but having a slider is much more flexible.
Skin is all about subtleties. Find good references and try your best to match them while making sure it looks good under every lighting condition.
Part 5- Tileables
The Normal map is being blended in our main normal map. The Cavity map is being used to affect our Spec,Albedo,AO and Roughness. Making a tilable node system is really easy, it’s just when you have 8*2 (16) Maps to add in your Normal,Spec,Albedo,AO and Roughness. Things do get a little messy, keep that in mind.
You guys can download the Skin material I created to have an in-depth look .
But here is a simplified version to show how to have tileables in UE4:
|
|
|
The control for Cavity in Roughness or AO will be constructed the same way as in Specular.
I also use a random noise, that tiles over my roughness and breakups my roughness in Micro level, giving it more fleshy and alive look.
Note: Before using the cavity map, they need to be processed for engine.
All you have to do is, clamp the map inside Photoshop to get more black and white values. What you want is everything to be white, and the cavities to be completely black with a bit of gradient.
If you are looking to do same things with tilable in Marmoset toolbag 3.
John O. Owsment has an awesome shader for it!
The UE4 material is inspired from his shader work.
And if you are looking for skin construction in Marmoset, I made an article a while ago.
But I still follow the same principles, it can also be helpful to cross check with this article to better understand what I am trying to convey:
https://marmoset.co/posts/creating-realistic-skin-toolbag-saurabh-jethani/
Hope this was helpful. Have a nice one!
Saurabh Jethani's: ArtStation | Instagram
We would like to thank Saurabh for his helpful contribution. If you're also interested to be featured here on a topic that might interest the community, feel free to contact us! |