Sometimes you'll want to map one image across two or more surfaces. For that you can use a projection map. The default projection type is planar, which acts like a slide projector pointed at a surface. Other projection types include spherical and cylindrical, which project an image from a shape that surrounds the surface (Figure 15.71). Figure 15.71. A checkered texture is mapped to spheres using three different projection types: (left to right) cylindrical, planar, and spherical. To map a texture as projection: 1. | Open the Hypershade, create a Lambert material, and assign it to a NURBS plane and a NURBS sphere (Figure 15.72). Figure 15.72. A NURBS sphere and a plane. | 2. | Double-click the Lambert in the Hypershade. The Attribute Editor for the Lambert opens. | 3. | In the Attribute Editor for the Lambert, click the Map button next to the Color slider . The Create Render Node window appears. | 4. | Click the radio button next to "As projection" (Figure 15.73). Figure 15.73. The "As projection" radio button has been selected in the Create Render Node window. | 5. | Click the File button. The Attribute Editor for the projection appears. A place3dTexture node appears in the Perspective view. | 6. | Click the file1 tab at the top of the Attribute Editor. The Attribute Editor changes to show the options for the file texture. | 7. | Click the Folder icon next to Image Name. The file browser appears. | 8. | Browse for and open an image of your own. | 9. | Click the Perspective view, and press to switch to textured mode. The place3dTexture node is visible in the Perspective view. The image is visible on the surface, but it is stretched out because it is being projected on from the side (Figure 15.74). Figure 15.74. The planar projection is projecting the image across the two surfaces from the side. This causes the image to be stretched along the plane. | Tip If you move a surface with a projection texture mapped to it, the surface will appear to be moving through its texture when it is rendered out. To solve this problem, select the surface, and then from the Texturing menu select Create Texture Reference Object. To adjust a projection: 1. | Projection-map a texture onto a plane as in the previous task, "To map a texture as projection." | 2. | Select the place3dTexture utility in the Perspective view (Figure 15.75). Figure 15.75. The place3dTexture utility has been selected in the Perspective view. You can move, rotate, and scale this node the same way you would for any object. The line coming out from the center indicates the projection directionin this case, on the side of the planeand we want it to project on the top. | 3. | Rotate the plane 90 degrees in the X axis. The image is no longer stretched; however, it doesn't fit precisely on the surface. | 4. | With the place3dTexture still selected, press to open the Attribute Editor. The Attribute Editor for the place3dTexture node opens. | 5. | Click the "Fit to group box" button. The place3dTexture is automatically resized to that of the plane, and the image now fits (Figure 15.76). Figure 15.76. Now that the place3dTexture utility is oriented to the surface, the image is projected across the two surfaces. | Tip If you move or rotate the place3dTexture, the image on the surface will move or rotate. If you scale it up, the image will scale up. If you scale it down, the image will scale down and be tiled (Figure 15.77). Figure 15.77. The place3dTexture utility has been scaled down, rotated, and moved. Textures, especially projected ones, often appear blurry in the view even though they render clearly. However, you often need the image to appear sharper in order to place the texture. To improve the quality of a texture image in a view: 1. | Following the steps in the previous tasks, projection-map a checkered texture onto a sphere (Figure 15.78). Figure 15.78. A checkered texture is projected onto a sphere. It appears very blurry and does not accurately represent how it will look when it is rendered. The texture on the surface will appear very blurry. | 2. | Select the sphere. | 3. | Open the Hypershade and click the Graph Materials on Selected Objects icon . The material with all of its connections appears in the work area of the Hypershade. | 4. | Double-click the material in the Hypershade. The Attribute Editor for the material appears. | 5. | Under Hardware Texturing in the Attribute Editor, click the arrow to expand the options (Figure 15.79). Figure 15.79. Hardware Texturing options are visible in the Attribute Editor for a material. By increasing the "Texture quality" setting to High, the checkers will become clear. | 6. | Change the "Texture quality" setting to High. The blurry checkers on the sphere become sharper (Figure 15.80). Figure 15.80. The checker texture is much sharper now that the texture quality for Hardware Texturing has been increased. | Tip About the 3D Paint tool The 3D Paint tool allows you to paint directly on a surface. You can create a new texture image from scratch with this method, and Maya will create a new image file. It's important to make sure you've set your project (File > Project > Set) before you begin painting, because the current project will determine where this image ends up. When you save the scene after painting, a folder named after your scene is created in the 3dPaintTextures folder of the project you're currently set to. Any images that were created by painting will be put in that folder. You can also paint on a surface that already has an image file textured on itfor example, to add dirt or other details to an existing image. To paint directly on a surface: 1. | Open the Hypershade, create a Lambert material, and assign it to a NURBS sphere. | 2. | Select the sphere. | 3. | From the Texturing menu, select the box next to 3D Paint Tool. The 3D Paint Tool Settings window opens (Figure 15.81). Figure 15.81. The 3D Paint Tool Settings window includes many controls that determine the look of your brush strokes. | 4. | Scroll down until you see File Textures (Figure 15.82). Figure 15.82. Under File Textures in the 3D Paint Tool Settings window, you can assign a texture to the material for a selected object. You cannot paint on a surface that does not have a file mapped to its color. If necessary, you can change the image format that will be created. | 5. | Click the Assign Textures button. The Assign File Textures window appears. You can increase the resolution of the texture here if you need a highly detailed texture. The default of 256 by 256 will suffice for now (Figure 15.83). Figure 15.83. Once you click Assign/Edit Textures, you can paint, because a file texture has been connected to the material for the object you want to paint. | 6. | Click Assign Textures. A file texture has now been connected to the material so you can paint. | 7. | Click in the Perspective view, hold down , and then using the middle mouse button drag from right to left to get the brush down to size. The red circle, which represents brush size, should shrink. | 8. | Click and drag on the surface to paint on it. A mark appears on the surface (Figure 15.84). Figure 15.84. The paintbrush has been dragged across the sphere, producing this black mark. | To use the 3D Paint tool: 1. | Continue with the sphere from the previous section. If the paintbrush is not visible or the tool options are no longer open, select the sphere, and then from the Texturing menu select the box next to 3D Paint Tool. | 2. | Click the swatch next to Color in the 3D Paint Tool Settings window under the Flood section (Figure 15.85). Figure 15.85. You can choose a color to flood the whole object with by clicking the Color swatch. The Color Chooser appears. | 3. | Choose the yellow swatch at the top of the Color Chooser, and click Accept. | 4. | Click Flood Paint. The sphere turns yellow. | 5. | Paint a smiley face by clicking and dragging on the surface (Figure 15.86. Figure 15.86. A smiley face has been painted on the sphere with three brush strokes. | 6. | Click the Get Brush button , which is to the right of Paint Effects in the 3D Paint Tool Options window. The Visor window opens. | 7. | Scroll down in the Visor, and click the Hair folder. Several hair types appear (Figure 15.87). Figure 15.87. You can choose from a variety of brushes to use with the 3D Paint tool in the Visor. Here we see the brushes in the Hair folder. | 8. | Click on the hair of your choice. | 9. | Paint some hair on your smiley-face sphere (Figure 15.88). Figure 15.88. Hair has been painted on the sphere by using one of the Paint Effects brushes. | 10. | Clear the surface texture by clicking the Flood Erase button under the Flood section. The texture is cleared, and the original gray surface is ready to be repainted. | Tip After using a Paint Effects brush, you can return to a normal brush by clicking one of the Brush Profile buttons next to Artisan in the 3D Paint Tool Settings window (Figure 15.89). Figure 15.89. To return to a normal brush, choose from one of the profiles of the Artisan brushes. By decreasing the opacity in the 3D Paint Tool settings, you can paint on a surface but still see the color beneath your brush strokeshelpful if you're trying to make a surface appear dirty. You can use this tool to paint areas roughly to mark the different parts of a surface. You can then open the image file (which is created once you save the scene) in Adobe Photoshop and paint the details there. These same steps can be used for other attributes, such as Transparency and Displacement. Just select the desired attribute from the dropdown menu under File Textures. |