GeoConstrain
The GeoConstrain node allows you to constrain geometry, cameras, lights, and more, to other prims in your scene, when working with USD.
To use this node, connect it to your node graph and go to the Properties tab:
- Set a Mask to define the prim you want to constrain, and a Target Path to define a different prim you want to constrain to.
- Set a Target, choosing whether you want to target a specific face or vertex, or just constrain to the origin of the target prim.
- Choose the Constraint Type from: Look At, Parent, Transformation, Translation, Rotation, or Scale.
Type |
Function |
LookAt |
Allows your constrained prim to always face and look at the target prim you are constraining to and functions much like the LookAt input pipes in the classic system. |
Parent | Allows your constrained prim to match the translation, rotation and scale of the target prim and allows you to set whether you want that transformation to be absolute or relative to the constrained prims existing location in world space, using the maintain offset knob. |
Transformation | Acts similarly to the Parent constraint but is a quick way to just constrain via translation or rotation |
Translation | Matches the location transformations of the prim to that of the target. |
Rotation | Matches the rotation transformations of the prim to that of the target. |
Scale | Matches the scale transformations of the prim to that of the target. |
• The Maintain Offset Frame knob allows you to define if you would like to constrain your masked prim to the target prim in absolute terms (so in the exact same location of your target prim), or in relative terms (so transforming with, but offset from the target prim).
• The Point control allows you to set whether you wish to target the origin of the prim you wish to constrain to, a specific vertex on the prim, or the center of a specific face on the prim. The picker icon allows you to select the relevant vertex or face on the mesh that you wish to constrain to.
• The Time knob control allows you to set whether you want to set a time offset for your constraint by using Relative mode and setting the frame offset you would like. Or you can work in Absolute mode to essentially create a FrameHold for the constraint.
Note: You can control the strength of the constraint and define the axis you are constraining on using the Look Axis knob.
Tip: The Extra Transform knobs allow you to offset your constrained prim in world space in case you want the prim to lag behind your target and the time offset allows you to set if you would like the constrained prim to move by an offset time value.
Inputs and Controls
Control (UI) |
Knob (Scripting) |
Default Value |
Function |
GeoConstrain |
|||
Mask | mask_patterns | All roots |
Define the prim you want to constrain. This defaults to All roots. You can use standard glob-style variables, such as /*, to create masks or use individual prim names separated by spaces. All roots - select the top level Xform(s) in your scene. Last modified - selects whatever the last node modified was. All Cameras - selects all Cameras in your scene graph. All Lights - select all lights in your scene graph. All Meshes - selects all meshes in your scene graph. Custom - sets a custom selection of prims that exist in your scene graph. |
Target Path |
target_path |
N/A |
Define the path of a different prim you want to constrain to. |
Point |
target |
Origin |
Choose what to target. Origin - the origin of the target object. Vertex - a fixed vertex number on the target mesh. Face - a fixed face number on the target mesh. Selection - a vertex or face selection on the target. |
Time | time_mode | Relative |
Allows specification of how much time offset is desired for the the target point or the time to use for the target point. Relative - allows targeting the past or future of the target point by specifying a time offset from the current time. Absolute - allows targeting the target point at a particular time by specifying a given time to use |
Time | time_offset | 0 | A time offset for the constraint, allowing targeting the past or future of the target point |
Constraint | |||
Type | constraint | LookAt | Choose the Constraint Type from Look At, Parent, and Transformation, Translation, Rotation, or Scale. See descriptions in table above. |
Look Axis | look_axis | +Z | Defines the axis around which the 3D object is rotated to face the look input. |
Rotate X | look_rotate_x | on | Determines whether the rotation occurs around the X axis. Note that for the rotation to truly "look at" the look input, all three of these options must be activated. |
Rotate Y | look_rotate_y | on | Determines whether the rotation occurs around the Y axis. Note that for the rotation to truly "look at" the look input, you have to set all three of these options. |
Rotate Z | look_rotate_z | on | Determines whether the rotation occurs around the Z axis. Note that for the rotation to truly "look at" the look input, you have to set all three of these options. |
Look Strength | look_strength | 1 | Determines to what extent the 3D object rotates to the new orientation. The smaller the value, the less the object is rotated. Setting the value to 0 produces no rotation. |
Extra Transform |
|||
Coordinate System | coordinate_system | Point |
Coordinate system to use: Point - coordinate system at the target point. Prim - coordinate system of the target prim. World - world coordinate system. |
Snap | geosnap_operation | N/A |
Choose what a selection in the Viewer or pivot point is snapped to in the Viewer: • Geo to • Geo to • Geo to • Pivot Point to • Pivot Point to • Pivot Point to
• Pivot Point to |
Transform Data |
file_menu |
N/A |
Select to import or export a channel file: • Import chan file - import a channel file and transform the object according to the transformation data in the channel file. Channel files contain a set of Cartesian coordinates for every frame of animation in a given shot. You can create and export them using Nuke or 3D tracking software, such as 3D-Equalizer, Maya, or Boujou. • Export chan file - export the translation parameters that you’ve applied to the object as a channel file. This is a useful method of sharing setups between artists. |
Translate |
translate |
0, 0, 0 |
Lets you translate the object along the x, y, and z axes. You can also adjust translate values by clicking and dragging the object in the 3D Viewer. |
Rotate |
rotate |
0, 0, 0 |
Lets you rotate the object around the x, y, and z axes. You can adjust rotate values by holding down Ctrl/Cmd and dragging in the 3D Viewer. |
Scale |
scaling |
1, 1, 1 |
Lets you scale the object on the x, y, and z axes. |
Uniform Scale |
uniform_scale |
1 |
Lets you scale the object simultaneously on the x, y, and z axes. |
Skew |
skew |
0, 0, 0 |
Lets you skew the object on the x, y, and z axes. |
Local Matrix |
|||
Specify Matrix |
use_matrix |
off |
Enable this control to specify matrix values for the object you’re transforming as an alternative to setting transform, scale, skew and pivot values above. |
Matrix |
matrix |
N/A |
The matrix displays values from the object’s transform, rotate, scale, skew, and pivot controls. Check specify matrix and copy or drag-and-drop matrix values from another object to apply those values, for example, if you wanted to align objects in a scene. |