Project 3b: Texturing

Goal To learn how to texture map a complex character.
Prerequisite Exercises
Resources

UV unwrapping and texturing is a lot like papercraft. In order to texture an object, you must first deconstruct it into workable pieces (the head, the torso, the arms etc.), then unwrap them into flat, 2d pieces called UV shells. These shells are organized into a UV map and imported into programs like Photoshop. After texturing, you apply the new texture to your object.

You will be using the Dragon Whelp file for this assignment. Save and open it to begin. You'll need to open Dragon Cove towards the end of your assignment. Don't worry about it now.

  1. Most of the work of unwrapping the model will be done in the UV Editor (Window → Modeling Editors → UV Editor).

    After you open the UV editor, you'll notice the UV map isn't very clean or organized. That's because none of the UVs have been mapped and unwrapped into organized shells yet. Placing a texture onto this current UV map will make the texture look very distorted on the geometry.
  2. To make the UV unwrapping process faster, first delete half of the model. You'll then unwrap half the dragon and duplicate the other half over later. The duplicated half will have the same UV layout as the other side.

    a) Don't worry about unwrapping the eyes, claws, or horns. Go to the outliner and hide (Ctrl + h) the "HornsandClaws" group until render time.

    b) Go to front view, select half the dragon and delete the mesh.

  3. Next, you'll need to start segmenting parts of the dragon into UV shells, since the UVs are all in separated pieces within the UV map.

    UVs, UV Map, UV Shells

    UV shells are a connected set of UVs in the UV map. UVs look like vertices, but UVs control how a 2d texture gets mapped onto the surface of the 3d model.

    The UV map contains your 2d texture and the layout of your UV shells that act as coordinates of where the texture is placed on the 3d model. There are no rules on the number of UV shells a model should have or how the UV shells should be unwrapped. It all depends on the model's shape and complexity.

    A good thing to note is that the more shells there are, the more visible seams there will be on the model. If you look at your shirt, you can see the seams where the fabric was sewn together. This is the same kind of concept. Picture UV shells as different parts of a piece of clothing that are sewn together. It's best to avoid seams as much as possible.

    This is a UV. It looks like a vertex, but acts only as a coordinate to indicate where a texture should be placed on the 3d model.

    Moving the UV changes where the texture is placed on the model.

    Moving the vertex changes the shape of the geo. It does not change the location of the UV.

    Example of a texture in a UV map with unfolded UV shells.

    For this dragon, you'll be making UV shells for the tail, face, front of hand, back of hand, upper arm, lower arm, bottom of wing, top of wing, body, leg (can be the entire thing or top and bottom), top of foot, and bottom of foot.

    a) Go to the UV Editor (UV → UV Editor under the Modeling menu set). Keep it on the side as you work. This is where you'll be working the most.

    b) Select a group of faces on your model that you would like to turn into a UV shell. To help get you started, let's begin by selecting all the faces of the upper leg.

    c) You'll notice selecting faces of the geo also selects the faces of UVs in the UV Editor. These selected UVs in the UV Editor need to be grouped together, by using a type of projection from the UVs menu. This will make your initial UV shell.

    UV Projections

    Projections provide a good start for an initial UV layout to connect the separated UVs together. It's never perfect! But as mentioned, it's a good starting point.

    FOR EXAMPLE:

    The selected UVs below are a mess and not together.



    A UV Map Projection was selected (Cylindrical was used in this example).



    All the selected UV pieces were, as a result, grouped together into a UV shell.



    If you don't like the current projection, you can always re-select the recently grouped UVs by right-clicking and holding, and selecting "UV Shell" in the UV Editor or in the Maya Viewport. Then choose another projection to group them in a different UV shell layout.

    Types of projection maps

    Planar Mapping: Maps UV texture coordinates onto the selected surface mesh by projecting them along one direction from an imaginary plane.

    Cylindrical Mapping: Maps UV texture coordinates onto the selected objects by projecting them inward from an imaginary cylinder.

    Spherical Mapping: Maps UVs onto the selected objects by projecting them inward from an imaginary sphere.

    Automatic Mapping: Projects UV texture coordinates onto the selected object from multiple angles simultaneously. A quick method to evenly unwrap UVs. However, take caution as this method does not always give reliable results and frequently does not create good seams.

    Create UVs Based on Camera: Creates UV texture coordinates for the selected object based on the current camera view as a planar projection. Think of your camera as the source for planar mapping.

    Now, let's continue making UV shells.

    To make a UV shell for the upper leg, let's try a cylindrical projection for the selected upper leg faces. The leg is pretty cylindrical, so this type of projection could work well. *If not, you can try something else. There's no right answer to this.*

    Your Cylindrical Mapping Manipulator will most likely appear vertical contrary to the upper leg angle. It's best to have the projection wrap flush around the leg. To fix this, click the little red T on the corner of the manipulator to toggle between scale/rotate/move. To rotate, first click the blue circle on the manipulator to access all the rotation axes.

    d) Move the UV shell over to the side in the UV Editor for more space to work. Later on, we will fit all the pieces into the graph in the UV Editor between (1,1) on the axes. For now, it's okay to work outside of this space until all the shells are ready to be organized within the UV Map.

    e) Next, you're going to make a temporary checker texture for the newly created UV shell. This will make it easier to see what parts of the model you've already made shells for and see any texture distortion on the model when unwrapping the UV shells. It's also good to keep all the UV shells about the same size, so you can combine UV shells together if need be. The size of the checkered pattern on the model can show you how much you need to scale the UV shells so that they are all relatively the same size.

    Assign a new lambert shader to the upper leg and name it "checker_mat".

    f) Click on the checker square for the lambert's color attribute to bring up a list of color nodes to choose from. Select "checker" node from the list.

    g) In the UV editor, you should see the checker pattern in the background of the UV map. The checker texture on the leg may look distorted, since the UVs aren't made into unwrapped and organized shells yet. Right now the checkered pattern is a bit too large, so it's harder to see any distortion. We can fix this by adjusting the way the checker pattern is repeated on the body.

    Go into the Material Attributes for your checker material in the Attribute Editor. Click the arrow next to the Color attribute. Under the UV Coordinates drop down menu, click on the arrow next to Uv Coord.

    h) Change the Repeat UVs for both U and V to 15. *Any high number will work.

  4. Now that you've made a UV shell for the upper leg, it's time to unwrap it to eliminate any texture distortion on the model. If you look at the dragon's upper leg, you'll notice some of the squares are stretching weirdly.

    Texture distortion can happen when UVs overlap or are badly distributed. They need to be unfolded to be a true 2d representation of the 3d piece the texture needs to wrap around.

    Tools for Unfolding & Editing UV Shells



    There are MANY TOOLS for unfolding and moving UVs around!!! So many, you should explore the UV editor and see what all the tools can do. This tutorial will mention a few main tools that are useful for basic unwrapping. The more tools you discover though, the easier it'll be to unwrap. It's better to work smarter than harder in this case.

    TIP: I highly recommend watching these tutorials of the UV editor to learn a great majority of all the tools! At least skim through the videos to get a quick overview.

    Maya UV Editor Tutorial Part 1

    Maya UV Editor Tutorial Part 2


    You might benefit from having the UV Editor and UV Toolkit in this type of layout. UV Toolkit on the left, UV Editor in the center, the Viewport in the upper right-hand corner, and Tool Settings in the lower right-hand corner. Just click and drag the windows into place.

    Selecting UV Tools

    1. You can manually move individual UVs around by right-clicking the UV mesh in the UV Editor, selecting 'UV', and marquee selecting UVs. Press W (Move tool) to move them around as you would vertices. You can also rotate them with E (Rotate Tool).
    2. You can use soft selection with UVs just like you do with vertices in modeling by hitting 'B'. Hold 'B' and left-click drag the mouse left/right to increase or decrease the selection range. UV Toolkit has a feature to edit the soft selection as well under the Soft Selection Tab.
    3. You can select vertices/edges/faces/UVs and Shift + carrot keys(< and >) to shrink or grow the amount selected.
    4. You can select UVs directly on the 3d model.
    5. Selection tools in the UV ToolKit



      Pick/Marquee: Click to select. Drag to marquee select.

      Drag: Click and drag over components to paint a selection.

      Tweak/Marquee: Drag highlighted components to tweak their position, rotate, scale, while using Move, Rotate or Scale tools. Drag to marquee select.

    6. Select By Type



      Back-Facing: Selects back-faces, or backside of normals. Usually when a normal is flipped and needs to be flipped back by going to Mesh Display > Reverse.

      Front-Facing: Selects front-faces.

      Overlapping: Selects all components that share the same UV space. Select all components that share the same mesh and UV space.

      Non-Overlapping: Selects all components that don't share the same UV space. Select all components that share the same mesh, but don't share the same UV space.

      Texture Borders: Selects all texture border components for the current selection.

      Unmapped: Selects unmapped faces in current UV set. Good for very tiny hard to see pieces that still need to be unwrapped.

    Pinning

    1. Pin: Locks the selected UVs so they cannot be modified. By default, pinned UVs appear blue.
    2. Pin Tool: Interactively locks UVs to prevent further modification.
    3. Unpin: Unlock selected components to further modify.
    4. Unpin All: Unlock all selected components to further modify.

    Cut and Sew Tools

    1. Cut: Separates UVs and creates a border along selected components.
    2. Auto-Seams: Automatically select and cut seams for selected objects or shells.
    3. Cut Tool: Interactively split UVs by dragging along edges.
    4. Create UV Shell: Cut out a UV shell based on the perimeter of the current selection.
    5. Sew: Weld selected UVs together along the selected components without moving them.
    6. Sew Tool: Interactively weld UVs together by dragging along edges.
    7. Stitch Together: Sews two selected edges together by moving one shell towards the other in the specified direction.


    8. Move and Sew ("Cut/Sew" menu > Move and Sew) : Attaches UVs along the selected borders, and moves them together in the editor view.

    Unfolding Tools

    1. Unfold: Function in the UV Toolkit helps to unfold overlapping UVs.
    2. Straighten Shell: Straighten a UV Shell by unfolding UVs around a selected UV edge loop.
    3. Smooth Tool ("Tools" Menu > Smooth) The most useful tool. This tool combines unfold and relax as a virtual slider. Try and experiment with varying levels and combinations of unfold and relax using the Smooth Tool. Only works in UV selection mode.

    "Tools" Menu

    1. Smudge: Allows you to manually 'push' and spread UVs apart.
    2. Grab: Selects and moves UVs within a brush-based region in the direction that you drag.
    3. Pinch: Pulls vertices in towards the center of the tool cursor. For more information, see Pinch UV Tool.
    4. Symmetrize: The Symmetrize UV Tool lets you mirror components in the UV Editor across the U or V axis. The line of symmetry is displayed as a bold line. To open the Symmetrize UV Tool, select it from the Transform > Tools section of the UV Toolkit or select Tools > Symmetrize from the UV Editor menus. The following options appear in the Tool Settings window when you select Tools > Symmetrize > options.

    Other UV Editor Tools



    The tools you'll probably use the most are Unwrap and Smooth.

    Let's start unwrapping the upper leg UV shell that was made.

    1. Select the upper leg UV shell.


    2. Shift + Right-click > Unfold


    3. The UV shell should now be unfolded. If not completely, then use other tools to further unwrap.


    4. Inspect around the model and see if there's any distortion. Usually just one unfold isn't enough to unwrap the UVs completely, depending on the geo's complexity.

      If there is distortion, continue using tools to unfold. The upper leg UV shell seems to be unfolded enough, since the texture doesn't look distorted around the leg.

      **Remember to be saving along the way. Now is a good time to do that.

  5. Now let's make a UV shell and unwrap the lower leg.

    NOTE: Your UV shell may look different after the projection, or you might have to unwrap differently as you continue to follow the directions. That's okay. Unwrapping isn't a linear process where you get the same results every time. The point in the end is to have a nicely distributed UV shell that's unwrapped, has proper seams, is the proper size, and ready for a texture.

    a) Select the faces of the lower leg.

    b) Use a projection to group the UVs of the lower leg together. Cyclindrical Projection should work well for this.

    c) Right-click hold on the model and "Assign Existing Material". Select the checkered shader that you made.

    d) In the UV Editor, select the lower leg UV shell. Shift + Right-Click and unfold the shell.

    e) My UV shell doesn't have a clean seam and looks a bit jagged. Your result might be different. To fix this issue, the jagged UV pieces need to be cut off for a straighter seam.

    f) Just like a puzzle piece, the chunk of UVs cut from the shell need to placed on the opposite side and sewn into place.

    g) Increase or decrease the scale of the lower leg UV shell so that the size of the square texture is the same as the upper leg.

  6. Think about the seams as you make UV shells and Unwrap, and place seams on hidden parts of the model. It'll be best to place the seam along the inner part of the model for the arms and legs of the dragon, since it's harder to see. It's also sometimes best to have seams align incase you want to merge shells together later on. The seam of the upper leg shell has the same seam edge as the lower leg shell right now, so we don't have to follow this step. The seam is also on the inner part of the model. However, let's say the seam of the lower leg isn't aligned like the image below. The seam is somewhere else on the leg.

    a) You'll have to examine and decide where the new seam needs to be on the UV Shell.

    b) Select the edges where you want the seam to be and cut along those edges. Move one of the pieces of the UV shell to the opposite side and stitch the edges together until the two pieces are one whole piece again.

  7. Make the rest of the UV shells for the dragon and unwrap them.

    Things to keep in mind while making more shells and unwrapping:

    Size of UV Shells: The faces of the dragon's geometry are different sizes, and this should be reflected in the UV space for more even texture distribution (more detail for larger faces, less detail for smaller faces). The larger the UV shell is, the higher its texture resolution will be. If it's really small, the texture of that shell will look fuzzy on the model.

    Some parts of the UV shell will need to be larger for more detail, instead of the entire shell being larger. The dragon's head is a good example for this. The dragon's nose geo is pretty big compared to other parts of the face. In the image you'll notice the squares are getting stretched larger to compensate for how low the geo is compared to the UV shell coordinates. If you scale up the UVs around the nose, the squares will get smaller and provide more room for details.

    Continue unwrapping the shell until there's no texture distortion and larger regions that need more detail have smaller squares.

    **Careful when you use the unfold tool, since it can undo all your work for resizing certain parts of the UV shell.

    Natural shapes: For the various dragon parts, you will want more natural shapes like the feet and wings, shown below. Keep this in mind as you progress.

    Floating unwrapped UVs pieces: If you realize you have extra tiny UV faces lying around, find where they came from and sew them back on. If you cannot find where they came from, select a UV off of the stray face and select "Stitch Together".

  8. Once you have all your UV shells made, now it's time for sewing. Make sure the UV shells are all scaled appropriately so that the texture is the same size for all parts of the dragon.


    a) You definitely want to start thinking about how you can reduce the seams, since there are a lot of UV shells. For this dragon, it might be best to later combine the wings together, upper and lower leg, arm to hand, and so forth. First move the shells around so that certain parts of the dragon are grouped together that will later be sewn. For example: bottom foot and top foot, arm, top of hand and bottom of hand, upper leg and bottom leg.

    WARNING! If you are overzealous in combining shells, your UV layout and texture may suffer. Some shells probably shouldn't be sewn to other shells, so that they can be larger in scale for higher resolution. So try to strike a balance.


    c) Select the edges of shell borders you would like to sew together. Click "Sew Together" tool, and then unfold the newly formed UV shell.

    For example, the wings:

    The upper and lower hand:

    d) In the end, you should have fewer UV shells. In the example, the following groups were sewn together: the upper and lower foot, top of hand bottom of hand and the whole upper arm, upper and lower leg , both wings. The head, torso and tail were not sewn.

  9. Now that the UV shells are ready for half the dragon, it's time to mirror the other half of the model so that it will have exact same UVs as the other side. The UV shells of the new half will overlap perfectly on top of the layout for the first half.

    a) Click the half-model you finished unwrapping and duplicate (Ctrl-D). Group the duplicated mesh. Change its "Scale X" input from 1 to -1 in the attribute editor. Then, Combine and Merge Vertices down the center.







    b) When you go back into the UV editor, it seems like nothing has changed. But if you Select Shells and move something, you'll see that the other half of the model's UVs have duplicated directly underneath.

    Turn on "Shaded Shells" to see the flipped shells. Red indicates a flipped UV. Non-flipped UVs are blue.

  10. Overlapping UV shells are fine for parts of the dragon that will be symmetrically shaded, as they reduce the work done in Photoshop and maximize UV space usage. This usually applies to parts like the feet, hands, and wings. However, you do not want the UVs to overlap for areas that need be asymmetrically shaded (for example, one hand having a tattoo), or for parts that would work better as single pieces (head, torso, etc. ) This helps to eliminate seams.

    So in summary, if you want it to be symmetrical, keep it overlapped. If you prefer asymmetrical textures, move it and sew the pieces together.

    a) Flip the duplicated UV shells for the head, torso and tail.





    b) Sew and unfold (if needed) the flipped pieces together for the tail, head and torso.



    c) Move the head, torso, and tail pieces together. Then sew and unfold (if needed) those shells together.



  11. Lay out all the shells between 0 and 1 in UV space, then scale and arrange them to maximize the amount of space used. You will also want to leave at least a little space between the shells so that the texture does not bleed between them.

  12. Save a UV snapshot that can be used as a basis for texturing. Go to Image → UV Snapshot to save a snapshot. Set Size X and Size Y to 1024, change the Image Format to PNG, and save the file.



  13. Now to paint! The best part!

    Open the UV snapshot in Photoshop. Double-click the Background layer to convert it to a normal layer. A window will pop up with new layer settings. Name the layer whatever you'd like and press 'OK'.



    Your background layer should now look like this:

    Create a new layer by going to Layer → New → Layer....

    There are several ways to arrange your layers when painting your texture. The simplest is to paint on a layer on top of the UV map. Another way is to place the UV map above your texture layer and set it to "Screen" so that the UVs overlay the paint. Make sure to name your layers.

    Paint your dragon however you'd like. It's generally easier to paint in the basic colors, then save out a version of the texture to test in Maya to make sure everything is where you want it. Look for seams, or places where the UV sections are visible in the texture. Try to paint these out if you can. Once you've cleaned that up, it's easier to go back in and add more detail if desired.

    If you're not comfortable with Photoshop, or have never used it, here is a link to a reference that has some tips to get you started: How To Use Photoshop.

  14. Once you are done painting your texture maps, save them to the network as .png files. Be sure to turn off the UV layer before you save them so you don't have the grid mapped on your dragon.



    Shown below are example color, bump, and specular maps. The bump and specular maps are extra credit. Bump and specular maps are grayscale. A bump map effects the way light hits the surface of the model. A white area indicates a high part on the map while a black area is low. In the specular map, white areas are shiny while black areas are not.

  15. Back in Maya, create a new material and assign it to the dragon. We will be rendering in Arnold and using Arnold shaders, so make sure the Arnold plugin is installed. This is a good time to apply your shader knowledge from Project 3A! Play with the Ai Standard, Ai Utility, and other shaders!

    Then map a File render node into the Color for the material. Browse for your color map in the Image Name field for the file. Since your textures will be .png Maya is going to automatically link them to the shader's transparency channel as well. To get rid of this, disable Arnold's opaque in dragonwhelp_Shape.

    Do the same for Bump Mapping and Specular Color if you have bump and specular maps.

    a) If you are doing a bump map, you have to separate the shells of your UV map so nothing overlaps. If you are using AI Surface Standard, Bump map will be under geometry. Specular will be under speculate. You can add your images under base --> color.

    b) Adjust your textures until you are happy with them. Unfortunately, the texture will not update automatically in Maya when you save a new copy of the texture file. To force an update, go to the file node that you mapped into the Color and click the Reload button.

  16. Save your dragon as [lastname]_[firstname]_dragon.ma. Open the Dragon Cove file provided for you at the beginning of the assignment. Go to File → Import and choose your dragon file.

    Open the Outliner. Create a group labeled "dragon_char"and and middle click drag your dragon model into the group. Next, select that group, and hit '3' to smooth it.

  17. The dragon cove should be ready for rendering! There are four camera views named LightcoveCamera, Closeup1, Closeup2, and Closeup3. Open the Render View (click this button which is located at the top middle of the screen) and make sure Render → Render All Layers is checked.

    Now render each of the four camera views. You can do this by clicking each camera view in the viewport and then clicking the Render button, or from the Render View window go to Render →Render → [insert camera name here] for each camera.

    Be sure to save each file as a .png using the naming conventions listed below when it is finished rendering.
Turn In You will be graded on the following: Turn the following into Canvas: