I Figured Out the Secret to Photorealistic Skin in Blender using Cycles Render

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] are you ready to join me on a skincredible see what I did there journey in blender and Cycles no oh okay just kidding we're already on it my brethren and this journey begins with a tale of wo and disappointment recently one of my favorite artists someone who I look up to whose tutorials helped me all through my schooling released a video of a character made in blender I was so excited I was like yes the master has arrived and the student is ready and then I realized their character skin looked like plastic never meet your Heroes am I right but it reinforced that making realistic skin is really hard especially in Cycles Render inside blender even for probes so that inspired me through a lot of struggle and experimentation and now I'm ready to share with you my secrets for making lifelike skin in blender 3D so let's map out our adventure and level up our work so by the end of this video you'll be able to create something like [Music] this our second stop is La Isla Dees where we'll set up our diffuse color and subsurface scattering this this is where a lot of people go wrong but I'll show you two simple tricks that'll fix everything down here here we descend into the realm of nightmares where the roughness lives not going to lie to you this is a bit complicated because of the way the nodes and blender work but I'll show you how to work through and problem solve using the new industry standard approach like this next we delve into the depths where we Face a battle of life and death with specularity and clear coat actually this is the easiest part and we'll have done all the work already sit on trip then here we have displacement you won't expect it but being serious this time this is the most treacherous leg of our journey so we're better to begin so we're here in the shading Tab and in the scene I've added my elf cleric head Ori as I like to call her since she is cranky and then I've set up a render camera and two lights in the scene if you need help with lighting I have two videos on Lighting in Maya with vray and all of the skills transfers so you can watch them here in the material tab of the object I've added a material this is just a standard principled bstf and then I've dragged and dropped my exr displacement Maps into the graph then we just need to make sure that these are set to linear Sometimes they come in as srgb since this is kind of an intermediate look Dev topic I'm assuming you already know what displacement is but in case you don't displacement is a process where a mesh is subdivided at render time to create new geometry that's displaced it's moved in and out from the original surface so to create more detail and this displacement is usually driven by a grayscale map in 16 or 32bit exr format so you can see this is my larger detail map here this is what it looks like displacement is really our bread and butter in film workflows to get really high detail and photorealistic results so you're probably wondering like why do you have two maps and why didn't you combine them into a single map in Mari or substance you lazy bum well there's actually a very important blender specific reason for that that we'll come back to now we have two ways that we can apply displacement to a mesh and blender either with a displacement modifier assigned to the mesh or through the Shader which gives us a few more options so we'll need to add a displacement node to accept the height value from our Maps we are going to shift a to bring up our contextual ad menu okay you can also go to the ad in the menu bar of this window down here under vector we're going to select displacement now we want to connect displacement to displacement going to set the mid value to zero because this project was originally an Arnold so as you can see the maps are mostly black that's how you can kind of tell where your mid value is if it's generally closer to like a mid gray your mid value is probably at 0.5 and now we're going to need some way to layer the map with the wrinkles and pores this guy over the map with the larger detail so normally in Maya I would use a math node for this but in blender the math nodes don't give us that much control so instead I'm going to use a mix node this way if we need to fine-tune the output we have easier options to do that so I'm going to set this to color and the mode I'm going to set to Overlay so why overlay overlay is similar to an add subtract function in other software so it's literally doing screen and multiply at the same time it's going to push the pores and wrinkles in by adding the darks and push out the raised areas in between by lightening the lights now we just need to go into the material and change the displacement settings to displacement now here there be monsters this is where we begin to run into some of our crippling issues in order to use our displacement we need to apply subdivisions to our mesh if we render right now we get a whole lot of nothing in other render engines when we use displacement the mesh gets dynamically subdivided at render time so the render will optimize how to divide the mesh areas with more detail get subdivided more areas with less get subdivided less so that way we don't end up with a lot of extra geometry that'll slow down our render but blender doesn't do that we need to go in and manually apply a subdivision modifier so we can do that here under the modifier tab tab add modifier we're going to go to subdivision surface now the subdivision modifier will divide the whole mesh evenly and obviously we have to set this pretty high to get enough detail so let's set this up to three we don't really need it in the viewport and we'll see what that's giving us you know and as you can see it's not it's not much it's very low quality very little displacement it's pretty bumpy and lumpy so let's try this again we'll go up to four okay okay a little bit better but notice here the displacement isn't actually changing the surface so two things will happen when we apply Color and subsurface all these wrinkles are going to look really harsh and Jagged instead of giving us like a smooth natural look and from working with this earlier we don't have the right subsurface look in the ears just doing it this way the other thing is that we're wasting resources when this is doing no more for us than really a bump or a normal map would do and we're we're really not even getting that much in here so we need a lot more resolution but wait this is where we run into our issue blender can only handle 21 to 24 million polygons at a time and that includes during render time boo so if you hit this limitation during your render blender will max out and brick your system you know a lot of times it doesn't even have the decency to crash your computer just like opens up and you get swallowed into purgatory this also happens in the viewport if if you put your subdivisions too high also in sculpt mode if you remesh too small but in those situations you're more likely to get a crash thankfully so what do we do about this obviously this isn't like a trash blender video and really there's never a time where you should be confronted with limitations and just throw your hands up and be like this sucks you know we're problem solvers that's who we are that's what we do so we're going to find a solution to this problem but how are we going to do that well we're going to use an optimization technique that's still used but not talked about as much it's kind of an older way of doing things so let's go back to our modifier tab here I want to add a displacement modifier lovely I'm going to move this to the top I want the subdivision to happen before the displacement and bring my mid value down to zero so next I need to go down to our texture tab I'm going to create a new texture and let's rename it then because my displacement maps are already in the scene I can select one from the drop down menu and we want this guy so this is our large detail map and we're going to go back to our modifier now that texture is applied here and you can see it's showing us that in the viewport so this is how things work in a lot of Productions because it's efficient on resources so you have your details that change the surface of the mesh like the main forms and deep wrinkles using displacement and then you have your micro details like pores you would layer on top with bump or normal mapping we're going a little more old school because we can only displace the largest details and everything else we we have to fake with a bump map so we combined our maps to have all of the information and we're layering that on top of the displacement to refine the look of it and then add more detail make sense so we can also do that with a normal map but bump gave me a better result in this case so that's why we're using the displacement modifier so we can use the displacement in the Shader for our bump because that's where it goes if we were using normal we would just use the displacement in the and the normal in the normal map input yeah and then we can play with this in the viewport let's turn up some of our subdivisions to see what we're getting so you see it's a little strong blender doesn't work so well with exrs it starts to break at some point so we're probably going to have to bring the strength down quite a bit Point 2 seems to be giving us a decent result another thing we can do I'm instead of local I'm going to use the UVS then I'm going to set the direction to normal and now when we visualize this this is what we get there we go we successfully navigated a death trap next on our fabulous three-hour tour we come to La is Dees now if you remember this is where I said most people go wrong I've seen a lot of chalky skin I've seen a lot of plasticky skin I haven't seen much waxy skin though so that tells me that something is off normally if your subsurface looks waxy or like a grape or a gummy bear you've probably set it up correctly and the default setting just pushed it too far so that's a good sign but I was still really struggling too and it wasn't until the documentation was updated with a key piece of information that it all clicked but that was only because I have experience with other shaders if you don't have that you just probably would never figure it out so it was like mind blown let me share my genius discoveries with you hi obviously we need some color so I've brought in our diffuse already this is in like an Asis linear format so it's going to be in linear color space if you're using srgb then just make sure that this is set to srgb now in some shaders this base color Channel works as like a multiplier of the subsurface effect so you'd have this set very close to White so nearly all of the light that reaches the surface enters the surface and that's what you want because in real life all of the light penetrates your skin so in these shaders we would plug the color into our subsurface color only and then it applies an inversion and does all the heavy lifting for you blender on the other hand works like vray where the subsurface is a blend of the surface diffuse and the subsurface color so we need to plug this into our diffuse Channel now we're also going to want to plug this into our subsurface color and we need to activate the subsurface so we can actually see it so this is our multiplier let's set this up to one and we can just do a quick little render in the viewport by setting this to render and we'll see what that gives us whoa let's bring that scale down a little bit we're going to need this pretty low so my character's head is at scale by the way and I'm going to set this to .008 seems really low but now you can see we're getting something more realistic I have to tell you though this value is arbitrary it isn't affected by the scene scale at all so you just have to fiddle with it there is lit no consistency you're just going to have to try it out I found that value is lower than like .1 going to work best when you're working at this size but it's going to be completely dependent on your mesh but wait this was a bait and switch remember earlier I said you usually want your multiplier set close to one so nearly all the light enters the mesh well this multiplier actually drives the subsurface radius but look at this little purple dot here the subsurface radius accepts a vector as indicated by the purple node input so we need to plug a value into here right wrong and this was one of my Revelations a lot of people put a value in here and that makes sense you would assume the scatter radius is like in every other Shader where it's a measurement of How deep the light goes into the surface based on the scene units so we we want this to be like. 2 to4 to give us 2 to 4 mm except that this Shader is based off of Disney's old Shader Model so this works more like render and Arnold this three value Vector isn't a real world measurement it's an abstraction of how deep each color Channel goes and its overall contribution to the subsurface effect so even though it's a numeric value it's not an actual numeric value it's an RGB value so we have two options we can get an RGB color node and plug that in here which is my preferred method because it's visual or we can adjust the values in the dropdown which you might not even know is here and just understand that the XYZ correlates to RGB and if we look at the value that's already in here the default it's set to 1.2.1 and that gives us this which isn't too bad let's see that at a Lar scale so it's definitely usable but the issue I'm having here is how artificial it is and very red like especially here on the lobe so let's add an RGB color node from the input menu so we can visualize this we're going to go to RGB set this guy to one going to set green to point 35 and blue to2 and this isn't me guessing this is the actual depth value that was developed by the digital human Project based on their research and this will give you the best result in something like Arnold so let's plug this guy in and see what that gives us the result in blender is really fleshy so now our look isn't overblown but I do think I want to get more pink in here on real people the thinnest areas tend to get this yellowy orange and the edges are a little more peachy Pink So a good middle ground that I like for that actually like 1.23 in the green and about .12 in the blue channel so that gives us a natural but not so exaggerated look in blender and you can play with these values for yourself so you always want your red at one and then you can go between 2 and 35 in the green channel to shift the amount of yellow as you can see it's moving between yellow and orange and then in the green we can go from like 0.1 to 2 and then in the blue we can go from .1 to 2 and that's shifting us more like orange to Pink fuchsia you know so here we could absolutely leave it with what we have but it's still a little exaggerated it's kind of what you get from like visual development artists um so it's better suited to animation you know and these values definitely work or more stylized work but what did we learn we can't achieve the perfect look with the depth color alone this is because there are two other factors that influence the look of the subsurface so I'm going to go back and set this to the standard depth so we're going to go back to 35 and 2 and then I'm going to run the subsurface color through an RGB curves correction node this will let me manipulate each Channel individually to saturate and adjust the values so I can bring this closer to the look of a subdermal map and get the kind of inversion effect we would get in another Shader and then I can run this through a gamma node and this will let me adjust the overall value while maintaining the relationships between the brightest and darkest Valu so it prevents it from getting washed out and then one last thing we need to do is set our anisotropy to8 so with these few tweaks we've gotten a much more realistic result we're getting our kind of orangey yellow in the very thin areas we're getting our pinky Peach as we're turning into the thicker areas of the skin and it's giving us a much more naturalistic look especially here in the L we're not getting that overblown pink or red in that area that gives us more of a stylized appearance and really that's it for subsurface I think this is a passible result and we have a nice kind of supple fleshiness to the skin but it's very flat so just like our displacement was achieved layers of subtle detail the same approach governs bringing life to the Skin So as we move into the last leg of our adventure if you want to know the final Secret Sauce to bringing our character to life you'll have to answer what does this character and a car have in com so here I have the whole roughness and specular setup completed because this is very tedious in blender but to understand why we need to know where we've been and where we're going in VFX for film so first thing roughness doesn't exist you might have heard me say this in another video in real life the roughness of a surface is determined by the amount of micro detail in that surface on a smooth surface most of the light bounces back towards where it came from on a rough surface the changes in the surface cause the light to bounce off in all different directions and creates more of a diffused highlight so in CG we're not at a place where our computers can create this much detail and we created a parameter of specular reflectivity and another for specular roughness to simulate the look of it in the past and really still in a lot of games we had to use very detailed maps to drive these values but now with the improved hardware and things like Vace and HD displacement we can let the displacement do most of the work like in real life so we're shifting to using High detail displacement maps and just region masks to apply broad roughness values to different areas of the face and that's what I'm doing here so I'm using color ID masks from Vace by texturing XYZ but you can make these masks yourself very easily in a texturing package so now we have these masks but what do we do with them this is where Theory becomes really important and being able to break things down into core steps so you can build it back up in another tool in Maya we would use something like a layer RGB node this let you split the three channels of the Mask assign a color value to them and then layer it over other values blender does have a node that can do a similar function but it's only available for compositing so we're stuck using the mix node but it has a huge limitation that we'll come back to so going back to the top we need to separate the three color channels to isolate each region of the Mask we can do this using a separate color node so here we'll plug our texture into this node it's going to separate each Channel The Next Step gets a little tricky we need to apply a value to this and layer it over our base so in our mix node let's visualize this your first instinct might be to plug this into one of the color channels but you can see when we do that we just get white in our exposed region this is what that actually is doing we can't assign it a value so we actually need to put this into the factor and use it as a mask now in the second Channel we set the value of the exposed area this channel B here the first one channel a is going to be our base color now comes another caveat we've separated our first mask assigned it a color and layered it on top of another color but wait we haven't actually layered it the mix node does not have a blend mode like normal or replace so we're stuck using mix which is really similar to average and that's the only mode that will mostly respect the values that we've put in here I like to add an RGB color node and then with the node I'm working on being viewed I can color pick the values as I adjust them in the mix node and that way I can you know make sure that they're what I want so at first as we continue this process for each Channel we would just set the values to be the same for all three no no and then we have to start merging them back into a single node so once all three are merged together we can view the last mix node in the chain and adjust the individual values back in their main node to get the right values here sadly this is the best workflow right now that I've tried you know and then we just repeat the process adjust the values down the chain use the mix factor and color pick to get the right balance of values and a lot of this is just Ingenuity and experimentation you know whenever we're faced with limitations in a tool we just need to dissect the workflow to its smallest parts and then see what tools we have to perform those function one step at a time and that actually brings us to the end of our journey like the next part is very simple we just need to add a specular lobe and tighten up the reflections around the pores then do one last thing after that so I need to invert our roughness using this invert color node so the reflections are tighter in the glossier areas and then I want to exclude the pores and wrinkles so I'm running the cavity mask which is in the blue channel of this map here into the factor of a mix node and then overlaying black and then that goes into our specular and we get this you can see we're getting a lot of variation in different areas of the skin some areas have tighter specularity we're also getting great breakup around the pores and this right here is basically finished but I want to give it a little extra oomph just for good measure so remember I said earlier the secret sauce was related to a car this is where that comes in our Shader has a clear coat option this is used for car paint usually where you have a glossy clear coat of paint on top of another but we can use it to give the effect of little beads of oil pooling on the surface of the skin it's going to be very subtle but it gives that little extra layer of realism so you want to take our specular map and this is going to become a mask for our clear coat so what I want to do is run it into a math node set to multiply and I want to reduce the intensity overall evenly so this is the best way to do that and then I've set this down to 0.1 and then we just plug in our clear coat make sure our I is set to 1.32 and then let's give it a render and see what we got so it's very subtle but you see we're getting this little extra bit of glisten in these highlight areas now that just give it a little bit of pop so that's our final result thanks for going on this perilous skincredible Journey with me into look deing realistic skin in blender and I hope you came away with some new tools approaches that you can apply in your own work I hope too that this has showed you how important it is to learn things from the ground up and not be too attached to a single tool or workflow so you can effectively problem solve in any situation I'm really big on software agnosticism because our field changes so rapidly as well as the tools and workflows so if you know the house and the wise of doing something you'll never get lost because you'll always know how to navigate your way to go so that's it for this video get out there be adventurous and make something cool [Music] bye
Info
Channel: VirtualBoy
Views: 14,543
Rating: undefined out of 5
Keywords: blender, blender guru, blender 3d, blender tutorial, blender tutorial for beginners, vfx breakdown, character modeling in blender, look development, lookdev, photorealistic graphics, photorealistic skin, blender character, 3d modeling, how to, vfx, 3d, cgi, film
Id: PyYkhsOID-c
Channel Id: undefined
Length: 32min 10sec (1930 seconds)
Published: Tue Sep 19 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.