On this page | |
Since | 18.0 |
Overview ¶
This node rivets an object to the centroid of a set of points.
This node can also optionally add a look at constraint to the riveted object.
Solaris constraints ¶
Currently, USD does not support constraints. Parametric constraints are probably antithetical to USD’s design mission of being descriptive, immutable, and idempotent.
As a layer above USD, that generates USD, the LOP network can compute dynamic constraints, and “bake” the results as time samples when it writes the USD to disk.
Tips ¶
-
The constraint LOP nodes work by converting USD geometry into SOPs, then applying constraint CHOP nodes to the SOP geometry, then applying changes back onto the USD primitives as overrides. Because of this, the nodes sometimes use SOP terminology (for example, “point groups” and “primitive groups”), even though they work with USD data. Future versions of Houdini may change this to be clearer.
-
In VEX snippets, you can use
@
variable names containing colons (:
). This makes it easier to automatically bind certain USD attribute names (for examplei@primvars:foo
). (These names are not normally legal in names in VEX source code. The node automatically encodes these kinds of names when used in a snippet.)
Parameters ¶
Source ¶
Type
Whether the source (the thing to be constrained) is a regular primitive, or a point instance.
Source Instances
When Source ▸ Type is “Point Intance”, the point instance to use, using /‹path›[‹instance_index›]
syntax (for example, /geometry/instancer[1]
).
Points ¶
Target Source
Where to get the points to constrain to, either the first input or the second input.
Type
Whether the points are in a regular primitive, or a point instance.
Constraint Options ¶
Import Time
Specify the frame at which the source and/or target geometry are imported into the embedded sopnet to build the constraints. The default “$FF” expression forces the constraint LOP to be time dependent, which is needed when operating on a non time-dependent network that has time samples driving the source or target primitives. However, for better performance with a non time-dependent network with no time samples, it is recommended to use a static value instead.
Maintain Local Offset
When this is off (the default), the source object snaps to the constraint position. When this is on, the object maintains the same relative distance between itself and the constraint position.
Mode
Whether to get the points from a point geometry subset, or from the points of a polygon face subset.
Group
The name of a geometry subset containing the points to constrain to.
Weights
The weights assigned to the first three points in the group.
This lets you fine tune the exact position of the rivet origin on the plane constructed from the first three points.
For example, the weights 0.5, 0.5, 0
will place the origin half way between the first and the second point.
The weights should not add up to 0. Any points beyond the third always have weight 1.
Use Snippet
Set the Group and Weights using a VEX snippet. The snippet should write the group into a group
string variable, and the weights into a weights
vector variable. The snippet is evaluated for each source prim. @ptnum
is the index of the current prim being constrained. You can use npoints(0)
to get the total number of prims being constrained. You can use @Frame
and @Time
to make the snippet time-dependent.
Orientation ¶
Look At Mode
How to compute the look at direction for the riveted object.
None
Don’t rotate the source object to look at anything.
Direction Attribute from Points
Use the average of a vector attribute on the points.
Direction Vector from P0 to P1
Use the direction from the first point in the group to the second point.
Normal Vector from P0,P1,P2 Plane
Use the direction perpendicular to the plane of a triangle formed by the first three points in the group.
From Primitive
Rotate the source object to point at a specific prim.
Look At Source
When Look at mode is “from primitive”, where to get the primitive to look at (the first or second input).
Look At Xform
When Look at mode is “from primitive”, the scene graph path of the prim to look at. (This does not support looking at a point instance.)
Look Up Mode
How to compute the up vector.
Up Vector Attribute from Points
Use the average of a vector attribute on the points.
Direction Vector from P0 to P1
Use the direction from the first point in the group to the second point.
Normal Vector from P0,P1,P2 Plane
Use the direction perpendicular to the plane of a triangle formed by the first three points in the group.
X Axis
Use the world +X direction as the up vector.
Y Axis
Use the world +Y direction as the up vector.
Z Axis
Use the world +Z direction as the up vector.
From Primitive
Rotate the source prim so its up vector points at a specific prim as it moves along the curve.
Custom
Use the vector in the Up vector parameter.
Up Vector Source
When Look up mode is “from primitive”, where to get the primitive to point the up vector at (the first or second input).
Up Vector Xform
When Look at mode is “from primitive”, the scene graph path of the prim to point the up vector at. (This does not support point instances.)
Look At Axis
Which axis on the source object to match to the look at vector. You can use this to compensate for the orientation the source object was created in. This can’t be the same as the Look up axis.
Look Up Axis
Which axis on the source object to match to the up vector. You can use this to compensate for the orientation the source object was created in. This can’t be the same as the Look at axis.
Direction Attribute
When Look at mode is “Direction Attribute from Points”, the name of a vector attribute on the points to average to get the look at direction.
Up Attribute
When Look up mode is “Up Vector Attribute from Points”, the name of a vector attribute on the points to average to get the up vector.
Roll
Roll angle (in degrees) around the look at direction.
Use Snippet
Set the roll using a VEX snippet. The snippet should write the roll degrees to the roll
variable. You can use the variables typically available to an Attribute Wrangle SOP. @ptnum
is the index of the current prim being constrained. You can use npoints(0)
to get the total number of prims being constrained. You can use @Frame
and @Time
to make the snippet time-dependent.
The initial value of roll
(at the start of the snippet) is the evaluated value of the Roll parameter. So you can use an expression in that parameter to compute a “base” value, and modify it using the snippet.
Examples ¶
PointsConstraint Example for Points Constraint
This example contains a number of various uses for the Points Constraint LOP.
See also |