djRivet.mel (inspired by Michael Bazhutkin's excellent rivet.mel) uses follicle(s) to constrain object(s) to the surface of a poly mesh. You first select one or more objects and last select a poly mesh and the script places follicles on the poly mesh at the closest point to your selected object(s). Then the object(s) are parent-constrained to the follicle(s) (with maintain offset on). Now the object(s) will stick to the poly mesh and follow it if it is deformed.
See file header for usage instructions.
Follicles are attached to a poly mesh at a specified uv-coordinate, which can be changed or animated. This gives you the possibility to fine-tune the placement of your object by either adjusting the mesh uv's or by changing uv parameter in the follicle attributes. As long as the uv's remain meaningful it is also possible to change the poly mesh topology without breaking the connection to your object (for example you may want to smooth the poly mesh, or split some faces).
The dependency on uv's means that djRivet.mel works best when your poly mesh has well layed out, non-overlapping uv's.
Even though follicles are used by the maya hair system, no hair systems are created by djRivet.mel. Only the stand-alone follicle node is used.
At this time I have only tested djRivet.mel with maya 8 (unlimited) on windows.
1.0 09 Oct 2006
- working version
1.1 11 Oct 2006
- fixed problem with closestPointOnMesh ignoring parent transforms
1.2 14 Oct 2006
- fixed duplicate names problem
-fixed problem determining object location
-object now parent-constrained to follicle
multiple objects can be constrained in a single execution
I am happy to hear comments or crits.