Animate an extrusion along a curve in Maya


Animating an extrusion along a curve in Maya is one of the most requested tutorials.

Knowledge required: Basic Maya Interface, Tools and Keyframing

I wanted to give a good step by step on how to pull this off, with a little explanation along the way. I am using Maya 2011, but this should work all the way back to Maya 8 (oldest version I have installed) and probably earlier. I am just going to keep Maya at it’s default settings, with the assumption you will adjust frame rate as needed. I am using 150 frames for the animation.

1. Draw a curve using the EP curve tool. To access this tool, select surfaces from the shelf drop-down menu. This curve will serve as the animated extrusion’s path, the direction our extrusion will go.

Use the EP curve to draw a path.

2. Rotate the path curve on the X axis 90 degrees. Stand it straight up and set it on top of the grid for convenience. *Rotate tool shortcut is E

Rotate the path curve

*When you are working with big projects, it is a good idea to name your curves accordingly. Since we will be working with multiple curves, let’s name this one pathCurve1. To do so, hit CTRL-A to open the attribute editor. Click on the parent node for the curve and rename it to pathCurve1.

Rename your path curve to avoid confusion later on

3. Now we need to make the shape of the extrusion. This will be another curve and the shape can be anything you want, for this example we will use a circle. Whatever shape you decide upon will be extruded 3 dimensionally along the path curve. Go to the shelf and select the Nurbs Circle. Position it at the very starting point of your curve. Now center it up. If you are adept at Maya, you can select the Nurbs circle, hold the C key and the Middle Mouse Button Click the Path curve to snap it centered. Otherwise, just manually align it. Also, rename your nurbsCircle to shapeCurve (if you’d like).

Position your Shape Curve at the beginning of your Path Curve

Alternate views of shapeCurve alignment:

4. Now we are going to create the extrusion. Select your shapeCurve (nurbs circle) and SHIFT select the pathCurve. Always remember to select in this order, shape first path second. Switch to your surfaces drop down menu. Go to SURFACES> EXTRUDE options box

Select the shape Curve, Shift Select the path Curve

Make sure that your options box setting match the settings below. The setting that allows us to animate this extrusion is the partial setting.

Make sure your extrusion settings match these.

You should end up with an extrusion along your path. If you are still in wireframe mode hit 5 on your keyboard.

Extrusion follows path

If your extrusion is looking a little blocky, like the image above, you can smooth out your path curve before doing the extrusion. This is located under EDIT CURVES> SMOOTH CURVES (options box to change smooth value). Sometimes you can adjust the topology in the extrusion options as well. There are many ways to tidy up the mesh…You may get a better result like the image below:

Smoothing the path curve can smooth the extrusion

5. Let’s animate the extrusion. Make sure you select the mesh and open the channel box. Under the INPUT nodes click on subCurve2. Under the Max Value setting change the value to something like 0.001. You can’t type in Zero as you will get an error. Maya will round it to zero after you input this value. Make sure you are at the beginning of the timeline (frame 1 or 0) and that you have autokeyframe ON (the skeleton key is red). Right Click on Max value and select KEY SELECTED to set a keyframe.

Set value to 0.001 or smaller. 0 may give you an error.

Right Click Key Selected

 

**If you get an error message don’t worry. We can easily fix this in a second. It isĀ  a common problem caused by placing the shape curve at the point of your path curve, which is NOT the originating point of your path. In other words, your shape curve has to be at the point where you began drawing your path curve. No worries tho’, it’s an easy fix, I intentionally put my shape curve on the wrong end to demonstrate how to fix it. 99.9% of the errors people get when creating an extrusion relate to this positioning, so I wanted to present it as it will inevitably come up.

Go to the end of the timeline and change the Max Value to 1.

Set an end keyframe value of 1. This means extrusion completed.

 

In maya terms, a value of 1 means completion. In this tutorial, the end of my timeline is 150 frames. Now hit the PLAY button and you should have an animated extrusion or an error (remember easy fix).

***Error fix. When you hit play if your animated extrusion flies around in a bizarre manner:

Error. Curve flying around off of path.

 

To fix go to EDIT CURVES> REVERSE PATH DIRECTION

Error Fix. Edit Curves>Reverse Path Direction

Now when you hit play the extrusion should follow the curve path. If it is going too fast, under animation preferences change your playback to REAL TIME (whatever) Frames Per Second.

If it is working okay, then it should look like this:

Animate an extrusion along a curve in Maya
http://www.youtube.com/watch?v=PPkE1u_6SvA

Leave a Reply