Go to: Related nodes. Attributes.

This node implements a pointOnPolyConstraint. Each constraint has a set of targets that are connected under the target attribute, a single constrained object that is connected to the constraint* attributes, and possibly other information to help compute the correct results. In the case of the pointOnPolyConstraint, the extra information is stored in offsetTranslate and offsetRotate attributes.

The pointOnPolyConstraint node can have any number of target inputs. Each target is connected to attributes inside a single element of the target attribute. For example, the first target object would be connected elements of target[0], the second target object would be connected to elements of target[1], etc. The elements of each target are: targetMesh, targetUVSetName, targetUV, and targetWeight.

The elements of each target are normally connected to the target objects as follows:

pointOnPolyConstraint attribute connected to
targetMesh worldMesh
targetUVSetName set to e.g. map1
targetUV set to a pair of uv coordinates
targetUseNormal set to 1
targetWeight set to 1.0

The targetWeight attribute is not generally connected to the target object. Instead, it may be animated by other means to adjust the weighted average computation for the target point.

The pointOnPolyConstraint node uses these inputs to compute the world space position of a point on the surface of each target object. If no point on the surface matches the provided uv coordinates, or the uv set name does not match a uv set on the object, then that target object is ignored. The node then computes a weighted average of the these points. This weighted average is called the target point.

The node also computes a surface normal and a tangent vector at each of the points identified by the uv coordinates. The tangent vector is taken to be the local u coordinate tangent. These normals and tangents are also averaged, and together define an orientation - the target orientation.

The constrained object is connected to the constraint* attributes. For a pointOnPolyConstraint, the constraintRotatePivot, constraintRotateTranslate, and constraintParentInverseMatrix are inputs to the pointOnPolyConstraint. The attributes constraintTranslate and constraintRotate are the only outputs.

The pointOnPolyConstraint node computes an output translation value such that the pivot point of the constrained object is offset by offsetTranslate from the target point.

The pointOnPolyConstraint node computes an output rotation value such that the orientation of the constrained object is offset by offsetRotate from the target orientation.

Although the all the constraint nodes inherit from transform, they do not actively use any of the attributes from transform.

Node nameParentsClassificationMFn typeCompatible function sets
pointOnPolyConstraintconstraintanimationkPointOnPolyConstraintkBase
kNamedObject
kDependencyNode
kDagNode
kTransform
kConstraint
kPointOnPolyConstraint

Related nodes

aimConstraint, geometryConstraint, orientConstraint, normalConstraint, parentConstraint, pointConstraint, poleVectorConstraint, scaleConstraint, tangentConstraint, lookAt

Attributes (42)

constraintParentInverseMatrix, constraintRotate, constraintRotateOrder, constraintRotatePivot, constraintRotatePivotX, constraintRotatePivotY, constraintRotatePivotZ, constraintRotateTranslate, constraintRotateTranslateX, constraintRotateTranslateY, constraintRotateTranslateZ, constraintRotateX, constraintRotateY, constraintRotateZ, constraintTranslate, constraintTranslateX, constraintTranslateY, constraintTranslateZ, offsetRotate, offsetRotateX, offsetRotateY, offsetRotateZ, offsetTranslate, offsetTranslateX, offsetTranslateY, offsetTranslateZ, restRotate, restRotateX, restRotateY, restRotateZ, restTranslate, restTranslateX, restTranslateY, restTranslateZ, target, targetMesh, targetU, targetUV, targetUVSetName, targetUseNormal, targetV, targetWeight

