Point on Poly depends on UV's?


#1

New Maya user moving on from Max. Was hoping I could grab a vertice off of a cached sim of twigs bouncing and swaying and attach a clump of leafs to it using a Point on Poly constrain. Now I find that this particular constraint uses the parent UV’s to position the child object? Maybe I mess with the UV placement to approximate the global location… I could be missing something here, but was expecting it to work similar to Max’s attachment constrain, whereby the child object moves with the positional and rotational coordinates of the parent object’s selected component?

But if I go around just scattering twigs in a bush-like manner and running a cloth sim of their movement, blowing in the wind, then cache the sim; I have a rather incomprehensible UV arrangement. How can I avoid the UV’s and tell my clump of leaves to simply stick to the selected vertice’s position and rotation (with offest)? I saw an nCLoth constrain that looks for the closest verts of the parent object. This works if I want to add another layer of complexity.


#2

different ways for that,

scripts like djRivet, it will create a follicle and your object will be parented to. It works pretty well but it relies on UVs, so if you need to change the uvs just delete the follicle change the uv and recall the script.

you can also use Mash which is not relying on the UVs, set the distribute node to mesh, input mesh -> your surface and selection set -> your selected face. (for this one i would do a script to have it in a one click solution)

You can also use a node from the muscle system, “surface attach” you select a face or two edges and it will create kind of a locator then you parent what ever you want on it.
Also with this one you can change your uvs without a problem.


#3

Thank you, that is very helpful.


#4

Onouris, thank you, again for your suggestions.

The issue that I am running into with both Rivet and muscle is that they depend on UV’s. I can’t think of a good way to create meaningful UV maps that will provide placement in world space.

The MASH approach gets me part of the way there, as shown in the image, the yellow cubes are indeed distributed and animate along with the point cache. I would need to find a way to attach a bundle of leaves to one of those cubes yet the MASH object is a single object with a single pivot. And it looks like their rotation isn’t connected to the animated mesh.

I was messing around with nConstrain Point to Surface, but I have 1000’s of leaves, so no way can I run a cloth sim on all of these and expect a stable result.


#5

On second thought, if I delete all faces not needed from the bunch of twigs, leaving me with only the faces that I care to attach to, then running Rivet attaches locators to the only available face locations, regardless of good UV coordinates. So maybe this direction will work after all.


#6

the muscle node should work just fine even if you delete the uvs or change them, the locator will still be sticking to the mesh and following.
Of course with this method if you need to parent 1000 objects you will need to script something to have them all attached to the muscle nodes, but if it just for few objects you can do it manually.

Now with Mash you can have two mash system on top of each others, so imagine you scatter just a polygon (i mean 1 face) after that you can scatter with mash another mesh and tell him to scatter only on the center of the face. So that way will get 1 object per polygon face.


#7

You can try with MASH. Maybe not at all perfect but simple on do the job.

Sorry Onouris I never seen your comment.