Creature Modeling, Part 6: Painting Diffuse and Glow Maps
This is a continuation of my series on building creature models for NWN2. Those who haven’t read the start of the series may want to refer to my previous blog posts.
So far, we’ve created a skin mesh, rigged it to a skeleton, mapped its UVW coordinates, and given it a normal map. The color of the creature we’re modeling has been gray this whole time, however. As we shall see, adding a diffuse map to the model can make it much better looking. Subtle use of a glow map can boost its creepiness as well. Here, we discuss how to create and apply a diffuse map and a glow map to the model.
Rendering the UVW Template
When painting the diffuse map, you may need to start with your model’s UVW template, which shows which parts of the texture maps are rendered on which polygons. Here’s how to render the UVW template.
Painting the Diffuse Map
Creating a Glow Map
Like makeup on a person’s face, diffuse maps (and optionally, glow maps) can do much to alter a creature’s appearance. It takes skill and patience to paint a good diffuse map, however. Just as makeup can make a woman look elegant or cheap depending on how it is applied, diffuse maps can make models look great or amateurish. It’s well worth the effort to spend time on perfecting this art.
We’ve covered a lot of ground, but we’re not done yet. There are still a few issues to tackle, such as levels of detail and 2DA entries. We’ll discuss these issues in my concluding write-up.
So far, we’ve created a skin mesh, rigged it to a skeleton, mapped its UVW coordinates, and given it a normal map. The color of the creature we’re modeling has been gray this whole time, however. As we shall see, adding a diffuse map to the model can make it much better looking. Subtle use of a glow map can boost its creepiness as well. Here, we discuss how to create and apply a diffuse map and a glow map to the model.
Rendering the UVW Template
When painting the diffuse map, you may need to start with your model’s UVW template, which shows which parts of the texture maps are rendered on which polygons. Here’s how to render the UVW template.
- In 3DS Max, load your model and click its Unwrap UVW modifier. Click the “Edit” button, which is under the “Parameters” rollout of the modifier. This will cause the “Edit UVWs” window to appear. Click the “Tools” menu and select “Render UVW Template.” The “Render UVs” dialog box will then appear.
- Input the width and height in pixels of the image to be generated. These must correspond to the dimensions of your texture maps. The width and height must always be equal, and this number must be generated from powers of two; e.g., 256, 512, or 1024. Click the “Render UV Template” button to bring up the “Render Map” window.
- In the “Render Map” window, click the icon that looks like a floppy disk. (It’s the leftmost icon at the top of the window.)
The “Browse Images for Output” dialog box should then appear. Save the template in a format that can be read by your image editing software.
Painting the Diffuse Map
- Load either the UVW template or the normal map in your image editing software. You’ll need one of them as a reference for the placement of features such as eyes, nostrils, wounds, tattoos, piercings, etc. If you need both of them, put them in separate layers in the same file.
- Paint over the image to establish the placement of the main features of the model. Don’t try to paint any details yet. At this point, you just want to get the main features blocked in.
- Output the image as a DDS (DXT5) file with nine mipmaps and put the file in your NWN2 override folder. You may either save it under the same name as the diffuse map that your model already uses, or you may edit your model to use the new diffuse map. If you choose the latter, you’ll have to store the revised MDB file in the override folder as well.
- Run the NWN2 toolset and view the model in it. Make sure that the colors of the main features are not displaced. If they are, correct your image file and try again.
- Paint more details over the diffuse map. If you’re striving for realism, you may want to manipulate photos over the image to make them fit over the main features.
Creating textures is an art in itself. Not all 3D artists are good at painting textures, and not all texture artists can construct 3D models. If you need to bone up on this skill, you may want to search the Web or read books for more information. - Check out your model in the toolset again. Make corrections as needed. At the end of this process, you should have a diffuse map that you’re happy with.
Creating a Glow Map
- If you need a glow map, you can base it on your diffuse map. My glow map is basically the diffuse map with the addition of an alpha channel that indicates which parts of the texture are supposed to glow. If your image doesn’t have an alpha channel, add one. In Photoshop, you can do this by clicking the “Channels” tab at the right side of the screen and clicking the “Create New Channel” icon at the bottom.
- In the alpha channel of any glow map, the regions that should be glowing are painted in white. Everything else is black. For my model, I wanted the eyes of the model to glow, so I painted a couple of white circles where the irises should be. If you’re using Photoshop, you may want to make the RGB channel visible so you’ll know where the eyes are.
- Save the image as another DDS file (same parameters as before) and put it in your NWN2 override folder.
- Edit your model in 3DS Max and press the [M] key to bring up the Material Editor. Add the glow map to your model under “Self-Illumination.” Export the model as an MDB file and put it in your NWN2 override folder.
- View your model in the toolset to make sure that the glow effect is done to your liking. If you find that the glow is too bright, you may need to darken the color of the glowing region. (In terms of defining a color as a combination of hue, saturation, and brightness, you’ll have to lower the brightness of the color.) Correct the glow map if necessary until you’re satisfied with the results.
Like makeup on a person’s face, diffuse maps (and optionally, glow maps) can do much to alter a creature’s appearance. It takes skill and patience to paint a good diffuse map, however. Just as makeup can make a woman look elegant or cheap depending on how it is applied, diffuse maps can make models look great or amateurish. It’s well worth the effort to spend time on perfecting this art.
We’ve covered a lot of ground, but we’re not done yet. There are still a few issues to tackle, such as levels of detail and 2DA entries. We’ll discuss these issues in my concluding write-up.
Comments
Nidal Telin
@Nidal Telin,
I will certainly blog about the module we're making as the weeks go by, though I can't reveal anything vital concerning the storyline. I hope a lot of players enjoy it once we release it at the Vault.
Nidal Telin
I think I can post an occasional progress report, although it's not likely to be very accurate. Target deadlines have a nasty habit of moving forward when you're not watching. We're targeting something like an April release maybe, but that's still tentative. We'll keep our fingers crossed. :)
can you tell me what this means:
"If you haven’t set the normal and diffuse map of your model as a material, do so now."
specifically, how do i do that?
when i use the tapzn exporter to export my model i get a .mdb file but no associated texture files as i would expect...
thanks
It looks like you got that quote from my blog post on creating a rusty metal texture. Anyway, you assign the normal and diffuse map through the Material Editor in the bump and diffuse color slot, respectively. From our recent exchange of posts at the Bioware forum, I know you've already figured it out. ;)