Okay. I need some ideas here.
There are several hundreds of objects I need to “attach” to a curve. By “attach” I mean they need to follow its deformations. I’ve tried several approaches so far, but I’m running into a few problems.
Motion Paths. The big drawbacks for me are that it moves the objects onto the curve (I need them to keep their original relative positions to the curve), and that their positions along the curve are animated. I can remedy this, but I would still have to find a way to move them to their correct position along the path based on a normalized length.
Using pointOnCurveInfo node. This one works better, but it has a particular requirement that I’d need to automate. Each position for each object will be given by the Parameter attribute on the node. Since I cannot spend hours fiddling with this for hundreds of nodes, I though the best way to do this would be to find the closest point on the curve for each object, and use that. The problem is that Maya has no closestPointOnCurve node. It seems to be part of the bonus tools. I googled, but found nothing for Maya 2012. The Area only hosts the Bonus Tools for Maya 2014, and the link to the legacy installers seems to be broken. So I’m kinda stuck here.
Wire Deformers. These distort the objects, and I need them to be undeformed.
Any suggestions? Thanks!!
(P.S. If anyone find the download link for the Maya 2012 bonus tools, I’ll be more than happy to have it. Thanks!)
If they are not deforming, create a joint chain to some desired resolution and drive it via spline IK. Then parent objects to the nearest bone. This way the attachment side of the problem is discrete rather than continuous and the sampling rate is up to you.
Thanks a lot both! The bones approach doesn’t do what I need due to how the transforms are inherited, but I found an alternative approach. I’ll check out that video too. Cheers!
What about using follicles on a nurbs surface instead of a curve? The follicles would follow the geometry, including orientation and tangency. So it takes twist into account without a bunch of up-vectors. And the follicles won’t scale and shear as you deform the nurbs geometry. I’ve used this for tentacle creatures and trunks/tails.
If that works for you, I wrote a little script that attaches a single follicle onto a nurbs plane.
You could then iterate using something like this:
oNurbs = your nurbs surface.
items = 20.0 # How many points? Make sure this is a float.
for i in range(0,items):
# returns the follicle, so you can parent things under it.
# divide by (items-1) to spread across a 0 to 1 parameterization
oFollicle = create_follicle(oNurbs, uPos=i/items-1, vPos=0.5)
What about using follicles on a nurbs surface instead of a curve? <snip>[/QUOTE]
Thanks a lot clesage. For this particular case, based on how production wants this to work, we’ll need to use a curve. I’ve used your approach in other cases (follicles do come in handy), but can’t use them in our particular scenario. But thanks for throwing it out there!
Have you tried searching for the nearestPointOnCurve node? I don’t know why they named it “nearest” when all other are named “closest”. I don’t have Maya 2012 to check if it comes with 2012 but it is listed in the 2012 documentation.