Baking Textures in 3ds

The Hicks character is looking good, but there are currently too many textures to carry around in the game engine. We can fix this by baking the textures into the model. That will free up a lot of memory as we go through the animation process in the coming chapters.

Each vertex holds information about where it is located in space, but it can also hold color information using vertex colors. Baking textures is the process of taking the color information for each vertex and attaching it to the vertices. This inserts (or bakes) the texture information into the model.

Some game engines like using baked textures and others don't like them at all. For this example, we'll show you how to bake textures in 3ds Max and use the baked textures while we animate the character.

All kinds of information can be baked into a model, including lighting effects, colors, bumps, shadows, and normal maps. The interface for baking textures in 3ds Max is the Render to Texture dialog box. This dialog box lets you specify the type of map to create, the objects to bake, and how the baked textures are applied to the model.

Before baking the textures, we need to collapse the stack for each object. When you apply modifiers to objects, they are stacked in the Modify panel in a list that you can revisit, so if you apply a modifier to deform a character and later you want to remove it without affecting the underlying character, you can simply select it in the Modify panel and remove it. The problem is that when you try to change a modifier that affects a higher modifier in the stack, you can mess up the order of thing. For example, if you model a character using the mesh commands, apply an Unwrap UVW modifier to map the character, and then try to change the mesh object again, Max reports that your making changes to the mesh will mess up the mapping (see Figure 6.44). We can get around this problem by collapsing the stack, but doing so makes it so that we can't revisit the mapping anymore, but at this point, the mapping is set. Collapsing the stack is fine because the textures are in good shape. It will also simplify the mesh and make it cleaner as we move forward with the animations.

Use the next set of steps to bake the textures for the various parts using a complete map. This map selection will include lighting effects, highlights, and diffuse colors.

1. Select the torso object and open the Modify panel. Then right-click on the top modifier in the stack and select the Collapse All menu. A warning dialog box appears asking if you really want to do this. Click the Yes button, and all the modifiers are reduced to the base Editable Poly object.

Figure 6.44 A warning dialog box appears when you try to make a change to a modifier below the stack.

2. Repeat the stack, collapsing all the other parts.

3. Select all the objects in the character, and open the Render to Texture dialog box. Each of the parts is listed in the Objects to Bake section. In the Mapping Coordinates section, select the Use Existing Channel option to use the mapping that we spent all this time doing. Then, in the Output section, click on the Add button, select the Com-pleteMap option, and select the Diffuse Color as the Target Map Slot. Then click the Render button to begin the baking process.

4. Each of the maps is rendered to Max's Render Frame window and saved in the specified path. These maps include all the lighting, shadows, and highlights of the rendered scene (see Figures 6.45 through Figure 6.49).

Figure 6.44 A warning dialog box appears when you try to make a change to a modifier below the stack.

Figure 6.48 The baked head texture rendered in 3ds Max, including a bump map.

Figure 6.49 The baked eye texture rendered in 3ds Max.

Normal Maps

A recent development that has begun to appear in games such as Unreal Tournament and Half-Life 2 is normal maps. These maps make it possible to add the lighting details from a high-resolution model onto a lower-resolution model using a special type of map called a normal map.

To create a normal map in 3ds Max, you need to prepare a high-resolution version of your character along with a lower-resolution character. You place the high-resolution model on top of the lower-resolution model, and you use the Projection modifier to map the vertices between the two models.

With the Projection modifier in place, you can use the Render to Texture dialog box to choose the normal map type to render. Then you can place this normal map in the bump map channel for the material on the object.

0 0

Responses

  • amanda
    How to apply backed textures in 3ds max?
    8 years ago
  • charles
    Where is the bake button in 3ds max?
    8 years ago
  • Urho
    How to stack materials in 3ds max?
    8 years ago
  • Garland
    How to apply eye texture in 3ds max?
    8 years ago
  • Awet
    How to bake texture into mesh 3ds max?
    8 years ago

Post a comment