Long name (short name)TypeDefaultFlags
target (tg) compoundn/aarrayoutputinputconnectablestorable
bundle of matrix, input position, and weight
targetMesh (tm) meshNULLoutputinputconnectablestorable
input mesh to which the object should be constrained
targetUVSetName (tnm) stringNULLoutputinputconnectablestorable
input uv set name
targetUV (tuv) double2outputinputconnectablestorable
input uv coordinates
targetU (tu) double0.0outputinputconnectablestorable
input u coordinate
targetV (tv) double0.0outputinputconnectablestorable
input v coordinate
targetUseNormal (tun) bool1.0outputinputconnectablestorable
controls whether the surface normal affects the target orientation
targetWeight (tw) double1.0outputinputconnectablestorablekeyable
input weight for the position
constraintParentInverseMatrix (cpim) matrixidentityoutputinputconnectablestorable
inverse of the parent matrix of the object
constraintRotatePivot (crp) double3outputinputconnectablestorable
object rotate pivot
constraintRotatePivotX (crpx) distance (double)0.0cmoutputinputconnectablestorable
object X rotate pivot
constraintRotatePivotY (crpy) distance (double)0.0cmoutputinputconnectablestorable
object Y rotate pivot
constraintRotatePivotZ (crpz) distance (double)0.0cmoutputinputconnectablestorable
object Z rotate pivot
constraintRotateTranslate (crt) double3outputinputconnectablestorable
object rotate pivot translate
constraintRotateTranslateX (crtx) distance (double)0.0cmoutputinputconnectablestorable
object X rotate pivot translate
constraintRotateTranslateY (crty) distance (double)0.0cmoutputinputconnectablestorable
object Y rotate pivot translate
constraintRotateTranslateZ (crtz) distance (double)0.0cmoutputinputconnectablestorable
object Z rotate pivot translate
offsetTranslate (ot) double3outputinputconnectablestorablekeyable
object translate offset
offsetTranslateX (otx) distance (double)0.0cmoutputinputconnectablestorablekeyable
object X translate offset
offsetTranslateY (oty) distance (double)0.0cmoutputinputconnectablestorablekeyable
object Y translate offset
offsetTranslateZ (otz) distance (double)0.0cmoutputinputconnectablestorablekeyable
object Z translate offset
offsetRotate (or) double3outputinputconnectablestorable
object rotate offset
offsetRotateX (orx) angle (double)0.0degoutputinputconnectablestorablekeyable
object X rotate offset
offsetRotateY (ory) angle (double)0.0degoutputinputconnectablestorablekeyable
object Y rotate offset
offsetRotateZ (orz) angle (double)0.0degoutputinputconnectablestorablekeyable
object Z rotate offset
constraintTranslate (ct) double30.0, 0.0, 0.0outputconnectable
output point position
constraintTranslateX (ctx) distance (double)0.0cmoutputconnectable
output X point position
constraintTranslateY (cty) distance (double)0.0cmoutputconnectable
output Y point position
constraintTranslateZ (ctz) distance (double)0.0cmoutputconnectable
output Z point position
constraintRotate (cr) double3outputconnectable
output orientation
constraintRotateX (crx) angle (double)0.0degoutputconnectable
output X orientation
constraintRotateY (cry) angle (double)0.0degoutputconnectable
output Y orientation
constraintRotateZ (crz) angle (double)0.0degoutputconnectable
output Z orientation
constraintRotateOrder (cro) enum0outputinputconnectablestorable
Input constrained object rotate order value.
restTranslate (rst) double30.0, 0.0, 0.0outputinputconnectablestorable
The rest translation defines the output of the constraint when all weights are zero. It is used when the enableRestPosition attribute is true.
restTranslateX (rtx) distance (double)0.0cmoutputinputconnectablestorable
rest x translation
restTranslateY (rty) distance (double)0.0cmoutputinputconnectablestorable
rest y translation
restTranslateZ (rtz) distance (double)0.0cmoutputinputconnectablestorable
rest z translation
restRotate (rsrr) double3outputinputconnectablestorable
rest orientation
restRotateX (rrx) angle (double)0.0degoutputinputconnectablestorable
rest X orientation
restRotateY (rry) angle (double)0.0degoutputinputconnectablestorable
rest Y orientation
restRotateZ (rrz) angle (double)0.0degoutputinputconnectablestorable
rest Z orientation