Paint Effects Overview

table of contents

First included with Maya 2.5, 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 effectsincluding flowers, shrubs, grasses, and treesthat show off the Paint Effects capability to create fully formed , complex, and fractal 3D organics.

All this magic comes from a feature referred to as tubes , which follow or continue the path of the stroke to simulate organic growth. By basing the 3D portion of Paint Effects on tubes that exist in 3D space, the entire gamut of time and space changes can be applied. You can exhibit 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 in the same way you'd paint a semi-opaque raindrop or fully opaque ivy vine.

With all these varied options, the palette of available 3D brushes is bogglingstars 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. In contrast to the sometimes painstaking process of creating an animation, using Paint Effects looks 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 appearance and behavior of the stroke. You can find all the attributes for creating the brush types in Maya 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 a Maya dialog box called the Visor (hotkey: Shift+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 13.1, the Paint Effects tab is selected, and the brush categories are listed in the Visor's left column.

Figure 13.1. The Visor lists all the preset brush types.

graphics/13fig01.gif

tip

If the Visor doesn't show the tabs you need, you can reconfigure it to display the full set, as shown in Figure 13.1. Choose Tabs Revert to Default Tabs on 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 (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 select its curve to adjust the settings attached to it; to do that, select the stroke, and then choose Display Show Show Geometry Stroke Path Curves. All the stroke and brush settings are in the Channel Box and Attribute Editor, as with other scene elements you've created in Maya. If you drew the 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 paint strokesa 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.

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 those NURBS surfaces.

Using Paint Effects

When you have designated a surface as paintable, you can then paint in one of the following three modes:

  • Model View mode Painting in one of the normal 3D panels (in either Wireframe or Shaded mode). When painting in this mode, you see only a wireframe representation of your stroke and brush type (see Figure 13.2).

    Figure 13.2. Working with Paint Effects in Model View mode renders the strokes as wireframe.

    graphics/13fig02.gif

  • Paint Scene mode In this mode, when you switch into the Paint Effects panel, you'll see a shaded preview of your scene file. Paint Scene mode, shown in Figure 13.3, looks like the Perspective view, and can give you a good idea of what your paint strokes will look like by rendering them as you create them (although your display updates more slowly in this mode).

    Figure 13.3. Painting flames in the Paint Scene mode.

    graphics/13fig03.gif

  • Paint Canvas mode Starts out as a white empty "canvas" when you switch into the Paint Effects panelgood for testing out brushes before trying them in your scene. Paint Canvas mode works as a sort of advanced 2D paint mode to create textures or paintings that can be saved as image files, and can store the depth and alpha channels of brushes. If you want to paint on the view plane, you need to use Paint Canvas mode.

To change the current panel to the Paint Effects panel, you press 8 or choose Hotbox Panels Panel Paint Effects. You will be in 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. It looks as though you're working in 3D, but to Paint Effects, it's only a 2D image you are painting on. 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 back to Figure 13.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 13.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 13.4. Selecting strokes to hide in the Outliner.

graphics/13fig04.gif

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 13.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 pressing Ctrl+b, 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 cannot 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. For example, you might have set flames or trees to appear at the correct overall height for each flame or tree, but you want to fill a swath with flames or trees. 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" will just be 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 on the menu. To quit the Paint Effects painting mode, simply click the arrow pointer in the Tool Box.

Tutorial: Learning Paint Effects

In this tutorial, you'll try some of the Paint Effects options on a NURBS surface you create:

  1. Start with a blank, empty workspace in Maya. Make sure you have Paint Effects loaded (see the previous section "Enabling Paint Effects"). Tap the spacebar with the mouse over the Perspective view to switch to the Four View mode. Create a Directional light (Hotbox Create Lights Directional Light), and set its Rotate X to 90 . Under the light's Shape node in the Channel Box, enable the Depth Map Shadows option by typing a 1 or On and pressing Enter. Click Ctrl+z Cone option box, and reset the settings in the Cone Options dialog box. Set Radius to 300 and Height to 100 , and then click the Create button. Press Shift+F to "fit all" so that you can see the entire cone in all four views.

    graphics/ch13_icon.gif

    tip

    If the Perspective view does not display the cone, it's likely a problem with the perspective camera's clipping plane. To fix this, choose View Camera Attribute Editor in the Perspective view to open the perspective camera attributes, and set the Far Clip Plane to 10000 .

  2. Set the cone to display in high detail (hotkey: 3 ), set the Perspective view to Shaded mode (hotkey: 5 ), and tap the spacebar to return the Perspective panel to full screen. To make the cone paintable, select the cone, and click Hotbox Paint Effects Make Paintable, as shown in Figure 13.5.

    Figure 13.5. The first step in Paint Effects: Making an object paintable.

    graphics/13fig05.gif

  3. Switch to Paint Scene mode (hotkey: 8 ). If you see a blank white panel, RMB-click in the panel and choose Paint Scene. On the Shading menu, make sure the options for Textured and Use All Lights are enabled. Choose Hotbox Paint Effects Get Brush on the menu in the Paint Effects panel to open the Visor (hotkey: Shift+V ). Click the Paint Effects tab, expand the Brushes folder in the left-hand column if necessary, select the Flowers folder, and then click Daisy. Minimize the Visor.

    tip

    You browse the swatches in the Visor just as you do in any Maya dialog box: Alt+MMB to pan and Alt+LMB+MMB to zoom.

  4. Hold the cursor over the cone and see if the Paint Effects Tool cursor appears. The daisy's default size is quite small compared to the cone. To increase the brush's Global Scale attribute, you could press and hold the b key while clicking and dragging to the right on the cone. However, for this tutorial, you'll manually set the size to a fixed amount: Set it to 40 by opening the Brush Settings dialog box (hotkey: Ctrl+b ) and changing the Global Scale setting. Close the dialog box, and draw a stroke on the cone, near the outer edge and about a third of the way around the cone. You should see daisies appear on the cone. Even though the last daisies you paint are only half-created when you release the mouse button, they finish growing to their full size because of the Tube Completion setting.

  5. In the Channel Box, under Shapes, you'll find the settings for the stroke you created. The Sample Density attribute specifies how many daisies appear for a given length of the stroke. Try setting it to 2 or 3 to see the result.

    note

    How fast or slow you draw the stroke can affect the density, too. Because Paint Effects uses "sampling" when creating a stroke's underlying curve, a stroke drawn quickly has fewer samples and thus looks less dense than a stroke drawn more slowly.

  6. Select Sunflowers from the Visor. Note that you need to adjust the brush's Global Scale setting each time you change brushes because all the brush settings (the "template brush") change when you select a new brush. Open the Brush Settings dialog box, and set Global Scale to 20 . Notice that the brush size isn't necessarily related to the plant's overall size. The brush tip is small, but the sunflowers you paint are much taller than the daisies. You might want to make a few test strokes that you can undo later if needed (hotkey: z ) to fine-tune the Global Scale settings. When you're satisfied with the plant's size, draw a stroke of sunflowers above the daisies.

    tip

    If the Paint Effects panel is partially covered by another dialog box while it's rendering the stroke, the image might not be displayed in the area that's covered. Click the Redraw Paint Effects View button to regenerate the view if needed. Paint Effects are generated in the panel in the same way they appear when rendering. Therefore, the time it takes for your painted effects to "pop up" onscreen is a good indicator of how long rendering will take.

  7. Use Alt+LMB to orbit the Paint Effects view. Notice how the painted objects are reduced to lines during the orbit. Select the Roses brush from the Visor, and set the Global Scale to 28 in the Brush Settings dialog box. Next, increase the brush width by pressing Shift+B while LMB-dragging to the right. The red brush circle will increase as though you had raised the global scale, but when you paint, you'll see that the roses are the same size as before, but appear over a broader area. Paint a new stroke above the sunflowers. Then set Sample Density in the Channel Box (under Shapes) to 3 , and you'll see that the roses look denser and fill up more of the stroke area you drew, as shown in Figure 13.6.

    Figure 13.6. Three rows of flowers.

    graphics/13fig06.gif

    note

    The Paint Effects can be set to automatically regenerate (Rendered mode), or to regenerate only when you click the Redraw Paint Effects View button (Wireframe mode). This setting, under Stroke Refresh on the Paint Effects menu, is normally left at Wireframe mode because of the potential length of regeneration time.

  8. Exit Paint Effects by switching back to the Perspective panel (Panels Perspective Persp). The flowers' wireframe representation is noticeably thinner than it looked in Paint Effects. To see more lines for the roses, select the Roses stroke, and set the Display Percent to 100 in the Channel Box, under Shapes. If you accidentally deselect the Roses stroke, open the Outliner and select the strokeRoses1 item. You could increase the display percent for all three strokes, but interaction with Maya would slow down.

  9. Orbit the Perspective view until you're looking across the cone, up close to the flowers, as shown in Figure 13.7. In the Perspective view, choose View Camera Attribute Editor, and in the Camera Attribute Editor, set the Background Color under the Environment section to white so you can see the paint effects you added more easily. Close the Attribute Editor and render this view by clicking the Render button or choosing Hotbox Render Render Current Frame. Notice that the flowers cast shadows and seem thicker than the wireframe would imply.

    Figure 13.7. The rendered view of the three rows of flowers.

    graphics/13fig07.gif

Using Paint Effects can be quite straightforward, and it integrates well with standard geometry and lighting. To compare your scene with ours, check the scene file noted below the CD icon.

graphics/ch13a_icon.gif


Maya 4. 5 Fundamentals
Maya 4.5 Fundamentals
ISBN: 0735713278
EAN: 2147483647
Year: 2005
Pages: 201

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net