Renderman 23 PBR Textures Tutorial

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello michael here from small robot studio with another renderman tutorial today we're going to be having a look at how to assign pbr textures to your objects now ppi textures are made up of physically based rendering layers to make your objects look more realistic with specific maps designed for specularity diffuse also known as albedo and normal maps and displacement so i'm going to go over a couple of common situations that you might come into when you're trying to set up your shaders and hey make sure you're subscribed with notifications on otherwise you may be missing out on the many tutorials that we're releasing for free each week here on youtube so i've just got a very simple ball here and what we're going to do is we're going to assign a pixar surface shader to it with it selected and then we're going to go into the hypershade editor we'll select our shader and map it out here in the hypershade and then we're going to start bringing in our textures so to do that we need a pxr texture node which tab type that in in your search and find it i'm going to go to the open button here and we will look for our textures and it's always best to be keeping your textures and things inside the project folder which you should already have created for your scene now i'm going to import a few different ones here we'll start with the diffuse which is for this metal plate texture i've got it off at texturehaven.com which is a great website you should consider supporting them on patreon so the first thing our diffuse i'm just going to select that node and open it up with three and then we're going to run the result rgb into the diffuse color then i can shrink this back down by selecting and hitting two i'm going to create another pxr texture node and we're going to open the specular face color which will here be known as specular or just spec we'll run the specular into the specular face color and then again we can actually just ctrl d on there and that will create a new pxr texture node but we'll have to change its target file to be now the roughness and the roughness is referring to the specular roughness not the diffuse roughness which you may have been confused about so we'll run that specular roughness into our specular roughness but you'll notice that we can't because roughness is expecting a value between 0 and 1 and if you look at the preview of our map here you'll see it's black and white so black is means the value of 0 y means a value of 1 value of 1 means rough in this case so we'll run that into the specular roughness using a result rgb r output because this is only a black and white file using one of the three rgb outputs is fine because they're all the same output even if we use the g or the b next we'll grab a bump which we can use with the pxr bump and this map that i've got here actually comes with two different types of bump we have a normal map and a bump map i'll show you the bump map first and then we'll compare it to the normal map and again you'll notice that the bump map is also a black and white file the values of 1 mean a higher bump and the values of zero mean no bump so we're just going to run the result in into the pump normal and that's pretty much everything you need to get started there so we'll hit ipr and you'll get something that looks like this that's not very good we need to assign a subdivision scheme to it so go into its attributes and go to camel clark and then we are going to also prevent polygon cracking and this will smooth it out and when we assign displacements to it in a second it'll also prevent it from cracking so you'll see i've got all the materials assigned here but we have some erroneous things happening if you look at the treads they are actually going inward and that's because our bump is inverted so depending on what software was used to create these maps sometimes the values are inverted on particular axes we can fix that quite easily though now a number of things may be causing this it could be a matter of inverting the t it could be a matter of reversing the normal but for this particular one it's the atlas style so we need to change that atlas style to a uv tile base zero and you'll see now that the bumps are protruding outward the thing with bump maps is they're not actual physical displacement of the surface so they look decent from a distance to apply a little bit of extra realism to background textures but they don't actually affect the physical light balances as realistically as you would expect from a normal map or a displacement map so why don't we change that bump map into the normal map this is the same thing we want to run the normal into the bump normal and then we're going to open the normal map and you'll see the normal map comes with a bunch of colors on it those colors are indicative of the vector in which the light is going to bounce off the surface so again our map appears to be inverted those treads are actually meant to be popping outward so we could invert the bump and that will fix that up so if we compare this normal map to our bump map you'll see that while this does appear to be bumped here when you're facing straight on it doesn't actually give a very realistic impression of a bump whereas because the normal is able to bounce the light away on a specific vector depending on where it hits the surface you're getting a much more realistic result though again this is not physical displacement of the surface you'll see on the silhouette there's actually no bump it's still a perfect sphere to get physical displacement we actually need to add in a displacement so i'm just going to hit tab and type in displace and we'll get a pxi displace and we want to run this out color from the displace into our out displacement shader which is already connected to our pixar surface so we can get rid of that shading group and we just need this shading group and then we need to grab the map so we're going to go pxr texture and we'll grab our displacement map now the interesting thing about this map that i noticed and this is worth noting just in case you run into a similar thing it's completely grayscale and is actually not a displacement map you'll see it's displaced everything evenly however it's not actually displaced anything differently from another we still have a even surface around the edge all it has done is made it bigger and that's because it's displacing everything by a value of 0.5 and we're using scalar rather than vector because i would have assumed that this map should have a vector displacement but it doesn't so what you need to look out for here is if for some reason your map doesn't work but you did actually get a bump import you could use that instead with your scalar input now if you do have a displacement map and it appears colorful that means you have a vector displacement and you can plug the rgb into the vector displacement but because we're only using values between 0 and 1 to use the scalar which is just displacing the surface upward and downward so on one axis we're just going to use the single output from the rgbr into the scalar and then when we render this now you'll see that we get this incredibly displaced surface so now it is just a matter of adjusting our gain and because we're using that same bump map from before you'll also notice that the surface is bumped inverted so another way that we can fix this because on this particular one changing the atlas style won't work we need to use a pxr invert and what that will do is if we just run the rgb into that and then use this rgbr out into the displacement scalar and run the ipr it will invert all those values so values that are zero will be one values that are one will be zero and then that way we get the bumps on the treads that you'd expect this way it's just a matter of deciding how much bumps you need or displacement you need and there we go so just changing the gain down to 0.025 has given me a fairly decent result it is quite bumpy we can use things like thresholds and whatnot too okay there is one final map that i've yet to mention and that is ambient occlusion or also known as ao amin occlusion isn't really used for pbr in offline renderers like renderman you can still use it if you wish this would be an artistic direction choice and not a necessity because all ambient occlusion really is a secondary ray balance is being simulated in a texture rather than in geometry space so what we can do though if you do want to use it is the same thing we'll grab a pxr texture and we'll open the ambient occlusion for this one and to use it with your shadow what you want to do is multiply it with your diffuse color so we can just use a pxr blend for this and we'll run the rgb out from the diffuse into the top rgb and then the rgb out from the albedo from the ambient occlusion into the bottom rgb then that out can just go into the diffuse color we also need to make sure that we have the blend set to multiply so for reference this is without the ambient occlusion if we render the ambient occlusion this is with the ambient occlusion so if you switch between the two not a huge difference you'll see a value shift that's up because ambient occlusion has a lot of dark areas which means to simulate occluded shadow in sort of tight spaces so if you're trying to maybe get a little bit more detail out of your texture map where you might have some cracks and things like that and you want to show that up a bit more you may want to use your ambient occlusion you could also blend it out using the alpha now one other type of map that you may run into when you're trying to assign pbr materials is a metalness map now renderman picks a surface it's not really set up to easily handle these but you can still use them for this example i've just generated these maps using 3d coat and this is obviously a metal style texture so i've exported this as both a specular pbr and as a metal noise pbr and i'll show you how i set them up so on the left i'm going to use specular face color rather than metalness and on the right i'm going to use the metalness so you'll see i've already set up the maps for the left-hand one i've added an hdri so it's a little bit easier to see these because they're quite dark obviously with a metal material so what i'll do here is i'll open up the three maps that i'm using which is the diffuse the roughness and the specular face color in photoshop okay so this first one here is the specular face color and if we look at our metalness maps we have got the same maps we've got an albedo which is the same as your diffuse you've got metalness and you've got roughness so we'll open the metalness you'll see the metalness just consists of a black and white layout now all this is is a mask so we can actually use this as a mask to mask off the areas for the object that are metal now this entire object is metal in this case but you might have some areas of your mesh that are only partly metal or have some amount of metal to them so you will have a similar looking mask and i'll show you how to hook that up in a moment but we'll just compare the rest of the maps first next we have the metalness albedo and if you switch over to the specular face color you'll notice that they are the exact same map so that gives us an indication that we'd actually be able to run this into our specular face color and have it work we have the metalness roughness and if we look at the roughness map that we have from the specular workflow you'll see it's also the same the only map that we don't have is the diffuse map so if we look at our diffuse map we'll notice is that it is completely black so essentially any area that is black should appear metal now in this model again the entire thing is made of metal so understanding all that we'll assign a new pixar surface to our right hand ball and we'll bring in those maps so we know that our albedo map is the same as our specular face color map so instead of using that as our diffusion port we're going to use that as our specular face color input we know that our roughness is the same on both so we'll create another pxr texture for that and just plug that into the roughness the exact same way and finally our diffuse color is the last thing left and we know that looking at our diffuse color it is just black so in this case we can just set the whole thing to be black now finally we need to get the metalness and we know this is essentially going to work as an alpha so what we can do to define the areas that are getting metalness is we can actually multiply it by our specular face color so if we use a pxr blend we'll run the top rgb into that we'll run the bottom rgb into that and then we'll run the result rgb into the specular face color and then the last thing we need to do is set our operation to multiply now the reason this will work is because our map will look at any areas that aren't metal the black areas set them to zero so when you multiply a number by zero obviously becomes zero the metalness areas are white so when they're multiplied by one the map will stay the same so if it has a value of 0.5 times one it's still going to be a value of 0.5 so you'll see now that when they're rendered up they render up the exact same way so now that you understand how the metalness map works let's have a look at how it would work if we actually had a mixture of metal and say a plastic style or diffused material so i've just added a orange diffused shader to the top of this ball in 3d code and we'll assign those maps now but first we'll just have a quick look so the first thing you'll notice is that the about albedo map that we created for the metalness which should be the same as our albedo here has the orange on it however this area we would actually want it to be black because it's going to be the area that's actually all metal and you'll notice that the middleness map has got middleness assigned to the area that we that we want it to be metal which is the areas that are not orange so what that means is that this part of the setup is going to be the exact same we're just going to get the albedo and multiply it by the metalness using a pixar blend and send it into the specular face color now i'll set this up separately so it's a little bit clearer so i'm just going to grab two pixar textures again and i'm going to open up the metalness and the albedo and then we're going to run this into a pixel blend just using the rgb top and bottom and then run that result rgb into our diffuse color make sure you set your blend to multiply and if we render here we'll see the problem so our middleness map is actually doing the opposite of what we want it to do so to fix this we've got our middleness here what we can do is just set up an invert which is a pxr invert node and we'll run that into the input rgb and then the result rgb into the position that it was previously so now you'll see that we get the expected result now because you have this mask so if you wanted to add any differences to this part of the map for instance another amount you wanted it to be specular rather than diffuse now i only expect export it is diffused however i could still make it specular by running this invert rgb into rough specular face color which will give us an extra input for specular i could reduce the roughness there and run the ipr and to show this a little bit better i've just increased the roughness and what we get here is a rough specular painted top just by using that map there so understanding how these middleness maps work will allow you to add all these extra masks and control your materials inside of maya or whichever dcc you're using for renderman a lot easier so this hopefully it should explain it for any of you out there looking to use metalness maps as well as all your other standard maps as well that's it for this tutorial if you found it useful make sure you leave a like so other people can find it and if you haven't already make sure you subscribe as we're bringing out cg and illustration tutorials every week just like this one become a patron and access tutorial assets bonus content a private discord and more by clicking the link below
Info
Channel: Small Robot Studio
Views: 2,299
Rating: undefined out of 5
Keywords:
Id: 62jGSymxd44
Channel Id: undefined
Length: 15min 42sec (942 seconds)
Published: Thu Jan 14 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.