Nodes
pointOnPolyConstraint
Show frames
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 name | Parents | Classification | MFn type | Compatible function sets |
---|
pointOnPolyConstraint | constraint | animation | kPointOnPolyConstraint | kBase 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) | Type | Default | Flags |
---|
|
offsetRotate
(or )
| double3 | |     |
|
| offsetRotateX
(orx )
| angle (double) | 0.0deg |      | |
|
| offsetRotateY
(ory )
| angle (double) | 0.0deg |      | |
|
| offsetRotateZ
(orz )
| angle (double) | 0.0deg |      | |
|
|
offsetTranslate
(ot )
| double3 | |      |
|
| offsetTranslateX
(otx )
| distance (double) | 0.0cm |      | |
|
| offsetTranslateY
(oty )
| distance (double) | 0.0cm |      | |
|
| offsetTranslateZ
(otz )
| distance (double) | 0.0cm |      | |
|
|
constraintParentInverseMatrix
(cpim )
| matrix | identity |     |
|
|
constraintRotate
(cr )
| double3 | |   |
|
| constraintRotateX
(crx )
| angle (double) | 0.0deg |   | |
|
| constraintRotateY
(cry )
| angle (double) | 0.0deg |   | |
|
| constraintRotateZ
(crz )
| angle (double) | 0.0deg |   | |
|
|
constraintRotateOrder
(cro )
| enum | 0 |     |
|
|
constraintRotatePivot
(crp )
| double3 | |     |
|
| constraintRotatePivotX
(crpx )
| distance (double) | 0.0cm |     | |
|
| constraintRotatePivotY
(crpy )
| distance (double) | 0.0cm |     | |
|
| constraintRotatePivotZ
(crpz )
| distance (double) | 0.0cm |     | |
|
|
constraintRotateTranslate
(crt )
| double3 | |     |
|
| constraintRotateTranslateX
(crtx )
| distance (double) | 0.0cm |     | |
|
| constraintRotateTranslateY
(crty )
| distance (double) | 0.0cm |     | |
|
| constraintRotateTranslateZ
(crtz )
| distance (double) | 0.0cm |     | |
|
|
constraintTranslate
(ct )
| double3 | 0.0, 0.0, 0.0 |   |
|
| constraintTranslateX
(ctx )
| distance (double) | 0.0cm |   | |
|
| constraintTranslateY
(cty )
| distance (double) | 0.0cm |   | |
|
| constraintTranslateZ
(ctz )
| distance (double) | 0.0cm |   | |
|
|
restRotate
(rsrr )
| double3 | |     |
|
| restRotateX
(rrx )
| angle (double) | 0.0deg |     | |
|
| restRotateY
(rry )
| angle (double) | 0.0deg |     | |
|
| restRotateZ
(rrz )
| angle (double) | 0.0deg |     | |
|
|
restTranslate
(rst )
| double3 | 0.0, 0.0, 0.0 |     |
|
| restTranslateX
(rtx )
| distance (double) | 0.0cm |     | |
|
| restTranslateY
(rty )
| distance (double) | 0.0cm |     | |
|
| restTranslateZ
(rtz )
| distance (double) | 0.0cm |     | |
|
|
target
(tg )
| compound | n/a |      |
|
|
| targetUVSetName
(tnm )
| string | NULL |     | |
|
|
| targetUseNormal
(tun )
| bool | 1.0 |     | |
|
| targetWeight
(tw )
| double | 1.0 |      | |
|