pointOnPolyConstraint 'all axis', orientation not maching the polygon

I have pointOnPolyConstraints constraining joints to an ncloth poly strip (cached), however, it seems that only the y axis is constrained to the normal (image). Even though ‘all axis’ is set (skip=None).

Anyone have experience with this?

No, not seen this. Have you tried follicles instead?

I am trying to bake the ‘rope’ to joints, does a follicle have a full transform of the poly surface? Or just a normal direction? The pointOnPoly is supposed to lock all axis to the polygon, seems to work in simple tests.

It’s constraining it to the point but it’s averaging it’s orientation on the mesh as a whole, at least that’s what I’m getting. If you create a single face mesh plane and then constrain a locator then move the verts, the locator will aim properly everywhere, but if you make a long strip like you have and then manipulate the verts the rotation is there but very subtle. strange, I wonder if this is supposed to happen, I can’t imagine why you would want to average the orientation, or at least not have an option for that.

Are follicles a solution? I would really like to not write a fn generating a matrix per frame and baking these out.

Check it out, I even have times when there is no axis aligned to the normal of the polygon! But it’s rare.

could you use a nurbs plane and pointOnSurfaceInfo nodes? I have a script to create that.

I will have to see if I can convert my nCloth cached poly mesh to a moving nurbs surf.

The Point on Poly constraint uses the Meshes’s UVs for its calculation, if the mesh has unusual UVs, you will likely get strange results.

On the mesh that you’re constraining to (The nMesh in this case), make sure that all of the UVs are 0-1 space, and that none are overlapping. If you have already added the Point on Poly constraint, be sure to delete them before shifting the UVs.

The only time I have had the Folicle or Point on Poly fail, or give bizarre behavior, was when I have wonky UVs on my sim mesh.

Here are the UVs, all in 0-1, all normal, no overlapping.

Ah, hmm…

this is another long shot, but the Point on Poly constraint might use the mesh normals. Which if you imported your geometry from another application, sometimes lock their values.

This might be worth a shot, select the geometry with the constrained objects, and go to Normal/Unlock Normals. If that doesn’t work, I’m afraid I have run out of trusty sim mesh to bone mesh fixes :frowning:

Even though it is very old, I still find the bazhutkin Rivet script to be the most reliable way to constrain anything to polys.

http://www.creativecrash.com/maya/downloads/scripts-plugins/animation/c/rivet-button--2

This script uses the curveFromMeshEdge node to loft a little nurbs surface across the polygon. Then a pointOnSurfaceInfo node is used to get the position and normal.

Stev

Chris are you selecting the faces themselves and then constraining the bones to them? That should give you the exact orientation of the face normal itself and apply that as a rotation to the bone. Often if I want to attach to a surface I’ll pointOnPoly, transfer the rotations to the jointOrient channels and zero out the rotations so I have a clean set of rotations to bake from.

If you just constrain to the object itself and then use the U and V parameters to slide it along the surface it’s using the objects default orientation. If you select a face, vert or edge you should get the components normal direction applied (face, vertex etc).