Creating Animated Wireframes Using Some Basic Paint Effects Techniques

By Eric Keller 12/2003

This tutorial expands on a very simple technique I developed while toying with Paint Effects. The basic premise is straight-forward. All you need to do is create a NURBS object, select the isoparms, duplicate surface curves, and attach the Paint Effects neon glow brush to these curves and then hide the original NURBS object. Then you can use various techniques to animate the max clip on the brush to create the effect of a wireframe contructing itself . Additionally you can animate the original NURBS object and the strokes will be animated as well through history. The bulk of this tutorial focuses on some ideas on how to expand on this technique to generate some cool effects.

What you will need:

- Maya 4.0+ any platform.

- An beginning to intermediate knowledge of Maya and Maya's Paint Effects module.

Some tips on creating a quick mushroom:

- Create a NURBS cylinder 8 sections and 8 spans.

- Grab the vertices on the top span and scale them down to a point.

- Grid snap these vertices in Y.

- Grab the hull beneath these vertices, scale them down a bit, then grid snap them in Y so they are at the same height as the first set of vertices you scaled.

- Grab each hull, scale and translate until you have a nice looking shroom.

- Use the bend and twist deformers to make the musrhoom a little interesting, then delete history so that it is frozen in that pose.

- The mushroom object should have the section curves running in th U direction and the span curves running in the V direction. You can verify this by selecting the mushroom, and then switching to component mode. Zoom in towards the base of the mushroom should reveal a tiny U and a tiny V that indicate which direction the curves run in.

- If the U and V coordinates are the opposite of what I've described above you can swap them using "Reverse Surface Direction" under Edit NURBS in modelling mode. In the option box choose "swap".

************************

Part 1: Create an Electric Mushroom

First let's create our wireframe object. We'll do a mushroom since it is simple and iconic.

- Use the hulls to fashion a simple mushroom out of the cylinder (tips on mushroom creation are found in the sidebar).

- From the Shading menu at the top of the perspective window choose Shade Options>Wireframe on Shaded.

- Right-click over the mushroom object and choose isoparms.

- Carefully shift-click to grab each isoparm that runs up the mushroom.

- From the Edit Curves menu in modeling mode choose Duplicate Surface Curves.

- In the Outliner select all of these curves and group them.

- Name the group "curves."

- From the modify menu select prefix hierarchy.

- In the dialog box type "U_".

- Hit the enter key and the group should be renamed "U_curves."

- All the curves in the group should now be renamed "U_duplicatedCurve1", "U_duplicatedCurve2", "U_duplicatedCurve3",etc...

- Do the same for the isoparms in the V direction so that you end up with a group named "V_curves" with all members renamed "V_duplicatedCurve1", "V_duplicatedCurve2", "V_duplicatedCurve3", etc...

This is how I like to organize things, it's not absolutely necessary but it makes things easier further on down the road. As long as the curves are organized, separated, and named differently the tips in this tutorial should be easy to follow.

Now I should probably tell you that there is a very handy script on Highend3D.com that will instantly create curves from isoparms on any selected NURBS object. Its called nurbsExtractCurves.mel. It's good to do it the long way at least once just so you understand what we're trying to do. The script allows you to create curves in either the U or the V direction so you can use the same organizing scheme.

- Download the script and put it in your scripts folder.

- To generate curves in the U direction, select the object and type "nurbsExtractCurves -u 1 0" in the command line.

- To generate curves in the V direction, select the object and type "nurbsExtractCurves -v 1 0" in the command line.

- You can open the script in the script editor to see additional option instructions (in the comments at the beginning of the script code.)

- From the visor (Window>General Editors>Visor...) select the neonYellow brush from the Glows folder. Make sure this is the active brush.

- Use the Paint Effects tool to draw a little curve somewhere out of the way on the grid.

- In the Outliner select strokeNeonYellow1.

- From the Paint Effects menu in rendering mode select Get Settings from Current Stroke.

- In the Outliner shift grab all the curves in the U_curves group and select Attach Brush to Curves from Paint Effects>Curve Utilities.

- Grab all the newly created strokes in the outliner, and group them.

- Rename the group "strokes" and modify the prefix (as described above) so the the group is now named "U_strokes" and all members are renamed "U_stroke1", "U_stroke2", "U_stroke3", etc...

- Do the same for the curves in the V group using the same stroke settings.

-Select all of the strokes in both groups in the Outliner and choose Share One Brush from the Paint Effects menu. Now you can change all the brushes at once by modifying one set of parameters in the Attribute Editor.

-Select and delete the strokeNeonYellow1 you scribbled in the perspective and its associated curve from the Outliner window.

-Hide the original NURBS mushroom and do a test rendering. You should see a nice glowing electric mushroom wireframe.

