Search form

'Learning Maya 7': Texturing the Orb — Part 3

In the latest excerpt from Learning Maya 7 | Foundation, Marc-AndrGuindon and Cathy McGinnis finish mapping the orb.

All images from Learning Maya 7 | Foundation by Marc-André Guindon and Cathy McGinnis. Reprinted with permission.

This is an excerpt in a series from Learning Maya 7 | Foundation by Marc-André Guindon and Cathy McGinnis from Alias|Learning Tool. In the Texturing the Orb excerpts, you will learn to texture a polygonal meshing. Even though polygons have a default setting for UV parameters onto which textures can be applied, you will need to adjust these settings for each specific application. You can use special polygon tools to assign and modify these kinds of values on the orb.

You will first apply texture projections in order to create UV coordinates on the polymesh. Then you will texture map the orb using a series of texture maps imported as file textures.

In these Texturing the Orb excerpts, you will learn the following: How to project textures on polygons, how to manipulate projections; how to use the Texture Editor; how to use the Paint Selection Tool; how to manipulate UVs; and how to animate a texture.

Finish Mapping the Orb

Now that the main frame of the orb is textured, the remaining objects can be textured using cylindrical mapping and automatic mapping. Cylindrical projection works just like the planar and spherical projections, but the texture is wrapped around a cylinder. Automatic projection will let Maya decide how to texture an object from multiple planar projections. For example, Maya will use six planar projections (top, bottom, left, right, front and back) to generate a UV map on an object.

The darker shader (left). Cylindrical projection (right).

1. Make a darker metal shader

  • Select the metalBlinn shader.

  • In the Hypershade, select Edit > Duplicate > Shading Network.

  • Select the duplicated metalBlinn1.

  • In the Attribute Editor, click on the mapping arrow at the right of the Color attribute to follow the connection to the metalFile1 texture.

  • In the Color Balance section, set the Color Gain slider to gray.

Doing so will darken the metal file texture.

  • Assign the new darker shader to the tube and the display objects.

  • Create a new red Phong material and assign it to the lens object.

2. Cylindrical mapping

  • With the tube selected, select Polygon UVs > Cylindrical Mapping.

  • Set the projection as follows:

Tip: Use the red T on the manipulator to toggle manipulator types and gain access to the Rotate Tool.

3. Automatic mapping

  • Select the display object.

  • Select Polygon UVs > Automatic Mapping > box.gif

The automatic mapping options are displayed.

  • Set the options as follows:

    Planes to 6;

    Optimize to Fewer Pieces;

    Layout to Into Square;

    Scale to Uniform.

This specifies that you want to project with six planes (like a cube), and have Maya make as few pieces as possible.

  • Open the UV Texture Editor to see the results of the automatic mapping.

Animated Texture

The only thing left to do on the orb is to set up an animated texture on the center face of the display object. To do so, you will first tweak the UVs of that single face to place them into a square to cover the entire texture area. Once that is done, you will be able to set up an animated texture using the support files.

1. Tweaking UVs The center face of the display object should have its UVs in a perfect square so that you can use an animated texture on it. There are two simple ways to achieve this. In this step, you will do it manually, using the UV Texture Editor and the Snap to Grid option.

  • Select the center face of the display object.

  • In the UV Texture Editor, RMB and select UV from the marking menu.

This enables the UV selection mask

  • Click+drag a selection box over the selected face to select its UVs components.

Selecting UVs in the Texture Editor (left). Snap each UV into a square (right).

You should now see the four UV components that you need to snap to each corner of the grid.

  • Select each UV, then hold x to turn on Snap to Grid and translate them to their respective corners.

2. Unitize UVs

Another easy way is to use the Unitize UVs operation, which will reset the selected UVs into a perfect square.

  • Select the center face of the display object.

  • Select Polygon UVs > Unitize UVs.

Note: If the entire object is selected instead of only a single face, every polygon will be reset into a square.

3. Create a new shader

  • Create a newLambert material and assign it to the displays center face.

  • Rename the lambert animTxtLambert.

  • Map a File texture to the Color attribute of animTxtLambert.

  • Rename the File texture animTxtFile.

  • Browse for the text.tif texture file.

4. Animate the texture

  • Select the place2DTexture node for the animTxtFile you have just created.

  • Go to frame 1 in the Time Slider.

  • LMB+click in the second Offset field (Offset V) in the Attribute Editor, and select Set Key.

The texture (left) to be animated. The final textured orb (right).

This will set a keyframe for the V parameter of the Offset attribute.

  • Go to frame 10 in the Time Slider.

  • Set the same Offset attribute to -1.

  • LMB+click and Set Key again.

  • In the Graph Editor, select the curve and set Pre Infinity and Post Infinity to Linear.

This will ensure the texture plays constantly throughout the animation.

  • Playback your scene to see the texture being animated.

5. Save your work

  • Save this file as 10-texturedOrb.ma.

Conclusion

You now have a good understanding of texturing polygons in Maya. You have experimented with all the projection types and several other essential tools and actions.

In the next lesson, you will refine the models shading groups using the Interactive Photorealistic Rendering (IPR) and other rendering tools.

Find out more about building an orb and other topics in Learning Maya 7 | Foundation by Marc-André Guindon and Cathy McGinnis: Alias|Learning Tools, 2005. 642 pages with illustrations and DVD. ISBN: 1-894893-74-3 ($69.95). Check back to VFXWorld frequently to read new excerpts.

Primary author Marc-André Guindon is the founder of Realities Studio, a Montreal-based production facility. An advanced user of both Maya and Alias MotionBuilder, Marc-André and Realities have partnered with Alias on several projects, including The Art of Maya, Learning Maya 6 | MEL Fundamentals and the series Learning Maya 7. He had developed plug-ins and tools for films and games, including the Outlaw Game series. He served as td on XXX2, State of the Union, Scooby-Doo 2 and Dawn of the Dead.

Contributing author Cathy McGinnis is an Alias certified instructor teaching at the Media Design School in Auckland, New Zealand. Cathy was previously a technical product specialist for Alias, specializing in rendering in both Maya and mental ray for Maya. She has been a contributor to several Alias publications, including Learning Maya | Rendering and Learning Maya | Foundation.

randomness