Form and Space

creating CG 3D since 2001

  • Connect @
  • Linked in
  • Vimeo
  • Twitter
Path Constraint with Looping Option

MEL: Path Constraint v.0.7 with Looping

Matthew | March 10, 2013

No Comments

Path Constraint version 0.7 is here already! This version came a little early, but it’s too good not to share. It was only a few days ago, March 7th, when I released the version 0.6 of the Path Constraint tool. I shared it on the Maya forums at when a user named Farcue asked me to add looping functions for complex curves. Farcue asks:

If I had a complex path ––say, a helical path bent in a circle and made periodic–– how would I go about animating objects attached to it via your script so that they moved around the path while maintaining spacing? A la tread or conveyor. I feel so ungrateful making the suggestion … but I think the option to invoke the “continuous circuit” animation, described above, ought to remain available. Whether on top of the functionality you’ve added … or separately.

Well, you have the option now! I’m very excited about this. Farcue’s request was easily integrated into the Path Constraint, even as a toggle.

path constraint

Path Constraint v.0.7 with Loop Option

Basically, this version will do everything the last version could do, with the added bonus to toggle looping on or off. The setup requires a set driven key and a little work in the Graph Editor, but the script handles the rest. I’ve created a small video to help you along.

Forum Path Constraint Tank Tread Demo from Matthew L. Stoehr on Vimeo.

Also, a complex curves example video.

complex spiral curve path constraint

Path Constraint version 0.7 with complex spiral curve.

forum pathConstraint spiral loop from Matthew L. Stoehr on Vimeo.

Please share with me what you make with my tools, so I can include it in my demo reel and resume.

Path Constraint, public release
version 0.7
Matthew L. Stoehr

Constrain objects to a curve with a linear distribution.

Select the object(s) to constrain, then select the curve.  Run the script.

1.  Selection order is the order of objects on the path.
2.  Rotate the upvector object to spin the objects on the path.
3.  Change -worldUpVector to the perpendicular direction of the curve.  
    For example, a defualt circle should have an up vector of 0 1 0, or 
    a curve drawn from the front view should have an up vector of 0 0 1.
4.  This script can be run on the same path multiple times.
5.  To make a cyclical path animation, like tank tread.
    A. Enable loop (set to 1.0, default is 0).  
    B. Option 1, keyframe the Offset attribute from 0 to 1.0, 
        or -1.0 for the opposite direction.
       Option 2 (best), use a set driven key to drive the offset by
       another object.
    C. Then enable pre and/or post-infinity for the Offset attribute.
        That's in the graph editor.

Leave a Reply



Example Scene

Eample Scene 2