-If you see nothing, select a stroke in the Outliner, open up the Attribute Editor and try increasing the Global Scale of the brush. All of the brushes should update in your test renders if you have brush sharing on.

-The neon brushes render fairly quickly which is another advantage to this technique.

 

 

Part 2: Animating the Electric Mushroom

- Because of the history on the brush strokes you should be able to easily animate the wireframe mushroom by animating the original NURBS mushroom.

- Unhide the NURBS mushroom and try applying a nonlinear deformer like Bend or Twist to the mushroom.

- Set some keyframes on the Curvature of the Bend and the End Angle of the Twist deformers and see what happens. The neon Paint Effects strokes should inherit the animation from the NURBS mushroom.

- Hide the NURNS mushroom and render out a short sequence.

- Unhide the NURBS mushroom and assign a black surface shader to the NURBS geometry.

- Rendering a frame should reveal a "hidden line" version of the wireframe (you may want to increase the brush size a little more to improve the look of this).

- Assign a dark blue blinn shader to the mushroom and adding few lights you can create a simple "tron" like effect

- To return to a wireframe version just hide the NURBS geometry.

 

Part 3: Animating Paint Effects "Tracers"

- Save your mushroom scene and create a new scene.

This tutorial should give you some ideas on how you can use Paint Effects to animate a "tracer" effect using a technique similar to the ones described in part 1.

- Draw a curve in the perspective window however you like.

- Push and pull the CVs up or down on the Y axis so that the curve is 3 dimensional.

- In the modelling menu set select the option box for Edit Curves>Rebuild Curves. In the dialog box choose Uniform, 0 to # spans. Number of Spans should be set to 100, and degree type should be Cubic. This will ensure that the Paint Effects stroke is nice and smooth.

- Create a NURBS sphere and scale it down so it is pretty small relative to the curve.

- Rename the sphere "glowBall."

- Open the Hypershade window and create a Surface Shader.

- Assign the Surface Shader to the sphere.

- Set the Out Color to yellow and the Out Glow Color to a dark warm orange.

- Do a few test renderings and adjust the glow until you have a nice orange-yellow glowing ball.

- Scale the glowBall up a little along the X-axis so that its ellipsoidal.

- Set the Time Slider to 120 frames.

- Select the glowBall and the curve and in the Animation menu mode selct Animate>Motion Paths>Attach to Motion Path.

- Open the option box and set the Time Range to Time Slider so that the sphere travels the length of the curve over 120 frames.

- Make sure Follow is on, Front Axis is X and Up Axis is Y.

- Get the settings from the yellow neon brush the same way we described in the mushroom tutorial above.

- Attach the brush to the curve through the Paint Effects menu under the Rendering menu set (Paint Effects>Curve Utilities>Attach Brush to Curves.)

- In the Outliner use the Display options menu to show Shapes and turn off DAG Objects Only.

- Open up the Connection Editor.

- In the Outliner, select motionPath1 and load it into the left side of the Connection Editor (you may have to scroll down in the Outliner to find this).

- Select stroke1Shape in the Outliner and load it into the right side of the menu.

- In the left side of the Connection Editor select U Value.

- In the right side select Max Clip.

- The Max Clip of the stroke is now connected to the U Value of the motion path which also controls the position of the glowBall as it travels along the curve.

- In the strokeShape1 attributes turn off Motion Blurred.

- In the Render Globals turn on 3D Motion Blur and set Blur by Frame to two frames.

- Render out a sequence of 120 frames, you should have a glowing dot moving through space, leaving and orange-yellow trail behind.

- If the stroke grows in the opposite direction that the ball is travelling try disconnecting Max Clip and reconnecting Min Clip in the Connection Editor (make sure Max Clip is set to 1).

- If the stroke only travels a fraction of the curve check the following:

- Select motionPath1 in the Outliner, look at the U value in the Channel Box. When glowBall is at the beginning of the curve (frame 0) the U Value should be 0, when it is at the end of the path (frame 120) it should be 1. if the U value is something like .01 when glowBall is at the end of the path, load the attributes of motionPath1 into the Attribute Editor and check the box next to Parametric Length.

- If the value is 100 when glowBall is at the end of the curve (frame 120) then uncheck Parametric Length.

- Essentially you want motionPath1's U value to go from 0 to 1 which is connected to the yellow neon stroke's Max Clip which should also go from 0 to 1. If you rebuilt the curve to have 100 spans then you should not need to have Parametric Length checked.

- This is pretty basic stuff but think about the ways you can apply this. For instance, you can create a skeleton, attach a IK Spline Solver and then attach the glowBall to the spline and then the neon stroke. This way you can animate the path as the stroke and the glowBall travel along it.

- You could also build a NURBS character and render him/her/it as a glowing wireframe.

- In the following animation I combined ideas from the two parts of these animations to create some interesting effects. This is something I'm still working on.

-Have fun!