by Brian Immel
This tutorial covers the basics of generating UV projections, editing UV points, exporting UV maps to Photoshop, and bringing the finished texture map back into Maya. This tutorial assumes that the user has a fundamental understanding of the Maya interface, has some knowledge of polygonal modeling, and has experience with editing raster-based images in Photoshop. Note: Some of the steps and proceeds may need adjusting if you are using version 6 and up.
Open the UV Texture Editor by going to Windows > UV Texture Editor. This window will display all of the UVs of a selected polygonal object. The main function of this window and the tools therein is to edit UV points. UV points do not affect the geometry’s makeup (position) but rather how the material maps wrap around the surface.
By default, when you create a polygonal object, the UVs go over the entire place. In other words, the UVs are a mess. This image illustrates what the UV layout looks like when a model gets finished. As you model, Maya just throws the UV points all over the UV Grid. By the end, all the UV ponts will need to be placed within the upper right corner of UV Grid.
One quick way to get all the UVs back inside the upper right UV Grid, is to use the Automatic Mapping function found under Edit Polygons > Texture > Automatic Mapping. Using this function will break the UVs down into ‘chunks’. Figure 4 illustrates these chunks with the default settings for Automatic Mapping.
Use other projection tools to map out areas that you wish to use in high detail areas. For our fish friend here, I want to have detail areas of the body, fins, and mouth region. Start picking the larger areas first by selecting the polygonal faces of the body.
Open up the tool options for Planar Projection (Edit Polygons > Texture > Planar Projection > Option Box). Select Camera under Mapping Direction. By selecting the Camera option, Maya will unwrap UVs according to whichever window you have activate. In case of our fishy friend, I activated the side view by clicking on the empty portion of the side viewport menu. Activate viewports will have a blue outline indicating that this viewport is active. In the Polygon Planar Projection Options window, I hit the Project button to layout the UVs of the body.
This image shows that I only selected one side of the body (in this case the fish’s left side). If I had chosen to select both sides and created the projection as I just mentioned, I would have overlapping UVs. Some times, you will want to overlap UVs to save UV layout space, texture memory and file size. Other times (more often than not), you should keep your UVs sets separate from one another.
Create as many UV projections as you see fit to get the areas of
detail you need. One Automatic Projection won’t be enough
and a bazillion projects will be too much (unless of course you
have a bazillion faces).
Immediately after creating a projection with a selected set of faces, in the UV Texture Editor (UVTE) window, you will notice that the selected faces will have a Manupilator-like tool selecting them. You can move, rotate and scale according. At this point, it is strongly recommended that you move your selection to an unused area of this the UVTE window. This will prevent overlapping UVs. Think of the UVTE window as a staging area where you can dump all your UV sets like puzzle pieces on a tabletop. These pieces will sit there until you move them into their final resting place.
To edit UVs, right-click hold and select UV(s). Select the
Move, Rotate or Scale tool to manipulate the UV’s positions
within the grid. No other tool will work in this window to move
Be careful as you create new projections and move old selections around not to unintentionally stretch or pull UV sets. Stretching UVs from their original projections will cause the texture map(s) assigned to this surface to stretch and/or pull which will lead to bad looking textures.
When laying out your UVs of your character, you want to lay out sets of UVs that you will use to give areas of high detail first. Example: Face, torso, hands, areas of accurate details. This image illustrates all the areas I wanted to have particular UV sets for so that I can create a fairly detailed map for my character. All the pieces that still ‘remain’ in the UV Grid are areas of no detail meaning that they will just receive basic color.
Once you have laid out all your projections, you need to put all these projections back into the upper right UV Grid before we can export these UVs out to a texture file to be edited in Photoshop. This is where you must make the final decision on what gets the most detail level and what gets secondary detail levels and so on. Chances are, you will have to scale each UV set so that you fit all the UVs back into the upper right UV Grid. Pick the highest detail UV sets first and move them into the upper right UV Grid and uniformly scale them to fit inside. In the case of my fish, I scale the body down to near 50%, the lower fins to 25%, inner mouth cavity about 15%, face about 30%, and the other fins about 32%. The no detail or low detail areas I scale down the most and tucked them away in a small opening. Figure 10 shows where I laid everything out and how I prepared the UVs for export.
There comes a time in life when a polygonal character model wants to expand his horizons. Soil his oats. Get dirty and use external texture maps that have customized just for him.
1. Select the polygonal surface.
2. In the UV Texture Editor window, go to Polygons > UV Snapshot.
3. Under File Name, hit the Browse button and choose a save location and a name for the image. You may want to add a suffix such as _UV_map to the image name to avoid any confusion later on.
4. Select an image size in the Size X and Size Y areas. The larger the size, the more detail your maps can contain. Also keep in mind that larger maps will require a bit more time for rendering. I usually work with 512 x 512 unless I plan on the object having an extreme close-up in which case I will use 1024 x 1024 resolution.
5. Leave Color Value to white.
6. In Image Format, select a format that will be compatible with your raster image editor (Photoshop). I would recommend Targa format because it uses an alpha channel and can be read by almost any raster image editor software.
7. Hit OK to save the UV map image.
- Once you have the UV map in Photoshop, create and paint on layers that do not contain the original UV layout! If anything, lock this layer so that you don’t accidentally paint on it. You should also name this layer UVs or UV map or something to remind you that this layer should not be touched.
- Use many layers to generate the images you wish to use to texture the surface of your character. Figure 12 shows what I did the UV map and the layers I used to create textures for the fish geometry. You may have noticed that the UV layer is on top of everything in this figure. I like to keep the UV layer on top so I can see were my edges end and keep my textures under better control.
- Keep track of what UVs are continuous edges, connecting edges (if you wish to create a seamless detail) and color safe choices.
- You can use what every tools and techniques you like to generate your maps but try to avoid anything that is unnecessarily random or has sloppy control over placement of pixels.
- You can use the areas outside the UVs as notation areas for yourself or other people who might be working on this project. Figure 13 tells me what UV sets are what.
- When you are ready to take this texture map back to Maya, turn off the UV layer before exporting as a Targa file. Otherwise, you will see the UV layout on top of your beautifully drawn textures. Save As with 24-bit resolution (32-bit will add an alpha channel that we don’t want to use).
- You may notice that a few edges are not as perfectly seamed as you thought or some areas of detail don’t meet up with how you thought they would sit down on the surface. If this is the case, simply edit the texture map in Photoshop, perform another Save As and update the file linked to the shader that is attached to our fishy friend.
1. Now that we are done editing the texture map (for now), its time to bring the texture back home. Assign a new shader to the geometry.
2. In the Color Attribute of this new shader, hit the checkbox at the far end. This will open the Create Render Node window.
3. Select File from this window. This will change the right side of Maya to display the Attribute Editor and list an open file node.
4. Click the folder icon at the end and select the texture map you just created.
5. If you are updating a texture map from Photoshop, you do not need to build the link from Maya to this external file. Simply hit the Reload File Texture button below the Image Name field. Figure 15 shows the file version of our fishy friend after his textures have been updated, a few more UVs pulled around post-UV output and a smooth proxy applied. Happy fishing!