Texturing Guide for Characters Part 2 (Skin Material Unreal)
And now it's time for part 2 of the texturing guide for Skin Materials. This part is going to focus on the second half of the material creation, which is Unreal. I'm going to show you my process for building a skin shader in Unreal Engine and using the skin textures we made and amplifying all that goodness in a game engine.
Please note that this guide is under the assumption that you have exported and imported all of your textures into Unreal with their proper settings along with your model. With that out of the way let's get started!
The first step we do is make ourselves a Material. Just right click and navigate over to create the material. And to keep naming conventions nice and organized we'll use the suffix M_ for our Master and MI_ for our Material Instance. The names afterwards are up to you. For my example mine will be M_TutSkin and MI_TutSkin.
We're gonna hop inside our M_TutSkin and once we're in we are going to right click and search for TextureParameter2D and CTRL-D them to duplicate it twice so we have three total Texture Parameters. Make sure to rename them to Base Color for our Color Map, AOR for our Ambient Occlusion, Roughness and Metallic packed map, and then Normal for our Normal map. (These maps are exported from Substance). We'll add in our Spec Map later.
Now we're going to plug in our texture maps into our Texture2DParameter nodes, once those are plugged in we're going to add some Scalar Parameters for Spec and Roughness. We'll end up adding some more later Scalars later, next we add in a multiply node for our Roughness, again we'll end up adding more of these later. Hotkey for that will be M. And these Hot keys work with left clicking anywhere on the graph.
After adding those in we plug in Base Color RGB into the Base Color node of our Shader, for AOR, we separate these channels, R will go into Ambient Occlusion, Roughness we'll plug into our A for Multiply then our Scalar Roughness will plug into our B in Multiply this will then go into our Roughness node. (This adds a slider control for our roughness. Our blue from the AOR will go into Metallic. Lastly we'll plug in our normal parameter into the normal node of the shader.
(Make sure to set your Scalar parameters to a max value of 1, we can over crank and under crank these later but it allows the values to stay within the 0-1 range for easier control).
Alright next we're going to see how our textures look on our model let's make a Material Instance by right clicking our Master and creating an Instance, please follow naming conventions it makes everything easy to find and for your yourself and for your teammates/co-workers to jump in and find them.
Now after we make our Instance we're going to turn on our Roughness and Spec Values for this case we're going to set our Roughness to 1 and our temp spec to .4. Notice that when you move these sliders in the Instance it'll change those values in real-time in the viewport. We can see that the results look pretty decent all things considered. But we can make this even better and start amplifying this and making a more complex Material. Let's jump back into our Master and start adding some stuff.
Back in our Master Material we're going to choose our shader and change its shader model. We're going to change it from Default Lit to Subsurface Profile. Afterwards we're going to make our own Subsurface Profile. This is where our scattering comes from and makes our skin more translucent and affected by light.
Next step is adding the Subsurface Profile, just click the drop down and hit the button at the very top of the menu that says Subsurface Profile and you'll name and save it somewhere in your file directory. I named mine TUTSPP for demonstration purposes.
Now we're going to step into our TUTSPP and tweak some settings. A majority of these settings I left at default since they gave me exactly what I wanted. The ones I ended up changing our in the Dual Specular, this just gives you some more complexity with your transmission and these settings are specific to this character so it's something you'll have to play around with it. You can use these settings if you like!
Now hopping back into our Master, we're going to add a Scalar parameter for Subsurface Strength multiplied with our alpha channel that we packed into our Base Color, this will plug into our opacity.
Next we're going to add in our Spec Map! And we're going to split our Spec Parameter into Spec Contrast and Spec Power. We'll add in a Cheap Contrast node to combine our spec map with our Contrast Parameter this will then go into a Multiply node in A and B will be our Spec Power Parameter. Doing this allows us to have very granular control of our authored spec map and pump things up or bring things back if needed!
Now back in our Material Instances, all of these parameters are exposed and we can see how this is affecting our skin in real-time. These are the parameters I have used for this character but it's up to you to play around with how you want this to look. SS strength will control the strength of the scattering, Spec Power will control the strength of your spec and the contrast can crunch the spec to either over crank it or pull it back a little bit more.
Now it's time to add some controls and detail tiling to our Normal channel. This is the method I have used for all of my skin materials that I have built and this allows for some serious detailing without having to go back into sculpt or Substance to add very small granular chatter.
First we add in one last texture parameter this will be our detail normal. The map itself is just a micro wrinkle of skin that I purchased online, it is in the project and I recommend everyone use it! Next we're going to right click and add in two flatten normal nodes. These will flatten your Normals. Connect your Texture Parameter RGB into the normal slot of the flatten normal node.
Next add in a 1-minus and connect that to the flatten slot of the flatten normal. This will act as an inverse and instead of flattening it will strengthen your normals. After that we make two more scalar parameters for our Normal Strength and our Detail Normal Strength.
After that we'll add in a BlendAngleCorrectedNormals node we'll connect both of our Flatten Normal nodes into this node. Our baked normal will go into the Base Normal and our detail normal will go into the additional normal. This will connect into the normal slot of the shader.
One last thing for this step we're going to add a texturecoordinate node and plug that into a Multiply node in the A slot. The B slot will have another Scalar Parameter that we're going to call detail tiling. This will plug into the UV node of our Detail Normal Texture Parameter. Now we have a control for the tiling of our Micro Wrinkle.
(The scalar parameters here shouldn't have a max slider value since these can go past 100 for the value to make them smaller or bigger).
And now in our Instance we can see when we change these parameters it has an effect on our Normals. Keep in mind this does depend on the quality of your UVs and your topology if these have any issues you can run into some weirdness and sharp angles happening so clean UVs and topology is important to have. You can see that our detail tiling is too big and this is to show you an example of the tiling working. The rest of the parameters are how I have it actually set. I over cranked the baked normals to 2 to make the scales pop out, for humans and pore detail I would be more conservative on this. My detail normal strength is set to .5 to make the light break up just a tiny bit more apparent.
Here is my value for the tiling parameter. As you can see it is incredibly subtle detail but it adds so much complexity to the surface of the model.
And there you have it! That's how you build the skin shader in Unreal. Combining these techniques with our textures that we built inside Substance Painter allows us to get incredible complexity and detail. One key note that I did not go over in this guide is organizing your blue-print, for that I leave it up to you all on how you want to organize the graph I will give an example below of how I organized my earlier Master Material.
And here is how I have organized the material. Thank you for reading through this. I hope this helps you all with developing your own characters.
No comments:
Post a Comment