Tuesday, November 26, 2024

Texturing Guide For Characters Part 2 (Skin Material Unreal)

 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. 






























Monday, November 25, 2024

Week 14 Rendering and Tweaking

 


For this week I'm on the stages of closing out the project. I decided to make some fun color variations for the character, as well as having him in a cute pose! I have tweaked the images and decided to add in some water marks for professional presentation! 


Currently I'm working on a guide to help make skin materials in Substance and Unreal so everyone can have access to it!



Here's a nice shot of the backside of the character models.


My UV layouts for the Character.


And the wireframe of the Character!




And the perforce submission.


Texturing Guide for Characters Part 1 (Skin)

Texturing guide for characters (Skin)

Hello everyone welcome to my blog post on texturing basics for characters. For this guide we're going to be going through my Baby Turtle Character Project and showing you how I textured the little guy. We're going to cover Substance Painter and Unreal Engine. Keep in mind this is more of a hero asset/character workflow so we're going to try and maximize quality as much as possible while still staying within reasonable constraints. This guide is also assuming you have a bake set up already and ready to dive straight into painting.



        Substance Painter (Skin Material)

The first step I always like to tackle for a character is the skin. Skin is an incredibly complex thing to make believable and there's multiple ways to achieve a good look, this is my approach that I learned through J Hill and his videos on texturing humans. Skin itself has multiple layers and is by nature imperfect. The goal is to layer those imperfections so much that it feels like there's real depth happening. If you take a look at RBX imagery of people you can see all of these tiny details and imperfections; things that you would never take into consideration on a day to day basis when observing people. I believe in trying to replicate that in Substance Painter, and while initially I was hesitant that this could work on the Baby Turtle, it actually gave me the results I was looking for. 


So Step 1 establish a Subdermis.



Here I establish a base blood layer with a basic roughness of around .6 to .8, the hue of the red and roughness depend per character but these are the values that I used.


Step 2 Add in dark spotches and noise with Fill layers and Masking.


We add in a fill layer of a darker hue of red, once we do that we then add in a black mask, within the black mask we then add in a fill layer.



Pictured above you can see the fill added into the mask and then a 3D perlin Noise fractal thrown in. You can find most of the fills and alphas directly in Substance Painter. Once these are added in it's up to you as an artist on how you want these noise patterns tiled and scaled on the model. My goal is to add granular detail and have it build upwards. You can see multiple added layers in the black mask and these all combine to make something very complex while staying non destructive. There is a paint layer for veins but that is more of a personal touch and definitely can be a case by case basis. 



Here is how all of those layers look once revealed. Tons of detail that is quick and non destructive. I put a levels adjustment last in the black mask to make things contrast just a little bit more. Do note that some of these fills have screen blend and Sadd on them, I typically use screen because it allows for details underneath to peek through with the layer on top mixing with each other. This is another thing that is at the artists discretion for tweaking and adjustment.



Next I add in a purple layer around the eyes, for human characters this can go into more detail, you can add this around the cheeks and the chin and even more parts of the body where the skin would be thinner and less fatty. For this guy because he's so young and also more of a fantastical character I went very light on this. 


SIDE NOTE!! 

Please use folders to your advantage, you can see that I have a subdermis folder for anything that is subdermis. It keeps everything organized and you won't have someone breathing down your neck trying to figure out how to work with your file. Plus with the folder system you can do some really interesting global changes and use some cool masking techniques along with it. This folder structure I adopted easily allowed me to do color variations for this character.



And finally we add some skin color for the character. This part is extremely important and really sells the look of any character. As you can see I add in a fill layer and then a black mask, and then you can see a paint layer within the mask. This way of adding layers instead of just adding a simple paint layer helps to keep things non destructive and easily adjustable. Note I never paint on the mask itself I always add in a fill or paint layer. I think it makes everything simple and you're technically just revealing and hiding layer info without actually committing to it. 

Another note for skin I believe in using hand painted details and human error to sell a more realistic look. I paint on my skin color with maybe a dirt 3 brush or cotton brush and purposely I don't try and fill in every gap perfectly. Skin is uneven and has tons of blemishes so this is a way of combining procedural details from fills in the subdermis and having some human error in the dermis.




So typically I only have one paint layer of skin for a human character, since this isn't a human I ended up having three layers building a light layer and a dark layer. It's up to the artist on what colors they want to use I experimented with these and ended up getting something I really liked. I placed lighter parts on the front of the body and darker values on the backside/where scales are more prevalent. I also used a more speckled brush like the Dirt brushes.




This is a fun technique to add in as well for the skin. This one is specific for this character that has large scales with deep cavities in between them. We do another fill layer with a light color and then add a black mask. This black mask will then have a curvature generator. I end up turning off all the sliders minus the sharpness and the brightness slider. It happened to give me exactly what I want which is a nice contrast in all that sculpt detail. Up to artist discretion on how they want to play around with the sliders.


