LIBRARY: Tutorials Reviews Interviews Editorials Features Business Authors RSS Feed

Animating a Ribbon with Maya

Animating a Ribbon with Maya
A Creative COW Maya Tutorial

Animating A Ribbon with Maya

Chad Briggs

Chad Briggs
email: chad@elementxcreative.com

co-founder, Element X Creative

©Copyright 2005 Chad Briggs and Creativecow.net. All Rights Reserved

Article Focus:
One common request or problem Maya users stumble across is how to properly animate a ribbon that zips across the screen and is flexible enough to bend and twist in various ways. While it sounds simple in concept, it may not be as straightforward and obvious as one would think to set this up properly with the maximum animation capabilities. In this article, Chad Briggs demonstrates a solution that he came up with in response to a recent gig.

A client of ours recently contracted us to create a minute spot where a ribbon was doing just that, zipping and flying through various obstacles and animating to music. The client was still solidifying the main idea as we took the gig, so I knew the setup would have to be flexible enough to make constant revisions as the mood of the piece changed in certain segment. Here is a process that one can use to set up such a animation. (NOTE: The tools used in this tutorial are using the default maya settings as it ships, unless specified otherwise. If you get wonky results, reset your tool settings and try again.)
The first step is to create the curves that define where the ribbon will flow. There will need to be a top and bottom curve for the ribbon, so that we can stretch and contract it at points if we need to. See figure one at the right for an example of the first two curves i created.

figure 1 (click to enlarge)

figure 2 (click to enlarge)
The next step will be create the end and beginning profile curves for our bi-rail surface that will make up the ribbon. When creating the profile curves, we only want a one-degree nurbs curve, so make sure that is checked when using the EP curve tool. (The path curves are three degree). You can also use "rebuild curve" to convert the curve to a one-degree curve if you've already made it. Once you have the degree option set, place one point at the end of one path curve and the other on the opposite curve (see figure at left). In order to make a birail work properly, the ends of the profile curves and the path curves must be touching exactly. So hold down the "c" key or enable the snap to curve button when moving the cv's so you can snap the vertex to the ends of the curve.
Now we shall create the actual ribbon surface. Select the two profile curves, followed by the two path curves, and go to modeling menu surfaces->bi-rail->bi-rail +2 tool. This will create our incredibly nifty ribbon. And to think the excitement is just beginning.

figure 3 (click to enlarge)

figure 4 (click to enlarge)
Next, we need to prepare the profile curves for animation. The goal to make the ribbon grow and shrink as we need is to get our profile curves to flow along the path curves. While we can set up this animation for both the beginning and end profile curves, in this tutorial we will focus on only the beginning curve. (The same principles in the following steps can be applied to the end profile if needed). Since the CV's will not animate easily, first lets put a cluster on each CV of the profile curves. This is accomplished by selecting a CV, and going to the animate menu->deform->create cluster. If your successful, you will see a C icon over the CV you just attached it to.
Now we need to get the clusters to flow along the path curves we have created.First lets make sure that we are using the profile curve near the begining of the path curves. The easy way to check this is to select one of your path curves and right click to go into control vertex mode. You'll see a square icon and a u icon at one end of the curve. This is the begining of the curve. Make sure your working with the profile curve near these icons. Select the top cluster and the top path curve. Then go to animate menu->animate-> motion path-> attach to motion path (option box). In the options menu make sure you have follow turned off. Don't worry, it's still going to follow, it just means the CV is not going to rotate with the curve. Once that is done, we now have a small problem. If you hit play you see our cluster is following the path as if possessed by the NURBS devil. (see figure 5) The cluster will follow along the path dragging the CV with it, changing the shape of the bi-rail as it goes (because the surface is defined where the CV comes in contact with the path curve). We want manual control over the animation (position of cluster along the path curve), so we must first remedy this default behaviour. Select the cluster and you'll see a motion path input in the channel box now. Select that and you'll see several values. You'll notice that U value is keyframed. go to the first frame of your animation and break that connection (right click on the value field and select break connections). This will return keyframe control to you, the savvy user. Repeat this process for the lower cluster on the beginning profile curve as well.

