Home Technical Talk

Wraping a cord like object around another object in Maya

polycounter lvl 12
Offline / Send Message
biofrost polycounter lvl 12
I modeled this cord straight and I want to wrap it around the cylinder object in the background but after some searching I can't seem to find out how to go about doing this.
cordxx.jpg

Replies

  • nullfed
    Options
    Offline / Send Message
    nullfed polycounter lvl 9
    1.First off, select or create an edgeloop in your large cylindrical object and go to Modify>Conver>Polygon Edges to Curve

    2. Select the cord object and the curve you made and in the animation menu set go to Animate>Motion Paths>Attach to Motion path

    3. Then with the cord still selected, go to Animate>Motion Paths>Flow Path Object and in the options, the number of Divisions:front will determine how smoothly the objects wraps around.
    Apply it and the object should wrap around the curve.

    4. Moving the marker in the timeline should make the object move along the curve. Select the object (not the lattice) and duplicate it, then move the timeline along, dropping duplicates where you want (you could start with a long cord that matches the divisions of your cylinder).

    5. To get fine control of the placement of the objects, use the 'Set the current time' field on the timeline. You can type whole frame values or fractional to help with fine placement.
  • biofrost
    Options
    Offline / Send Message
    biofrost polycounter lvl 12
    Perfect, that was exactly what I was looking for, thank you!
  • biofrost
    Options
    Offline / Send Message
    biofrost polycounter lvl 12
    Ran into a problem and im not quite sure what is causing it.
    problemy.png
  • CheeseOnToast
    Options
    Offline / Send Message
    CheeseOnToast greentooth
    For this object I wouldn't bother using a motion path. A bend deformer will do the job in a cleaner way. Go to the animate menu, then do Create Deformers > Nonlinear > Bend.

    In the bend curvature field, enter 3.142 (this field is in radians, not degrees, so you need to enter the value of Pi for a full circle). You'll probably need to rotate the bend deformer to get it to bend your object in the right direction. When you're happy with it, delete history and merge the verts from the two border edges.
  • haiddasalami
    Options
    Offline / Send Message
    haiddasalami polycounter lvl 14
    @Cheese: Isnt a full circle 2pi radians? One pi radian is 180 degrees.
  • Mark Dygert
    Options
    Offline / Send Message
    I think MoP wrote a script that flips some deeply hidden switches that cures that problem?
    http://www.ldaustinart.com/paul/index.php?cat=scripts&type=maya

    I remember a thread about that twist before and there was a way to make it stop... I thought mops script fixes that... but I can't be sure... In Max its incredibly easy thing to do but in Maya it was a bit more complex. Good luck!
  • CheeseOnToast
    Options
    Offline / Send Message
    CheeseOnToast greentooth
    @ haiddasalami : yeah, but maya applies the value to the upper and lower bend, so you get a full circle by entering pi.

    @ Mark : no, it's just a nice interface that replaces the paint effects one. The problem is still there.
  • Mark Dygert
    Options
    Offline / Send Message
    Ahh well that sucks... I remember there was a fix, I just don't remember where it was. It must of come up in a thread similar to MoPs thread or about the same time.
  • Lamont
    Options
    Offline / Send Message
    Lamont polycounter lvl 15
    Off the top of my head first guess would be the "World Up Type" for the curve properties.

    Select the curve then Attributes>MotionPath>MotionPath Attributes>World Up Type. Change to like Vector.

    Maybe. Give it a shot.
  • biofrost
    Options
    Offline / Send Message
    biofrost polycounter lvl 12
    Thanks Lamont that seemed to have worked, and Mark that script while not helping the fix was a awesome find im going to be putting that script to good use soon.
Sign In or Register to comment.