The next step is adding in sun damage. Now typically with humans there is tons of sun damage that typically is hard to see with the naked eye but again with some RBX Imagery you can see those imperfections. Using the same techniques from building up noise in the Subdermis we can use it for sun damage. Use a color that is darker than your skin values and even possibly a temp change but it's up to you! Above you can see it without the Sun damage.


Here it is with the sun damage. As you can see it's very subtle but it adds this nice break up that makes the skin much more uneven. You can see the different use of blend modes and the different values in the layer opacity.



Here I added in a copy of the redness layer duplicated to the top of the layer stack for the dermis but with everything turned off except for the veins. Again extremely subtle and this just is to help some more sub dermis detail pop through. You can see in the stack a lip folder this is mainly just to brighten the lips up but I found that it didn't help too much with this character. But for regular humans it is beneficial to separate the lips out since they can have their own color and specular values.



This next step is more of a personal preference of mine and not needed for every case but I like to add specular for skin because it can improve things dramatically, typically you can get away with just a .4 or .35 setting for specular in Unreal. But authoring a custom spec map can make things look awesome. We gotta add in a specular level channel manually for the shader, you can access this in the texture set settings our viewport is currently looking at my specular level for the skin. When we export we're going to change our export setting template which will be explained later in the guide!




Here I have a Spec folder, and I have a base Spec level of .4. This typically is a spec you can apply on most objects so it's nice to have it as a good base line.




Here we're adding in some noise for the spec, the same techniques I did with the subdermis and the sun damage I applied to this noise layer. It is very hard to see in the viewport but the detail is there if you look close enough. Once we take this into engine and have the material built you'll see tons of nice light break up. The spec level for this layer is .5 so some noise with some more spec overlayed on the base spec of .4




Lastly I added another fill that is for cavities using a curvature generator. The value for this fill layers spec level is 0 so zero spec in these cavities. These details will be hard to see in the viewport in substance but in engine once our map is plugged in you'll see the change.



And now it's time to add in some roughness values. I start out with a base roughness fill layer that is set to .6.


Next I add in another fill layer with .3 roughness I add in a black mask and have 3 paint layers stacked up in the black mask. Here I set the viewport to roughness to help me visualize what I painted. I used a noisy brush to paint things in so they can paint in unevenly.


SIDE NOTE!!!!

While working on this stuff I am back and forth between Painter and Unreal Engine constantly. This helps me get a consistent look and actually helps me see properly with what I'm editing. The viewport in substance doesn't quite match what Unreal renders out so it's imperative that you establish your pipeline and move back and forth constantly between your engine and painter. 


For game characters you typically don't have any sort of cavity maps, so true darks and shadow maps can be pretty low res in engine. For things like nostrils I end up adding in a fill layer with complete black full roughness and zeroed spec to add in a shadow for the nostrils. I then end up adding a black mask and paint layer to paint in the nostrils. The opacity is set to around 70 so it's not just deep black spots on his face. I end up having what looks like shadows in his nostrils but in reality it's just some paint! I also have an opacity map for scattering but I'm having issues getting it working properly so for this tutorial we won't cover it. We will cover some scattering in Unreal for Part 2!




For my export settings I duplicated the basic PBR export and the Unreal 4 Packed Export settings and customized them, I put my initials on them so I can identify what they are. For the PBR I use this if I'm exporting for Marmoset, but I add in a spec level map so I can have it for my Unreal Project. Just duplicate a map clear the channels and then add a grey channel with Spec Level in it. Make sure to change the naming convention to Spec Level. But besides getting this map I export using my custom Unreal Maps export settings. These are the exact same as the preset but with an added alpha channel in the base color, for scattering! 



And as you can see with all of these layers built up on the skin it comes to a result that looks believable! If you use these techniques you can build up some really nice skin textures for any character. It's all about layering. These techniques helped me so much so that I used very similar techniques with the apparel of this character and it also came out to something that I am very happy with. Part 2 Should be out soon and in that part we'll be talking about setting up a skin material in Unreal Engine and amplifying all the work we did in Substance Painter.




Monday, November 18, 2024

Week 13 First Texture Pass





For this week I have officially started the texture pass phase. In this phase after finishing retopology and UVs I'm fully immersed in Substance Painter getting everything together to finish out the Baby.


As you can see I am currently in the process of finishing the texture pass so some of the items have currently not gone through a color phase, the bakes are in place however.



Here is an up close shot of the character, each object took some time to create in substance painter with multiple layers working together to create a cohesive look. Make no mistake each pass took about two hours to get a good lookdev result. And they aren't done. Each however does utilize some powerful techniques in Unreal to make them look a bit more believable.



Here is the wireframe shot in Maya for the Baby Turtle. After some fine tuning from last week he officially sits at 54k tris. With three different material slots. One for Skin, the second for Apparel, and the third for his eyes.


Here is the UV for the body.


Here is the UV for the Apparel and accessories.



And here is the UV for the eyes.



And here is a color pass in Substance Painter, you may notice that the eyes are different. After some iteration I decided to redo the eyes and effectively use the Unreal Eye material since it's so versatile and high quality that I feel it will greatly enhance the project.




And here is the perforce submission.



Lighting Module 1