Join Aaron F. Ross for an in-depth discussion in this video Baking maps with Render to Texture, part of 3ds Max: Advanced Materials.
- [Narrator] We're now ready to bake our map using Render To Texture, Let's open that from the rendering menu. Render To Texture. And you might wanna drag the bottom of the dialogue around a little bit, just to make sure that it refreshes properly and go directly in General Settings. Just go in there and make sure that you're saving to your current project, ExceriseFiles/SceneAssets/Images in this case. Click anywhere in that path field, and press the End key, and in fact that's what I've got listed here.
CurrentUser/Desktop/ExerciseFiles/SceneAssets/Images. Very good. That's what we need. We can close General Settings. But just remember to always go and check in on that one. Directly below that is a Roll Out labeled Objects To Bake. And you'll need to select something. Let's select the Athena Body, and then that object is listed here, and now we can start changing up some of the parameters. Down a bit further you'll see Mapping Coordinates. If we wanted we could automatically unwrap this model, but I've already got UVs placed, so let's choose Use Existing Channel.
And it happens to be on channel number 1. Scrolling down a bit more, we come to the output section, and we want to choose the File Name and File Type. Click on Add. and we have all these available elements. Choose Diffuse Map, remember that our diffuse color is fully self-illuminated. Click Add Elements, and we see specs about that element listed here. If we de-select the object, then we won't see that.
We need to re-select it. Down here we have the name of this particular map or element that we're going to output. And it says diffuse map, but we're actually going to be outputting an ambient occlusion I'll select that name and type in an underscore and a capital A and capital O and press the Tab key. And now the cursor advanced to the next field, which is file name and type. And not that's listed as Athena body underscore AO.
And so the type TGA or targa. We want to change that to a different file format such as png. But, you actually need to do it this way, you need to choose your file format for the first object you add, and then you don't have to keep doing that for every single object. You'll do it once here on the first object and then the rest of the objects will inherit that. So click on the browse button on the right of file name and type, and we want to change it to a png.
Save as type, png, or portable network graphics. When we hit save we should see the png configuration dialogue pop up. And that's the setup for the file format. We do want to have RGB 24 bit with no alpha. Click OK. And now that's listed down here, but we've added somehow, another scene assets images. And that's not good, because if we just executed the bake command now, we would get an error and no file would be saved, because we're trying to save into a folder that doesn't exist.
Remember, up here on general settings, We're saving out to SceneAssets/Images, This is looking for another folder called SceneAssets inside that. Let's delete all of that. We just want to see the file name, and none of that spurious stuff. Select it and press the backspace key. And that's what we need to see. Okay, so we've set up the pass, and now we can add the other objects. Select the hair, and then Control select the helmet. And then click add.
Once again it'll be a diffuse map. And click add elements. And now let's check on these, select them one at a time. The body says AthenaBody_AO.png, Select the hair, and it still says diffuse map. So let's select both the hair and the helmet. Select them both, once again, with the control key. And rename that underscore AO. And once again, double check everything. Select each object individually, and make sure that its file name and type are listed without SceneAssets/Images in front of it.
All right, so those all look good. Now we can change the rest of the parameters. Select all three of the objects, and we can change the width and height. Let's give our output bit maps a resolution of 512 by 512. Just click on that preset. Scroll down a little bit, you have selected element unique settings. This is important, we need to enable shadows or else our ambient occlusion will not show up and we'll just get a white rendering. Lighting should be off, otherwise we'll get a black rendering.
So lighting off, shadows on. Curiously. Scrolling down a little bit more. We can choose to create a shell material, which is kind of like a proxy allowing us to toggle back and forth between the baked and unbaked versions. But we don't want to do that in this case. All we really want to do is just save out the files. We don't want to make any changes to the material shaders that exist in this scene. Click on render to files only. And with all of those settings having been made, we can click on render.
When the rendering stops we should check in on the newly created files and make sure that they look the same as the frame buffer here. I'll minimize 3DSMax, and here are the three png files that we just saved out. And there's the body, the hair, and the helmet. And that shows how to export a procedural map to a file using render to texture. Of course, we've only scratched the surface. We can add many more layers or elements and then use those in a shader tree that will then be compatible with other applications or other renderers.
- Streamlining material editor workflow
- Managing XREFs and materials
- Laying out a scene for material testing
- Using the Physical Material
- Controlling highlights with Roughness
- Directing reflections and refractions
- Simulating translucency and scattering
- Building a shading network
- Combining and color correcting maps
- Baking maps such as ambient occlusion
- Procedural mapping with Substance
- Using relief maps: bump, normal, and displacement