Maya Grass Tutorial
Maya Grass Tutorial
Paint Effects is Mayas flexible system for interactively painting brush strokes and particle effects on a 2D canvas or on 3D geometry. Preset brushes such as plants, hair, fire, feathers, and others can be used to get amazing effects quickly. This tutorial explains how to create a Maya logo out of growing grass. The focus is on setting and animating the Paint Effects brush and strokes. The following topics are discussed:
I I I I I I I
Brushes vs. Strokes Assigning brushes to a stroke Changing brush parameters Loading brush settings into the template brush Making multiple strokes share a single brush Animating the growth of the grass along the strokes Using the same strokes with other brushes
A Taste of Maya
Note:
Before you start: This tutorial requires Maya scene files. If you havent installed the tutorial files go to the Try Maya section of the Taste of Maya CDROM to install. Starting Maya: You can start Maya by double-clicking the Maya 2.5 Evaluation icon on the desktop or from Start Programs Maya 2.5 Evaluation Maya. In Maya: Once the tutorial files have been installed you will need to set the current project in order to access the Maya scene files. To set the current project from within Maya select File Project Set... and Navigate to the directory where you installed the Maya scene files. Select the directory: Maya_tutorial_data and press OK.
Growing Grass
To create the animated grass, you will apply paint effects strokes to NURBS curves. Then, a preset brush will be applied to all of the strokes and keyframes will be set to make the grass grow along the strokes.
Stroke: A curve attached to an underlying NURBS curve (or curves). The underlying NURBS curve
Once you have the animation on the strokes, you can change the brush to anything you want (for example, a neon, hair, or liquid style brush).
Playback and watch the grass on the M grow. In the following steps, you will complete the logo by making grass grow on the other letters.
2 Load the settings of the supplied brush into the template brush Since you are going to apply the same brush used on the M to the rest of the letters, you need to store the settings of the animated grass brush used on the M for easy access.
I I I
Select stroke1 in the Outliner Press F5 to enable the rendering menu set
Paint Effects Get Settings from Selected Stroke
This is like a copy/paste operation. Maya copies all the attributes from the stroke (including the brush properties that belong to that stroke) and stores them in a template brush. 3 Create strokes and apply the template brush settings I Drag select in the modeling window so the curves for the remaining letters of the Maya logo are highlighted as shown
2 A Taste of Maya
January 2000, Alias|Wavefront, a division of Silicon Graphics Limited. All rights reserved. By using this tutorial, you have agreed to the terms and conditions which can be found in the setup.exe file in the Install Tutorials folder of the Taste of Maya CD-ROM.
Choose Paint Effects Curve Utilities Attach Brush to Curves The settings stored in the template brush are applied.
4 Playback and view I Rewind and press play on the timeline. The grass grows on all the letters.
The grass brush applied to the entire logo 5 Look at the Outliner and Attribute Editor to see what was built I Look in the Outliner to see the newly created strokes
January 2000, Alias|Wavefront, a division of Silicon Graphics Limited. All rights reserved. By using this tutorial, you have agreed to the terms and conditions which can be found in the setup.exe file in the Install Tutorials folder of the Taste of Maya CD-ROM.
A Taste of Maya 3
Outliner showing one paint effects stroke for each NURBS curve in the logo
I
Look in the Attribute Editor (Windows Attribute Editor) to see how the strokes and brushes are related (look at the tabs at the top of the Attribute Editor) The scene file mayagrass_withstrokes.ma has been set up to include the strokes and applied brushes for you up to this point.
This shares the brush of the last selected stroke in the selection list to all of the other selected strokes.
I
Now when you change any brush attribute, all letters update to reflect that change.
4 A Taste of Maya
January 2000, Alias|Wavefront, a division of Silicon Graphics Limited. All rights reserved. By using this tutorial, you have agreed to the terms and conditions which can be found in the setup.exe file in the Install Tutorials folder of the Taste of Maya CD-ROM.
2 Modify stroke density for the Y stem The stem of the Y is a little sparse and could be filled in with a little more grass. This can be easily seen if you advance to frame 100. You can change the sample density on the stroke for the y stem only to help fill this in.
I
Use the Outliner to select only the stroke for the stem of the Y You can find the stroke for the stem of the Y by clicking on each of the strokes listed in the Outliner and watching for the stem of the Y to become highlighted in your camera viewport.
I I I
At the top of the Attribute Editor click on the strokeShape tab for the stroke Set Sample Density of this stroke to 1.5 in the Attribute Editor Although the brushes are shared, the strokes are still independent from one another.
January 2000, Alias|Wavefront, a division of Silicon Graphics Limited. All rights reserved. By using this tutorial, you have agreed to the terms and conditions which can be found in the setup.exe file in the Install Tutorials folder of the Taste of Maya CD-ROM.
A Taste of Maya 5
At the top of the Attribute Editor click on the shape tab for the stroke Locate the Max Clip attribute (within End Bounds section) Drag the Max Clip slider back and fourth between 0 and 1 to see the length of the stroke change in the modeling window. Rewind to frame 1, set Max Clip to 0 and RMB (right mouse button) click on the Max Clip input field and choose Set Key
Advance to Frame 100, set Max Clip to 1 and set another keyframe. Playback to see the grass grow along the letter.
6 A Taste of Maya
January 2000, Alias|Wavefront, a division of Silicon Graphics Limited. All rights reserved. By using this tutorial, you have agreed to the terms and conditions which can be found in the setup.exe file in the Install Tutorials folder of the Taste of Maya CD-ROM.
Frame 40: Grass growing around the small a 2 Key the growth of the stem The small a has a stroke associated with the stem as well. This should start to grow as the animation of the main stroke for the a gets close to the stem.
I
Use the Outliner to select the stroke associated with the stem of the a.
Advance to frame 32, set Max Clip to 0 and set a keyframe Advance to frame 100 set Max Clip to 1 and set a keyframe.
3 Repeat for the remaining strokes. Now, continue this process with the other strokes, keyframing the Max Clip between 0 and 1 as shown below. Or, open the completed file called mayaGrass_final.ma
January 2000, Alias|Wavefront, a division of Silicon Graphics Limited. All rights reserved. By using this tutorial, you have agreed to the terms and conditions which can be found in the setup.exe file in the Install Tutorials folder of the Taste of Maya CD-ROM.
A Taste of Maya 7
Y stem stroke
I I
Max Clip: 0 at frame 1 Max Clip: 1 at frame 75 Max Clip: 0 at frame 74 Max Clip: 1 at frame 100 Max Clip: 0 at frame 1 Max Clip: 1 at frame 100
Y branch strokes
I I
Pointed A stroke
I I
4 Playblast to get a rough idea of motion I Set your time slider range to 1, 150
I I I
Click in the perspective view Open Window Playblast - Press Reset then press Playblast
A test render in the Render View window Dealing with unwanted creeping You may notice that the tips of the a stem and y stems seem to start growing away from the curve before the grass reaches them. This can be corrected by making the a stem and the two y stems share their own separate brush. Then, on that brush set the start time in the flow animation section to 1 to prevent this creeping. This is not a requirement, just something that will prevent the first frame from having grass in unwanted areas.
8 A Taste of Maya
January 2000, Alias|Wavefront, a division of Silicon Graphics Limited. All rights reserved. By using this tutorial, you have agreed to the terms and conditions which can be found in the setup.exe file in the Install Tutorials folder of the Taste of Maya CD-ROM.
1 Select a new brush from the Visor I Continue on from the last step or open mayaGrass_newBrush.ma This file still has the grass applied to it, you will switch the grass brush to a fire brush so Maya is written in fire.
I
In the Visor Window (Windows Visor) locate the brushes directory. Inside that directory locate the fire directory. MMB drag one of the fire brushes to your shelf (fire4 works well).
January 2000, Alias|Wavefront, a division of Silicon Graphics Limited. All rights reserved. By using this tutorial, you have agreed to the terms and conditions which can be found in the setup.exe file in the Install Tutorials folder of the Taste of Maya CD-ROM.
A Taste of Maya 9
2 Apply the fire brush to the strokes I Use the Outliner to select all the strokes of the logo
I I
Note:
3 Change shading mode and adjust global scale I MMB click in the persp window to set focus in that window
I I I I
Press 8 to display the Paint Effects Window Select any stroke, in the Outliner then open the Attribute Editor. Click the grassBlow1 tab at the top of the Attribute Editor and set Global Scale to 50 If you want to see a more detailed version in the Paint Effects window choose Stroke Refresh
Rendered
Fire Brush in Paint Effects window with Stroke Refresh set to Render
I I
Experiment with other attribute settings or other brush presets to get the look you want. The scene mayaLogo_Fire.ma contains a finished version of the fire logo.
If the refresh is too slow, you can set stroke refresh to wireframe, or select all the strokes and lower the displayPercent attribute in the Channel Box.
Tip:
10 A Taste of Maya
January 2000, Alias|Wavefront, a division of Silicon Graphics Limited. All rights reserved. By using this tutorial, you have agreed to the terms and conditions which can be found in the setup.exe file in the Install Tutorials folder of the Taste of Maya CD-ROM.
CONCLUSION
You have now worked through a typical Paint Effects session in Maya and have seen the interactiveness and flexibility of this part of Maya. To recap, the following were the key topics in this tutorial:
I I I I I I
Strokes and Brushes defined Assigning brushes to a stroke Changing brush parameters Making multiple strokes share a single brush Animating the growth of the grass along the strokes using Max Clip. Using the same strokes with other brushes
January 2000, Alias|Wavefront, a division of Silicon Graphics Limited. All rights reserved. By using this tutorial, you have agreed to the terms and conditions which can be found in the setup.exe file in the Install Tutorials folder of the Taste of Maya CD-ROM.
A Taste of Maya 11