figure 5 (click to enlarge)


figure 6 (click to enlarge)


figure 6a (click to enlarge)

Were almost there, hang on. Now technically we could end the tutorial here and animate the ribbon via keyframing the u-value of each cluster. But that would be pain in the #@#$@ to constantly have to select the cluster and then find the u-value and key it. In my case, I also knew i might not have the clusters in view at all times because the camera might be in a diff location. So to avoid hunting through the outliner or other viewports, we'll create some controls that reside off camera that should make our selection/animation process a lot easier. Make two nurbs circles and place them facing your camera, outside of the resolution gate (which you can enable by going to view->camera settings->resolution gate). Once you have them positioned as in figure 6a, parent them to the camera as in figure 6(make sure your camera is not hidden, or the circles will disappear). Now you have two nurbs circles that will act as controls for your clusters that slide along the path curves. First, two more steps.
With the top circle selected go to modify->add attribute. This will bring up the add attribute window as shown in figure 7. Name the attribute rib_top_pos and set the min and max as shown, as well as the default. The reason for these numbers is so that it's not as sensitive to animate the clusters along the path. The u-value typically goes from 0 to 1, which is hard to control middle mouse buttoning the values. Making the range larger, we'll be able to fine tune the animation easier. Repeat this process for the 2nd circle, but name it rib_bottom_pos. Once your done, select all the other attribute fields of the circles (translate, rotate, scale, etc) and lock them by right clicking on the highlighted attributes. (do NOT include your newly created custom attributes in this bunch) This will prevent us from accidentally moving or manipulating those channels of the circle controls.

figure 7 (click to enlarge)

figure 8 (click to enlarge)
Now we'll use set driven keys to make the connection from the circles custom attributes to the u-value of the clusters on the path. Open up the set driven key window (from the animate menu) and then select the top circle. Click "load driver". Select the top cluster, then select the motion path input. Click "load driven". The window should look similar to fig 8. Now we want to select the rib_top_pos value of the driver and the uValue attribute of the motion path on the cluster. Press the "key" button. This will make the connection so that when the rib_top_pos = 0 that the uValue of the cluster will be 0 as well, putting it at the beginning of the curve. Next select the top circle again, and put 10 in the rib_top_pos field (without closing the set driven key window). Then select the same motionPath attribute you selected before (on the cluster) and enter 1 in the uValue field. This should move the cluster to the end of the curve. (don't worry if the ribbon now looks funky). Go back to the set driven key window and click the key button. Now if you animate the rib_top_pos value you should see the cluster slide along the motion path. Kinky eh? Now repeat this same process, attaching the lower clusters uValue to the custom attribute on your lower circle control.

Once you've gotten this far, your scene should look something like figure 9. The nice thing about this "rig" is that each corner can be animated independently for different effects. If you wanted, you could have made one control circle drive both clusters (but then your in a bind if they don't always line up like you want). Now you can even pull and stretch the other points along the path curves and the ribbon will deform with it. The final movie from this scene i created looks like this.

final movie (click here)

Also, here is the first few seconds of the spot I worked on so you can see a more advance version of it in action.

advanced ribbons (click here)

if you want to peek at the actual maya file:

maya MA file (click here)

Well, i hope this technique serves you well, and feel free to email me if you have any questions or comments!

 


figure 9 (click to enlarge)


Related Articles / Tutorials:
MAYA
Iron Man 3: The Trixters Behind Tony Stark's Shiny New Armor

Iron Man 3: The Trixters Behind Tony Stark's Shiny New Armor

Seventy artists from Trixter worked an entire year to create a formidable 208 VFX shots for Marvel's Iron Man 3. Each new episode in the Iron Man saga details a slick new technology created by the ingenious Tony Stark, and the new installment does not disappoint! Combining the hard surface geometry of the Iron Man suit auto-assembly with the flexibility of the human body was one of the challenges that Trixter brought from previs to believable screen reality.

