From the course: Substance Painter 2018 Essential Training

Baking the maps for the project - Substance Painter Tutorial

From the course: Substance Painter 2018 Essential Training

Start my 1-month free trial

Baking the maps for the project

- [Instructor] In this video we're gonna take a look at baking some mesh maps. Now, this baking process can be done here directly inside of Substance Painter, and it's going to create a set of maps that we use throughout the texturing process. These maps are going to contain some data about our mesh that Painter uses in the generators and filters. So to get started, first, I wanna set up my UI, and it's going to be the UI that we use throughout the course. So here I'm gonna take my texture set list, and I'm gonna dock that all the way over here on the left-hand side. I'm gonna keep this open so that you're always aware of the texture set that I'm working on. Then I'm going to open up here my layers, and I'm going to break this off and dock this here on the right side of the UI. Finally, we'll come over here to our properties. And let's pull this off here, this view. And let's dock that underneath of the layers. So this is gonna be the setup that we use. Okay, so here I'm going to just navigate to this front hydraulics, and we're going to start with this texture set. Now, if we come over here to our texture set settings, you'll notice that we have this mesh maps category, and we have a list of maps here. Now, all of these are blank at this time because we haven't actually baked anything. And we can do that by clicking this bake mesh maps. So I'll click this button, and that's gonna open up the integrated baking dialog here. So like I said, again, these bakers are all integrated here within the UI. So over here on the left side, we can enable the bakers that we wanna use. In my case, I'm going to be working with World Space, ID, ambient occlusion, curvature, and position. So normal is off, and thickness is off. Now, we're not gonna be baking a normal map, which would be used if say, we created our project with a low poly mesh, and then we have a high res mesh, and we wanna bake normal data. We're not doing anything like that. We're essentially using like the high res meshes in our project here to begin with. So we don't need any normals. Thickness we don't need at all as well. So here, underneath the common parameters, I'm gonna set my output size. Again, I have this set to 2048 by 2048. And I'm gonna leave pretty much everything else here at default. Here in just a moment, we'll come back here to this section that you see here, which is listed as high definition meshes. We'll come back to this in a second. Now, for these bakers, let's say, if we click World Space, well, we don't have any parameters for that. If we come over here to say, ambient occlusion, well, we have some specific parameters for the ambient occlusion. In my case, I'm gonna leave everything at default so we don't have to worry about it. Same thing here with curvature and position. However, let's come over here to this ID bake. Now, this is going to be something very specific that we're gonna work with here throughout this course. Now, and ID is basically going to represent a material, and it's going to represent it through a texture map. So we would call this an ID map. And we can bake that here directly in Substance Painter. So what I wanna do here for this ID, is I wanna make sure that this color source is set to material. You may have it listed as vertex color by default, but we wanna make sure material color is what we're using. Now, since we're using material color, this color generator doesn't come into play. Now, the material color is coming from the material color that is set on the material inside of your 3D program. And I've set this up in Maya. So in a moment, we'll flip over to Maya, and I'll show you exactly how that's set up. So we also have the ability to set this per texture set. So for example, I could choose a different texture set in this dropdown, and then have the color source be something else like maybe it is vertex color. But in my case, I would like to have material color, this color source, be applied to all the texture sets. So with that done, I can just click this apply to all button. Now, I've already done this. Let's say it was vertex color, you can see, applied all. Now, all the texture sets are gonna use vertex color. In my case, like I said, I want this set to material color, so we'll hit apply to all. Okay, so now we have our ID setup. And again, if we come over to our common parameter, we want to now take a look at this little section here called high definition meshes. Now, the name can be a little confusing, because like I said, well, we're not using a high def mesh because we're not going to bake a normal map. However, as you can see here, I do have a mesh loaded. So what we're gonna do is click this little page button. And if you navigate over to the exercise files, meshes directory, you're going to select this generic front loader ID FBX. This is what I have listed in here. Now, this mesh is the exact same mesh as what we loaded or created our project from. The only difference is it has additional materials applied to it, which I'm going to use to bake those colors in the materials to a map, which again, is our ID map. So to give you an idea of what I'm talking about here, let's jump over to Maya. Okay, so here we are in Maya. And you can see, this is the same file that I have, and here I have a group. This is my main group. And if I expand this, you can see it's made up of a bunch of mesh parts that I have named. A little bit more on that in a moment. And here we also have the materials. And in a previous video, I told you that for each one of these materials, once these are applied to a mesh part, and we import that into Painter, it becomes a texture set. So there can be situations. Like for example, let's come over here and look at this part. So I know that this part, which I named for the mesh, Arm Pistons, Base, this represents that front hydraulics texture set that we have selected back in Painter. And so, that's one single texture set or one material. However, if we look at this for a texturing process, if I look, well, I have this piston. Maybe this part I want to be a metal. Maybe this is going to be like a painted metal. Maybe this hose that we see here represents some type of rubber material, and so on. So I may, within this single texture set or material, I may want to actually have multiple materials represented within that. Now, what I can do in Painter is we'll hand mask all of that, or I could use an ID map to help me quickly mask, or make selections to where I would like to place materials within a single texture set, which is what I'm showing here with this front hydraulics. So like I said, that's where our ID map comes in to play. So what I did was I took the mesh. Again, like I said, this is the one we built our painter project from. So we just duplicated it. So let's just hide this guy. And now let's look at the duplicated version, which I'm calling ID. So when you look at it, this guy here just has a bunch of extra materials that I just set with wild colors. The coloring scheme doesn't matter at all. It could be anything that you want. It's just these colors. Again, remember, we're gonna bake these colors to a map. They just need to represent whatever you want a particular material to be. And you'll see this come in to play later in the course when we actually use the colored selection masking tool to create our mask. And what I wanna bring you attention to is this section. So here I have this red color. This is an ID. And we're gonna use this ID to represent a different material within this single texture set that we have here. Remember, this is the front hydraulics texture set we're talking about. So that's why I have this red. Here I have this green. And again, we're gonna be able to quickly mask or apply materials to these sections of the mesh just using these IDs. So once I had this set up, what I did was I just selected this mesh and exported that as that ID. So now, let's jump back over to Painter. So here we are in Painter, and here is that ID FBX that I've loaded into here. So now, we can go through the process of baking our maps. Let me scroll down and make sure here that I have everything set to default. So for now, for this high poly mesh suffix and low poly mesh suffix, you should see this is underscore high and low. We're gonna change this here in just a moment. But for now, what we wanna do is you're gonna leave match always. Just make sure that pretty much everything is at default. So now that we have this set, let's just go ahead and bake all of these. Now I can batch process this. Remember, I was on front hydraulics when I opened up this baking. So I can choose to bake just the front hydraulic texture set mesh maps, or I could bake all texture sets. So let's just do the whole thing in one go. So we're gonna click bake all texture sets. Alright, so now Substance Painter is baking away, and it's giving me this dialog. And as it bakes it's going to start to apply these maps here to the appropriate input slot here for the mesh map per texture set. And once it does that, you'll also notice that the shader starts to use some of these maps, specifically ambient occlusion. So once we have an ambient occlusion mesh map, you'll start to see ambient occlusion appear here in the view port. Okay, so here Painter has finished the baking process. And again, we're on this front hydraulics texture set. You can see that for the mesh maps, Painter's added or placed each one of these maps into it's appropriate input slot. So now we have things like our World Space, and ID, and ambient occlusion ready to go. And like I said, we're also gonna see a little change in the view port, because now we're starting to see ambient occlusion because we have ambient occlusion data here in our mesh map. So for example, if I jump over here to my shader settings, you can see that I have underneath common parameters, AO Intensity. So now I can actually drive this value. So if I wanted to increase this all the way to one, I could see more AO. So here in this case, I'm just gonna set it to 0.9. Alright, so we'll close this guy out. Let's come back here to our texture set settings. And here in the top of the UI, I'm going to click this dropdown, and you can see, well, right now we're in material mode. And if I scroll down here in this list, I can now see the mesh maps. So for example, if we come over here to ambient occlusion, we can see that ambient occlusion here directly in the view port. Alright, so let me zoom in here. And one of the things I wanna bring your attention to is some of these projection artifacts that we're getting here. So for example, you can see that, well, we have this hose here. Well, let's do this. Let's come over to our texture set, and let me solo this hydraulics here. So within this single material, okay, the single texture set, we have all these mesh parts here. Now, if we scroll in here, you can see things like because this mesh part here is close to this piece, we're getting this kind of projection error here. So in the next video, I'm gonna show you how we can actually fix these types of issues. Now we can just switch this from ambient occlusion. Let's just look at one more. Let's look at our ID map. Again, here we can see that projection issue that we're getting where our green ID is being projected over here onto this kind of neighboring polygon. And that's because these two pieces are very close together. And like I said, we're gonna fix this in the next lesson.

Contents