Maya 4.5 Fundamentals
Paint Effects is a compelling feature that offers the CG artist a quick and easy way to add all sorts of complex elements to a 3D scene. Simple paint effects such as Airbrush, Markers, and Swirl are included in the brush sets. You can see the potential of Paint Effects in more complex brushes, such as lightning and clouds, but it's the nature effects including flowers, shrubs, grasses, and trees that show off the best of what Paint Effects can do. All this magic comes from a feature referred to as tubes, which follow or continue the path of a stroke to simulate organic growth. By basing the 3D portion of Paint Effects on tubes that exist in 3D space, you can apply the entire gamut of changes over time and space. You can create growth, dynamics, lighting, turbulence, and so forth with the 3D effects that come from the brush's paint stroke. The paint stroke is attached to a NURBS curve, so it can be fully animated. You can edit the curve to grow, undulate, change shape, and move, and the brushes applied to the stroke will follow the curve. In the same manner, the brush type applied to a paint stroke can be changed so that a row of oaks, for example, can become a row of rose bushes. Opacity, luminosity, and other attributes can be built right into the brush; with these attributes, you can paint a luminous glowing lightning bolt just as easily as you'd paint a semitransparent raindrop or fully opaque ivy vine. With all these varied options, the palette of available 3D brushes is boggling stars and galaxies, fire and lightning with inherent turbulence animation, trees and grasses that can be set to rustle in the wind, flowers and bushes that can grow as though in time-lapse photography, and much more. Beginners will delight in watching an experienced animator use Paint Effects. Using Paint Effects is fast, fun, and easy. Brushes and Strokes
A 3D brush is much different from a paintbrush. In Paint Effects, the brush is a collection of settings that control the stroke's appearance and behavior. You can find all the attributes for creating Maya brush types under the Brush section in the Attribute Editor or in the Paint Effects Brush Settings dialog box (accessed by Hotbox | Paint Effects | Template Brush Settings; referred to in this chapter as "the Brush Settings dialog box" for simplicity). However, it's easier to create a brush by modifying one of the preset types. You can view the palette of preset brushes in the Visor (hotkey: Alt+v; Window | General Editors | Visor on the menu; or Hotbox | Paint Effects | Get Brush). You might need to change the active tab in the Visor to get the brush list to appear. In Figure 14.1, the Paint Effects tab is selected, and the brush categories are listed in the Visor's left column. Figure 14.1. The Visor lists all the preset brush types.
tip If the Visor doesn't show the tabs you need, you can reconfigure it to display the full set, as shown in Figure 14.1. Choose Tabs | Revert to Default Tabs from the Visor menu.
A stroke is what's created when you paint with the Paint Effects tool, and it uses the settings of the brush type you've selected. When you select a brush in the Visor, it activates the Paint Effects feature. You can paint on the grid (the ground X-Y plane) or designate any NURBS object to be paintable. The cursor becomes a pencil-like icon, and when you click and drag in the viewport, a paint stroke is created. This stroke is attached to a curve drawn over the surface of the object you're painting. You can offset the stroke from the surface curve for certain effects, such as fog patches that hover over the ground. After painting the stroke, you can adjust the settings attached to it; to do that, select the stroke, and then choose Display | Show | Show Geometry | Stroke Path Curves. As with other scene elements you've created in Maya, all the stroke and brush settings are available in the Channel Box and Attribute Editor. If you draw a curve with a pressure-sensitive tablet, the pressure values are recorded along the stroke as they change. You can also use any curve you've drawn or projected in Maya as a stroke and attach a brush to it. There are simple strokes and strokes with tubes (or "growth strokes"). Simple strokes are like multiple stamps that, when placed close together, form a single line created by brush motion. With growth strokes, as you drag the mouse to create the stroke, this action creates tubes that grow, separate, or expand to continue outward in several directions from the stroke. For example, if you're painting a vine, tubes simulating leaves and tendrils can continue to "grow" from the main stalk. Tubes grow one segment for each step of the growth process; segments are straight, so increasing the Segments setting makes the segments in the tube smaller and thus produces a smoother appearance. Another important setting is Tube Completion. When it's enabled, the tubes continue growing automatically for their full life span (defined by the number of segments). When it's disabled, the tubes at the end of the stroke you draw will look more "cut off" than the tubes at the beginning of the stroke (as in half-grown trees or vines with no leaves). Usually, you'll want to leave this setting enabled so that the current growth completes after you stop drawing. Enabling Paint Effects
Because using Paint Effects can require a lot of system resources, some people leave it disabled when they aren't planning to use it. If it seems as though Paint Effects hasn't been enabled on your system, you can enable it by choosing Window | Settings/Preferences | Preferences on the main menu; in the Preferences dialog box, select Modules in the Categories list box. Select the Load Paint Effects on Startup check box (if it's not already), and then close the Preferences dialog box and restart Maya. Paint Effects is then added to Maya's Rendering menu. You need to add the Paint Effects menu to the Hotbox, too. To do this, simply hold down the spacebar to open Hotbox | Hotbox Controls | Show All. Starting Paint Effects
When you want to apply Paint Effects to a surface, you must first designate a surface to be made paintable. This action does not modify the object; rather, it simply tells Paint Effects that this surface is prepared to receive brush strokes. If you want to paint a different surface or if you have restarted Maya, you'll need to use the Make Paintable option again. This feature is in the Rendering menu under Paint Effects | Make Paintable. You can paint 3D Paint Effects only on NURBS surfaces, the view plane, or the ground plane. However, you can work around this by creating non-renderable NURBS surfaces that are similar to the polygonal surfaces you want, and then paint on these "hidden" NURBS surfaces. Using Paint Effects
After you have designated a surface as paintable, you can then paint in one of the following three modes:
To change the current panel to the Paint Effects panel, press 8 or choose Hotbox | Panels | Panel | Paint Effects. You go into Paint Scene or Paint Canvas mode (depending on the mode you were in last). To toggle between Paint Scene and Paint Canvas mode, RMB-click in the Paint Effects panel and choose Paint Scene or Paint Canvas. Paint Canvas mode is like a separate 2D painting area and has no relation to your 3D scene. Because this chapter addresses only the 3D paint options, you'll choose Paint Scene. Paint Effects then does a quick-shade rendering of your scene file and places this 2D image into the view. This image allows you to paint into the depth of your 3D scene. When you test-render, you'll notice that the brushes you use in your environment scale appropriately into the distance. When you orbit the scene to paint in another area in Paint Effects Canvas mode, the paint effects are reduced to lines. When you've found your new viewpoint, you can have Paint Effects render the previous strokes again by clicking the Redraw Paint Effects View button (refer to Figure 14.3). If you add many strokes of different types, redrawing can become slow. You'll find it helpful to hide strokes you don't need to see for your current Paint Effects work. To do this, open the Outliner to see all the strokes listed. Maya names the strokes with the type of brush used when the stroke was made, so it's easy to find the strokes you want to temporarily hide (see Figure 14.4). After selecting the brush strokes, you can hide them with the Ctrl+h hotkey or with Display | Hide | Hide Selection on Maya's main menu or in the Hotbox. Figure 14.4. Selecting strokes to hide in the Outliner.
While working with Paint Effects, you might want to leave the Visor open to select other brushes. After you've selected a brush, Paint Effects displays a red circle cursor (refer to Figure 14.3) to give you an idea of the global scale of the objects to be "planted" when you begin painting. This cursor follows the surface of the paintable object as you move it around and is a good indicator of whether the object you intend to paint on has truly been made paintable. You can adjust the brush size by holding down the b key and LMB-dragging left and right. You can also open the Brush Settings dialog box by choosing Brush | Edit Template Brush in the Paint Effects panel, or by clicking Hotbox | Paint Effects | Template Brush Settings. At the top of the dialog box, you'll see the Global Scale attribute. trap Having trouble with seeing or sizing the Paint Effects brush is a common problem with video graphics card drivers. If you can't get a red circle to appear that follows your pointer, you might want to revisit the graphics card information in this book's Introduction. In a large scene, the default brush size can cause the circle cursor to look like a tiny red point, so you might need to increase the brush size quite a bit to see it clearly.
After scaling the brush to create your stroke at the size you want, you can adjust the brush width if needed. To adjust the brush width, press and hold Shift+B while LMB-dragging left and right. This method works only when you're creating growth strokes; simple strokes such as "snake" are just scaled, as with Global Scale adjustments. Note that with growth strokes, stroke density is adjusted elsewhere; making the brush larger simply spreads the same number of growths over a larger area. Another attribute to adjust is the brush offset, controlled by holding down the m key while LMB-dragging left and right. This action raises the brush stroke from the Paint Effects curve so that you can create a 3D stroke above or below the surface. For brush types such as smoke or snake, this option is invaluable. To exit Paint Scene mode, choose Panels | Perspective from the menu. To quit the Paint Effects painting mode, click the arrow pointer in the Tool Box, or use the hotkey q. Tutorial: Learning Paint Effects In this tutorial, you'll try some of the Paint Effects options on a NURBS surface in a small scene. Load the scene file noted next to the CD icon so that you have a starting point of a premade NURBS plane to paint on.
|