Lesson 08 Polygonal Texturing

Posted on Posted in Uncategorized

Texturing Polygonal Surfaces

Texture our model using multiple shading groups and texture maps.

  1. UV Texture Editor
    • The UV Texture Editor is where you can see the UVs of your model. They are similar to the vertices except they live in flat 2D space. The UVs determine the coordinates of a point n a texture map. In order to properly assign a texture to a model, The UVs need to be unfolded like a table cloth.
    • – Select the body.
    • MAIN || Window > UV Texture Editor
    • Note: Displayed in the UV Texture Editor Window are the UVs for the selected geometry. The UVs are now irregular and will result in a poor texture map.
  2. Create And Assign A Body Shader
    • – Open the Hypershade Window. MAIN || Window > Rendering Editors > Hypershade
    • – Create a blinn material node.
    • Blinn is the simplest material, properly set can look like fur.
    • – Rename the material node to bodyM.
    • – Assign the bodyM material to the body geometry.
    • – Turn on Hardware Texturing in the perspective view to see your work in the upcoming steps. Press: 6 or click on the checkered icon:
    • Also make sure Renderer quality is at High Quality.
  3. Map the Checker to The Color
    • – Open the Attribute Editor for bodyM material.
    • – Map the Color attribute with a Checker texture node.
    • The checker texture is just a temporary texture in order to better see the UV placement. It looks like so.
  4. Planar Mapping
    • Correct the texture map by using planar projection.
    • – Select the body geometry, POLYGONS || Create UVs > Planar Mapping >
      • Planar Mapping Options
      • – Project from X-axis
      • – Click [PROJECT]
    • Note: See the large projection plane icon that surrounds the model.
  5. Projection Manipulation Tool
    • The projection manipulationtool allows you to modify the projection to better fit your model.
    • Note: You can toggle the manipulator tool for a conventional all-in-one tool by clicking on the red T at the bottom.
    • Note: If the projection manipulator tool disappears, click on the geometry and open the Channel Box and click on polyPlanProj input node.
  6. UV Texture Editor
    • Note: if you change the position of the manipulator, you will see the UVs of the model in the UV texture Editor have been updated.
    • UV TEXTURE EDITOR || Image > Display Image > Off
    • The view of the model and the loaded texture are both displayed in the Texture Editor with square proportions, regardless of the proportion of the planar projection positioned in 3D space and the proportion of the texture image file.

Modifying UVs

It is important to prevent overlapping of UVs where it’s not wanted.
Ex: A planar projection from the front of the model, the front and back UVs of the model are overlapping. Hence, if you changed the color of the character’s belly, the back would also change.

In our examples, we made a planar projection on the side because our model is symmetrical on the X-axis. We run into a problem. The UVs of the arms are overlapping with the UVs of the belly and could cause unwanted results.

UVs can be tweaked in the UV Texture Editor. Alter the UVs manually.

  1. Select the Arm UVs
    • – Select the body.
    • – In the UV Texture Editor: RMB over the body’s UVs and select UV
    • This sets the selection to UVs, similar to when you RMB over a model and select Vertices.
    • – CLICK + DRAG a selection rectangle over the penguins paw.
      Both paws are selected because the UVs are overlapping.
    • POLYGONS || Select > Grow Select Region
      This selects the next set of UVs on the arm.
    • Press SHIFT + > (not the arrow tools) to add to your selection.
  2. Unfolding the Arms to Prevent UV Overlapping
    • You can move the UVs manually one by one or automatically  by unfolding the UVs.
    • – In the UV Texture Editor || Polygons > Unfold
        • Pin UVs: ON;
        • Pin Unselected UVs: CHOSEN;

      (Note: These options specify that the selected UVs are the only ones affected)

      • – [APPLY AND CLOSE]
  3. Moving UVs
    • – Press “r” (scale tool) And tweak the UVs in the UV Texture Editor.
    • Note: The placement of the UVs does not need to be perfect since the arms will be the same color overall.
    • – Close the UV Texture Editor.
    • Note: Another technique is to cut the UVs and move the arm aside the rest of the body.

3D Paint Tool

Create custom textures by painting a texture directly on a model in the viewport using the 3D paint tool. Use the tool to outline areas to be painted in Photoshop or another software.

