Call for Submission
NAB 2012 Best of the Best Show Reel
Submit your work today!
Theme color:
  • 1/3
You are here: Homepage /  Blogs /  Duncan's Blog / A ribbon with twist control
A ribbon with twist control
Posted: Feb 13, 2007
Category: Tutorials
Social Media:
Bookmark and Share
 
ribbonTwist.ma (scroll to the bottom to download related material)

A Maya user was trying to create a curling ribbon with a paint effects brush. He wanted to know if it was possible to control the twist rate along the ribbon to make some areas flat while other parts were twisted. Unfortunately the paint effects brush only has a global "Twist Rate" attribute with no control along the stroke. However there is a simple trick for doing this that uses the curl ramp on a hair system, while also disabling the hair's dynamics evaluation.

1. Create a curve. (MENU "Create: Cv Curve Tool", drop 6 or so points on the ground and hit return)

2. MENU "Hair: Make Selected Curves Dynamic"
In the option box turn off "exact shape match"

3. MENU "Hair: Assign Paint Effects Brush To Hair"

4. Delete "hairSystem1OutputCurves" (select in the outliner then hit the delete key)
The output is paint effects so we don't need the output curve.

5. On pfxHairShape1 set:
drawAsMesh = ON

6. On the paint effects brush ("brush2") set
brushType = Mesh
globalScale = 1

"Brush Prorfile" flatness1 = 1.0
"Shading" color1 = white
"Illumination" illuminated = ON

7. On the hair system ("hairSystemShape1") set:
Simulation Method = "Static"
Hair Width = 0.1
Sub Segments = 10


Also delete the far right entry on the hairWidthScale ramp so it no longer tapers at the end.

8. Edit the hair system Clump Curl ramp to set the amount of twist along the length of the ribbon. A value of 0.5 is flat. Type in values greater than 1 or less than 0 into "Selected Value" if you wish to have very tight curls. You can edit and animate the position of the cvs on the original curve if desired. Note that the interpolation performed for the sub segments is "hermite and may not match the interpolation of your original curve well. If you wish to match it better you can make the hairsystem sub segments 1 and increase the sample density on the follicle node instead.

Thats it. If you don't want to render the ribbon with paint effects you can simply do MENU "Modify: Convert: Paint Effects to Polygons".
In order to post any comments, you must be logged in!
Newest users comments View All 5 Comments
Posted by gcapps on May 12, 2011 at 05:35 PM
This technique is exactly what I've been looking for on a few animations I'm working on, but the ribbon is flat across it's surface. is there a way to control the bend perpendicular to the spline?

Thanks
Posted by masterbeta on Jan 26, 2008 at 02:07 AM
Great tutorial as always - would it be possible to animate the ribbon and twist at certain points along the path?
Posted by bradon on Jun 22, 2007 at 03:11 PM
Hello, I was the one with the original pfx twisting problem you mentioned in your ribbon with a twist control. I like this workaround however one thing is still puzzleing to me. When I base the pfx off the hair system I loose the ability to stroke the pfx with the end bounds attributes. Now with the pfxHair I can still taper the stroke with hair width scale. widget and use the gap size and gap spacing under the brush attributes to "reveal" the stroke, but one problem arises with this. That being if the stroke is tapered the taper does not follow the leading edge. the taper is only revealed at the end of the stroke. I could use the thinning attribute in the hair, but this seems to change the shape of the taper as it grows. any way to stroke the hair with a taper?
Posted by Duncan Brinsmead on Feb 28, 2007 at 11:34 AM
The attribute is "Strength Map" (not strength) on the nComponent node. In the attribute editor this should have a blank edit cell with a checker box to the right.
Posted by near2world on Feb 15, 2007 at 01:01 PM
nice trick!
thnx a lot.