Editorial, Feature, People / Interview
Alessandro Cioffi
MAYA
VFX Files: Khaos Digital Helps Bones Tell Its Stories

VFX Files: Khaos Digital Helps Bones Tell Its Stories

A key element in the hit TV show Bones is the images on The Angelatron, an 8-foot screen that shows detailed images proving how the victim died. Khaos Digital's David Watkinson creates all those images for Bones, and specializes in creating content for screens that play back in real-time during production. Creative COW looks at how it's done.

Feature
Debra Kaufman
MAYA
VFX Soup: Tintin VFX Supe Joe Letteri Talks 3D and Mocap

VFX Soup: Tintin VFX Supe Joe Letteri Talks 3D and Mocap

Four-time VFX Oscar-winner Joe Letteri describes the advanced technology behind Steven Spielberg's The Adventures of Tintin, discussing his own adventures with virtual cameras, motion capture, 3D, and three years of pre-production with the team at Weta Digital.

Feature, People / Interview
Debra Kaufman
MAYA
Autodesk Maya: Digital Molecular Matter (DMM)

Autodesk Maya: Digital Molecular Matter (DMM)
  Play Video
In this Autodesk Maya 2012 tutorial, Creative COW leader Michael Hurwicz looks at Digital Molecular Matter (DMM), a plug-in for creating shatter, destruction and deformation effects. DMM is now included in Maya 2012.

Tutorial, Video Tutorial
Michael Hurwicz
MAYA
Digimation Archive and Model Bank Library

Digimation Archive and Model Bank Library
  Play Video
Creative COW leader Michael Hurwicz reviews two collections of 3D models from Digimation: The Archive and The Model Bank Library.

Review, Tutorial, Video Tutorial
Michael Hurwicz
MAYA
MAYA Shelves

MAYA Shelves
  Play Video
Everything you wanted to know about MAYA shelves (but were afraid to ask). In this tutorial Aharon Charnov will show how to use every aspect of shelf customization. Also included in this video tutorial is how to add existing tools to shelves, how to organize tools for optimum use, how to create new tools with mel scripts, how to label mel created buttons, and how to create custom shelf icons.

Tutorial, Video Tutorial
Aharon Charnov
MAYA
Maya 2011: Assigning Invisible Faces

Maya 2011: Assigning Invisible Faces
  Play Video
Michael Hurwicz demonstrates the new "Assign Invisible Faces" feature in Maya 2011, making one face of a cube invisible but still very much "there" when it comes to a smoothing operation performed on the cube.

Tutorial, Video Tutorial
Michael Hurwicz
MAYA
Maya 2011: Camera Sequencer

Maya 2011: Camera Sequencer
  Play Video
In this tutorial, Michael Hurwicz shows you how to use the new Camera Sequencer in Maya 2011 to import an animatic sequence from Sony Vegas 9.0 using AAF (Advanced Authoring Format).

Tutorial, Video Tutorial
Michael Hurwicz
MAYA
Maya 2011 Bezier Curves

Maya 2011 Bezier Curves
  Play Video
In this Maya tutorial, Michael Hurwicz provides an introduction to Bezier curves, a new feature in Maya 2011 which allow you to create curves the way you do with the pen tool in Adobe Illustrator or Photoshop.

Tutorial, Video Tutorial
Michael Hurwicz
MAYA
Rendering Motion Vectors out of Maya - Part 4

Rendering Motion Vectors out of Maya - Part 4
  Play Video
In part 4 of this Maya tutorial series, Arkadiy Demchenko shows another example scene with a tower blowing up into pieces. Only Maya 2009+ passes system is used in this example.

Tutorial, Video Tutorial
Arkadiy Demchenko
MORE
© 2016 CreativeCOW.net All Rights Reserved
[TOP]