Note: When working with the 3D Paint Tool, be sure to adjust the UVs to minimize stretching and overlapping.

  1. Open 3D Paint Tool
    • – Select body
    • – Select the Rendering menu set. Press F6
    • RENDERING || Texturing > 3D Paint Tool >
      • 3D Paint Tool Options
      • – Scroll down to Files Textures;
      • Attribute to Paint: Color;
      • – CLICK on Assign/Edit Textures button
        • Assign Edit Textures Options
        • Image Format: Tif;
        • Size X: 512;
        • Size Y: 512;
        • Note: For more definition in your textures and your computer can handle it, increase definition to 1024×1024 or 2048×2048.
        • – Click the Assign/Edit Textures button.
        • Note:This duplicates the current texture already assigned to the model and saves your new texture in 3dpainttextures folder. As you paint on your model, only this new texture will be updated.
  2. Set the Initial Color
    • Paint over the old checkered pattern.
    • 3D PAINT TOOL(options) || Flood >
      • Color: black;
      • – Click on the Flood Paint button;
      • Note: The penguin is now totally black.
      • Note: Flood Paint will not work without the previous step of Assigning/Edit Textures button.
  3. Set Erase Image
    • To make sure you can erase your texture and revert back to the original texture, you need to set erase images as the current texture.
    • 3D PAINT TOOL(options) || Paint Operations>
      • – Click on Set Erase Image button;
  4. Paint On The Geometry
    • 3D PAINT TOOL(options) || Files Textures >

      • Extend Seam Color: ON
      • Note: This will make sure there are no seams visible when painting.
    • – Scroll to the top 3D PAINT TOOL(options) || Brush >

      • Make the 2nd Artisan Brush: CHECKED;
    • – Make sure you have the 3D Paint Tool selected.
    • – Place your mouse cursor over the model.
    • Scale the Paint Brush: HOLD “b” + DRAG cursor (left or right)
    • – Change the Color attribute from the color section to white.
    • – Paint directly on the model. Paint on the belly of the penguin.
  5. Paint Options
    • Under 3D Paint Tool > Paint Options>
      • You can set various paint options:
        • – Paint, Erase, Clone, Smear and Blur.
      • You can set the Blend mode which affects the way new strokes are painted.
    • Continue paint model’s body, neck, beak, eye sockets, feet, ears, and arms.
  6. Paint Effects
    • Under 3D Paint Tool > Brush>
      • – Enable Paint Effects brush
      • – Choose a template brush. Click on Get Brush
      • Note: You get artifacts when you paint on a model. This is due to seams, color, , texture resolution, UV placement, UV ovelapping, etc. Correct this by editing the texture later in a paint program like Photoshop.
      • – In the Visor, Scroll to Pens directory and choose inkSplash.mel
      • – Experiment by painting on the body.
  7. Screen Projection
    • When painting with the Paint Effects brush, you will notice that the brush circle may look stretched. This is because the brush bases itself on the object’s UVs which are stretched. To correct the stretched brush circle, you need to enable the screen projection option.
    • Under 3D Paint Tool > Stroke >
      • Screen Projection: ON;
    • – Now paint on geometry.
    • Note: painting with screen projection, is using the current camera view. This can be useful, but can also create stretched textures when painting on geometry parallel to the view.
  8. Reference Strokes
    • You might find it easier to draw only reference strokes in Maya an then use a paint program to refine the look of the texture. To do so you will draw where you want to add texture details on the object and then open the texture in a paint program. Then you can reload it in Maya.
  9. Save Textures
    • – You need to save the texture just drawn to disk.
    • – Save the texture. CLICK the Save Textures button in the Files Textures section.
    • OR….
    • – Save the texture automatically after every stroke. Turn ON, the Save Texture on Stroke checkbox in the Files Textures section.
  10. Edit the Texture in a Paint Program
    • – Locate your texture in your folder 3dpainttextures directory Modify it and save it out.
    • – You can reload/access your texture file within the Attribute Editor. Select the body, navigate to the Attribute Editor locate pasted_bodyM. Click on the color attribute and you can modify your texture there.
    • – Return to Maya, to the Texture’s Attribute editor, and CLICK Reload File Textures.

Final Touches

Texture the eyes and and hair. The eyes and hair are made out of NURBs, so they won’t require the extra UV steps. Texturing of NURBs will be shown in more detail in the third project.

  1. Create and assign an eye shader
    • – Open the Hypeshade window.
    • – Create a phongmaterial node;
      • Phongs: are used for shiny surfaces.
    • – Rename the material node to eyeM.
    • – Assign the eyeM material to both eyeballs.
  2. Map a Ramp To The  Color
    • – Open the Attribute Editor: eyeM;
    • – Map the Color attribute with Ramp texture node;
    • – Rename the ramp node to eyeColor.
  3. Tweak the Ramp
    • – In the Attribute Editor: eyeColor, set the following:
      • – Type: U Ramp;
      • – Interpolation:  None;
    • – Tweak the ramp colors to the image below;
  4. Create and assign an eyelidshader.
    • – Create a blinn material and rename it to eyelidM;
    • – Set the Color of the material to be similar to the surrounding eye color
    • – Assign the eyelidM to eyelid.
  5. Create a Hair Shader
    • – Create a Blinn material and rename it to hairM.
    • – Assign the hairM to all the hair objects.
    • – Map the Color of the material with a ramp going from black to brown.
    • – Set the material to be semi-transparent. Select the hairM material and open the Attribute Editor Window. Adjust thetransparencysetting.

Optimizing The Scene

  • Maintain a good workflow. Clean up your scene once texturing is complete. Delete unused shading networks.
  1. Delete Unused Nodes
    • Hypershade Window || Edit > Delete Unused Nodes;
    • Maya will go thru the list of render nodes and delete anything that is not assigned to anything.
  2. Optimize Scene Size
    • – Select MAIN || File > Optimize Scene Size
    • Maya goes thru the entire scene and removes unused nodes
  3. Delete History
    • – Select all the objects except the eyelids
    • – Select MAIN || Edit > Delete By Type > History;
  4. Save
    • 020912_08-bigz_02.ma