djRivet.mel – added support for multi uv sets

david | animation,mel script | Tuesday, November 3rd, 2009

Several years ago I wrote a mel script called djRivet.mel that makes it easy to constrain things to deforming surfaces using follicles. Matt Oldfield, one of the TD’s at Disney Interactive, suggested that I update it to include support for multiple uv sets. It was pretty cool to hear that someone other than me finds this script useful, and being able to specify different uv sets for the textures and the follicles makes perfect sense.

You can download the update here.


  1. Thank you very much for this. Used it in Maya 2011 and it works like a dream.

    Comment by TomKnowles — February 13, 2011 @ 7:37 am

  2. Hi David!

    Thank you for a very great script! Very useful!

    I did a small adjustment in the code. I don't know if it will affect other things but it works great. So I wanted to share my small adjustment for you.

    I had a small problem when scaling a character greatly. The attached object will become little bit offset from the follicle. You can see that if you scale down to 0.01 that object have leaved the surface.

    To fix that I added a code that move the objects pivot to his follicles pivot.
    Before the parenting code in respective case (mesh or nurb),

    parentConstraint -mo -weight 1 $fol $rivetList[$i];

    I added these 2 lines,

    float $follicleCenterPos[] = `xform -q -ws -sp $fol`;
    xform -ws -piv $follicleCenterPos[0] $follicleCenterPos[1] $follicleCenterPos[2] $rivetList[$i];

    parentConstraint -mo -weight 1 $fol $rivetList[$i];

    That is all. I just wanted to share my idea to a very great work you have done David!

    Best Regards
    Mattias Eriksson

    Comment by Mattias Eriksson — August 2, 2013 @ 7:44 pm

  3. Thanks Mattias, both for your compliments and your contribution with regards to the scaling issue. Over the years I've received many emails on this subject. I'm sure it will be helpful for others faced with the same problem. Another solution is to link the characters global scale to the follicle scale.

    Comment by david — August 4, 2013 @ 12:20 am

RSS feed for comments on this post.

Leave a comment

You must be logged in to post a comment.

Powered by WordPress | Based on a theme by Roy Tanck