Learn about baking and the main parameter settings.
- [Instructor] In this video, we're going to do an overview of how the Substance Painter bakers work. So within Painter, we have an integrated baking system, and so here that baking system is going to be found within the TextureSet Settings, and you'll notice that here we have this Bake textures option. Now as we have mentioned in previous videos here we have our TextureSet List, which again is going to relate back to our material IDs assigned on the mesh. And for each one of these texturesets, we're going to have a dedicated layers stack as well as textureset settings, which means we can bake textures based on each one of these texturesets.
So we can do them individually or we can set this up to bake all texturesets at the same time. So, let's take a look at how this works. So here, we're going to start at the top. We have the base textureset selected, and I'm going to come over to my TextureSet Settings, and I'm going to click the Bake textures button, and this opens up the Baking dialog. So here on the left, we have what is referred to as the Additional maps and you'll notice here that these additional maps also have a section here within the TextureSet Settings.
So here we have Additional maps, and we have all these input slots, which are empty because, well, we haven't baked any maps yet. And so, here underneath these Additional maps, we have options for enabling which maps we want to bake. So, here I could choose None, and then I could choose All, or I could choose None and choose just specific maps, like for example, maybe I just want to bake Normal and Ambient occlusion. In this case, I'm just going to leave everything enabled. Now, we have this Common tab here, so if I select this, it's going to automatically adjust the view here so that we see just the common parameters.
And these are going to be the common baked parameters that all of the bakers are going to use. So for example, we can set a global size for each one of these bakes. In my case, I would want to set this to 2K resolution. And then below that, we have the ability to set the Dilation width and Apply Diffusion. Now, this is just referring to the amount of bleed that the texture's going to get outside of that UV shell, and you would want to have this Apply Diffusion checked because if the texture is then mipped, you will not get a seam again because it bleeds that texture all the way outside the UV shell, all the way to the border of the texture itself.
And so again, that just eliminates any seams if the texture is mipped. Next, we have our High poly parameters, and this is where we add the high definition mesh for all of these bakes that are going to utilize that. So, here let's add a high definition mesh. I'm going to click this folder button here, and I'm just going to navigate to the Exercise Files, meshes folder, and I'm going to choose this tracer_high.fbx. So, we'll click Open, and that just simply adds the high definition mesh, and below that, we have the ability to use a cage file.
So, if you have prepared a cage file as a separate mesh, you can enable that and then here, you can browse for that cage. Now in my case, I'm not going to use that. So I'm just going to disable that. So if you're not using a cage mesh, you're going to need to set this Max Frontal and Rear Distance settings. And we'll talk about that more in depth here just in a bit. We also have the option to set this to be Relative to Bounding Box, and you'll notice as I mouse over these options, down below in this area, you're going to start to see just a hint of what this is talking about.
So in this case, it's saying that this is interpret the max distances as a factor of the mesh bounding box. This is very good to have enabled so that the mesh scale does not really come into play here. And then we have things like Average Normals, again, we'll talk about that in detail in just a moment, as well as Ignore Backface. Here, we have another option that again, we'll have to come back to in a separate video, which is Match. Finally, here for the texture we have the ability to set an antialiasing level, which is something that we'll want to do. So, if we click this dropdown we have three options.
So we have 2x2, all the way up to 8x8. And the option that you choose really comes down to a balance of quality versus how long the texture takes to bake. So, in my case I usually just keep this right in the middle. And then finally, we have this High poly mesh suffix and Low poly mesh suffix. Now, again, we'll talk about this in a later video because this relates to this Match by name option. So, these are kind of a quick rundown of these common parameters that are going to be utilized for all of the bakers.
Now, some of the bakers are going to have their own specific parameters as well. So for example, if I click the Normal baker, you can see that the viewport then scrolls to match this Normal baker parameter, and whelp, there's no parameters here. And that's because, here I'll click the Common button here to get back to my common parameters, that's because the information that you need to bake the normal, which in our case is going to be this Max Frontal and Rear Distance setting, this is set on the common parameters, so there's nothing specific with the normal map itself.
Now, some other options, like for instance, if we come over here to this ID baker, you can see that this does have some specific baker parameters. For instance, its Color Source and Color Generator option, and so on. Same thing here with our Ambient occlusion, if I select this, here you can see that there's very specific baker parameter settings for Ambient occlusion, such as the Occluder Distance Min and Max, as well as Secondary rays and Spread Angle, and so on. Here with Curvature, we also have a few options as well. So, again, we'll cover these in the next video. But for now, you just need to understand that some of these bakers are going to have specific options and then there's a set of common parameters that, again, are common to all of the baker settings.
So, here I want to go back and talk about some of the specific baking options, like we have here for this Max Frontal and Rear Distance settings. So, when you set up a bake, you're going to need to tell Substance Painter the distance that the ray is going to need to travel when it's actually going to compute this high definition to low definition mesh. And, if you're not using a cage file, we can do that with this Max Frontal and Rear Distance. So, here you can see this Max Frontal Distance, and if I just move this window a little bit here out of the way, you can see that it has this value of .01.
This is just what I'm using for this particular project. And what this setting does is it allows you to create a virtual envelope from where the rays are shot from. So if you are using a cage mesh, that cage mesh would be the envelope that's used. But, since we don't have a cage mesh or we're not using one, that's why we need to create this virtual envelope. And if we look at this diagram here, you can see this dotted, dashed box here. This is going to represent this frontal distance setting here. Now, the white box that you see, this square white box, this is going to be our low-res mesh and then we have this green line here, which is going to represent our high-resolution mesh.
And you can see again, we have this frontal distance and this purple arrow lines, these represent the rays that are shot. And again, these are going to be shot here from this frontal distance setting that we have chosen. Now, starting from the low-res mesh, this is going to be this white box line here, the distance is computed based on the setting and the direction given by the averaged normal. So, here we have another setting that's called Average Normals, and that's enabled by default.
And so, what that's going to do is, it's basically like if you have a mesh and you just have a complete smoothing group over top of that, it's basically going to do the same thing. So here, let me just scroll down to this section here where we have average normals. So, if Average Normals is disabled, the mesh normal is used. So that's what I was talking about, like if your mesh has a smoothing group, then that's what would be used. But, if you don't have a smoothing group on your mesh, and it's a really hard edge, what can happen is that this can result in missing information or gaps in the calculation.
And we can see that here in this diagram. So, let's say that again this white kind of box line here, this is our low-res mesh, and it's very hard edged right here and here, and so on. And, this right here has no average normals, and so out here we have our dotted line here, which represents that frontal distance, that envelope, and if we take a look at the mesh normals here, you can see that from this hard edge, they're going to shoot this way and they're going to shoot this way, but now in this whole area we're going to have this missing gap in the information.
So, this is going to probably show up as kind of like a black area on our normal map or it's just going to be completely missing information. And so that is why we have this option here called Average Normals. And what that's going to do is it's just going to fill in this missing gap here. So again, if we kind of take a look at this view, this blue line here, this is going to represent that mesh normal. So here again, we have that hard edge, low-resolution mesh. We have the blue arrows here that represent the mesh normals, however, since we have Average Normals enabled, we're now going to have this average normal, which is represented here by this white arrow and that is going to give us an interpolation here from our frontal distance, so that we don't have any of that missing gap information there.
So it's very important setting to have. Now again, if you're mesh has just a complete smoothing group, the average normal is just ignored. It's already there within the mesh, so it doesn't matter. Now, in terms of how you setup this information, so the larger the difference in your high and low mesh, the larger the distance will need to be in this setting here. The total distance the ray travels is going to be defined by the frontal and rear distance. The rear distance, that's this setting here, is going to be where the ray stops.
So starting from the low-res mesh, the distance is computed based on the setting, that's our frontal distance setting, and then the distance that ray is going to travel is going to be then set or based on that rear distance, and that's how we're going to get the length of that ray. Just remember that the rear distance is where the ray will stop. Now, if the ray distance is too long, so again, we're looking at this purple arrow here, if this is too long, then it may hit neighboring geometry, and that's when you're going to get different projection errors.
And that's why we're going to use this Match by name option here that you see. Right now it's set to Always, which means that if this ray is too long, then it is going to end up producing some type of projection error. And so lastly, we have this option for Ignore Backface and this Relative to Bounding Box. So, the Relative to Bounding Box is a distance scale. When checked, distances are normalized within the zero to one range. And distances are expressed as a percentage of the bounding box size.
And that helps you when thinking about what values you're going to place here for this Max Frontal and Rear Distance. So when this is not checked, then what you're going to have to do is think about the distances while they're not normalized and they're dependent on the object size. So, right now, we're going to have the settings basically dependent on a percentage of the normalized value of the bounding box of the mesh. Now, when Ignore Backface is checked, the rays will stop if they hit a backface of a triangle, and so it's just a good thing to have.
So you're going to want to have Ignore Backface enabled and you're going to want to have Average Normal and Relative to Bounding Box checked pretty much all the time. And so, that's going to kind of close out this video where we just did an overview of kind of the settings that we have here for our baking parameters. The main thing that we discussed here is that we have common parameters, which are going to be common to all of the bakers and then some bakers are going to have their own specific type of parameters. We also discussed how this Max Frontal Distance and Max Rear Distance settings are calculated, as well as which of these options you should leave enabled by default.
- Creating a project
- Getting to know the views
- Working with layers and materials
- Working with the brush tool set
- Texturing a weapon asset
- Exploring textures
- Rendering in Iray