Scene > Constraint Editor
Control the behavior and relationships between multiple objects in a scene with the Constraint Editor. Design intricate and dynamic animations and interactions without the need for programming expertise. Create a position, orientation, aim, or parent constraint, then drag and drop nodes you want constrained from the Scenegraph or their corresponding modules into the Constraint Editor.
What Are Constraints?
Constraints apply a rule or limitation to an object or a set of objects, defining how they relate to each other and can move or be transformed. Constraints restrict an element's degree of freedom, ensuring it behaves predictably and maintains design intent, as the model is modified.
A constraint consists of the following:
Target object, which is what the constrained object is linked to.
Constrained object, which is the object whose properties are being controlled by the constraint. It's the object that will react to changes in the target object.
In the example below, the constraint links the properties of a target (the red button) to the constrained objects (the black buttons). The target's position controls the constrained objects. As demonstrated here, constraints can be applied to one or more objects within a model.
Constrained objects can be geometry, lights, cameras, and groups. Find a dashed line connected to any constrained objects and to the constraint selection handle, which is connected to the target object. VRED uses these to visually indicate the constraint relationship.
Available Constraints in VRED
VRED offers the following types of constraints:
Position Constraint - Limits the movement (translation/position) of the constrained object to follow one or more target objects. Objects will remain in a specific position, when enabled to maintain the integrity and functionality of a design.
A position constraint consists of a target, which is used to fix an object to a specific coordinate, align it with another object, or maintain a certain distance between objects, and constrained node.
Orientation Constraint - Limits the constrained object's rotation so it follows one or more target objects, aligning its axes with the target object's orientation. Use this to ensure components or elements maintain their intended angles, rotations, or alignments, which is essential for the proper functioning and assembly of a design.
An orientation constraint consists of a target that it is always oriented towards and constrained node.
Aim Constraint - Directs the constrained object to always point toward a target object or point in space. This constraint is commonly used in animation to ensure objects, such as cameras, lights, or character eyes, maintain their focus on a particular target as it moves.
The aim constraint includes an up vector target node and target node, like an aim and up camera in the Camera Editor.
Parent Constraint - Allows the constrained object to inherit the transformation properties (position, rotation, and scale) of the target parent object. This creates a parent-child relationship between objects, without actually placing them in a hierarchical structure within the Scenegraph. The constrained object (child) follows the movements and transformations of the target parent object, while still maintaining the ability to have its own adjustments.
The parent constraint include the following:
Parent constraints are useful in animation and rigging because they enable the creation of hierarchical relationships between objects, making it easier to manage complex movements and interactions. For example, in character animation, a hand can be constrained to a prop, ensuring it follows the prop's movements, while still allowing for additional hand animation.
Toolbar
Create Constraints - Select the type of constraint created from its menu. Choose from: Position Constraint, Orientation Constraint, Aim Constraint, and Parent Constraint. See Available Constraints in VRED to learn about each of these constraints.
Duplicate (Ctrl + D) - Creates an independent copy of the selected constraint.
Delete (Del) - Removes the selected constraint from the library when it's not in use.
Create Group (Ctrl + G) - Creates a node for grouping nodes. Once created, drag and drop content into it.
All Editors (Ctrl + N) - Opens the Camera Editor, Light Editor and Scenegraph.
Remove Selected Assignment (Backspace) - See Remove Selected Assignment in the Menu Bar section.
Remove All Assignments - See Remove All Assignment in the Menu Bar section.
Delete All Empty Constraints - See Delete All Empty Constraints in the Menu Bar section.
Search and Filtering
The Constraint Editor has a basic search and filtering.
The search bar provides live-search capabilities for constraints. It is helpful for quickly identifying constraints in complex scenes without browsing through a vast constraint list. Search using a single letter or search term. Note that only single search terms and regular expressions are supported. Entering one character shows only constraints containing the character.
Right-clicking within the search bar provides a context menu with undo, redo, cut, copy, paste, delete, and select all options.
When used with Filter Search Depth, the search goes from being a top-level search of only parent constraints and groups, to a more thorough deep hierarchy search.
Use Filter Search Depth to toggle between flat and recursive matches. When disabled, only top-level matches appear. When enabled, matches deeper in the hierarchy appear.
|
Use to toggle filtering on or off and access the Filter Selection menu for configuring the filter settings.
Press-hold to access the Filter Selection menu for configuring the filter settings. Use it to filter by constraint type, toggle between different things, select all, invert the selection, or clear the selection/filtering. Use these options in conjunction with a search term and search depth
to further define a search.
Constraint Lister
The content displayed in the Constraint Lister is defined by search and filtering and the dropdown menu in this section. Use the dropdown menu to further define the content by choosing from displaying all constraints, all objects, only cameras, or only lights.
Right-click to access the Constraint Lister context menu, containing options found in the menu bar.
Selecting an element in the Constraint Lister selects it in its editor, displays it in the scene, and loads its settings into the Attributes. If multiple elements are selected, any fields highlighted blue indicate unique settings for that field. In the case below, there are two unique names.
Work with two views by dragging the handle at the bottom of the lister to expose a second one. The search and filtering tools act only on their view. Use it to add a constraint into a group or to another constraint for creating more complex workflows.
The slider and its buttons are a fast way to expand or collapse the sub-structure of the selection or multi-selection. With nothing selected, all nodes are expanded.
Click to collapse the hierarchy of the selected node or
to expand it.
Attributes
When the top node of a constraint is selected, these options appear to determine whether the constraint is used and provides a means for identifying it and its function.
Active - Sets the constraint as active or inactive. When active, VRED restricts the range of motion to that of the constraint. When inactive, the range of motion is ignored and not restricted.
Name - Displays the name of the selected constraint. Use this field for edit the name.
Description - Provides a description of what the constraint does. For example, "This gear example illustrates how rotations can be transferred between objects, considering the need for acceleration, deceleration, or inversion." Use the to modify the text and
to delete the description.
These options determine if constraint visualizations, such as the dashed line and handles, are displayed and their size.
Show Constraint - Displays or hides the dashed line connecting the constraint object and target, as well as the constraint handles. Use Scale to change the size of the handles.
Scale - Sets the size of the contraint handles. Increasing the number increases the constraint size for easier selection in the scene.
Scale = 1000 | Scale = 2000 |
---|---|
![]() |
![]() |
Only available for Aim Constraint > Constrainted Nodes objects.
Aim - Sets the camera aim orientation to always point it towards a target object.
Up - Sets the camera up direction, ensuring proper orientation.
Use Rotation Orientation - Controls how an object rotates by defining the pivot around which the rotation occurs, and then constraining that rotation to a specific axis. This enables precise control over how objects animate or are manipulated, ensuring they rotate naturally and as intended.
Only available for Aim Constraint > Up Vector Target Nodes objects.
Only available for Target Nodes objects.
Use Maintained Offset - Maintains an offset between the constrained and target object, enabling the constrained object to follow the target, while keeping a specific distance, rotation, and/or scale. This is the default (enabled) and this offset is set before the objects are constrained.
With large data sets, this option should be enabled, as existing offsets will not be changed. However, for new imported data, having this disabled might be useful if offsets need to be finely adjusted.
However, if Use Maintained Offset is disabled, the constraint object inherits the position, rotation, and/or scale of the target object. This results in the constraint object appearing over the target. Use the following offset X, Y, Z options to manually set the offset.
Rotation Offset - Only available for orientation and parent constraints. Manually sets how much the constraint rotation is offset along the X, Y, and Z axes. Define these by using red for X, green for Y, and blue for Z.
Translation Offset - Only available for position and parent constraints. Manually sets how much the constraint translation is offset along the X, Y, and Z axes. Define these by using red for X, green for Y, and blue for Z.
Scale Offset - Only available for parent constraints. Manually sets how much the constraint rotation is offset along the X, Y, and Z axes. Define these by using red for X, green for Y, and blue for Z.
From Target - Specifies the type of transformation applied from the target object. Choose from:
Object - Uses the coordinate system from an object’s point of view, with the object’s pivot point being the origin. Object space is used to set the position of an object relative to its pivot point.
World - Uses the coordinate system of the entire scene. All objects are placed in a 3D universe defined by their coordinates relative to the center of the scene.
To Constrained - Specifies the type of transformation applied to the constrained object. Choose from:
Object - Uses the coordinate system from an object’s point of view, with the object’s pivot point being the origin. Object space is used to set the position of an object relative to its pivot point.
World - Uses the coordinate system of the entire scene. All objects are placed in a 3D universe defined by their coordinates relative to the center of the scene.
Uniform Scaling Factor - Sets the same X, Y, and Z scaling for the speed of the constrained motion, when enabled. When disabled, different values can be set for X, Y, and Z using the Scaling Factor fields.
Scaling Factor - Changes the speed of the constrained motion.
Scaling Factor changes must occur on the same axis as the target for changes in speed to occur. If a Scaling Factor value is set for a different axis than the one the target is moving along, there is no change.
A value of 1, matches the speed of the constrained object with the target.
Large values, whether positive or negative, multiply the transformation applied to a constrained object along that axis, making it move faster than the target and eventually overtaking it.
Small values slow the motion, causing the constrained object to move slower than the target and eventually lag behind. This can be especially helpful when translations or rotation directions change, as seen in a gear mechanism.
To set different X, Y, and Z scaling factor values, disable Uniform Scaling Factor.
Use constraints to control the behavior and relationships between multiple objects. This section contains instructions on creating constraints, selecting, saving, and undoing them, as well as how to export all constraints applied to scene to a single constraints file.
Creating a Constraint
Use and choose the type of constraint to create. When a constraint is created, it is added to the Constraint Lister and its attributes, which can be adjusted, are loaded into the panel to the right. Drag nodes from the Scenegraph or other editors onto the target and constrained nodes to create constaint relationships.
Click and choose the type of constraint to create.
In the Constraint Lister, expand the new constraint.
Drag one or more nodes from the Scenegraph or other editors onto the Target Nodes node to create a target object. Drag another node onto the Constrained Nodes node to create a constrained object.
Now, if you move the target object (the red lever), the constrained object(s) follow.
(Optional) In the Constraint Lister, select the parent of the Target and Constrained Nodes to modify its settings. It can be set as active or not, renamed, and a description can be added. Determine whether the constraint handles are visible and their size. Select the dragged object node to make changes to the weighting.
Selecting a Constraint
The constraint handle can be selected in the viewport using Shift + LMB, but it must be visible and large enough to select. You can also right-click the constraint node and select Select Objects In > Scenegraph. When a constraint handle is selected, its targets are selected and highlighted yellow in the viewport. In the Scenegraph and Constraint Editor (if open), they will be selected and highlighted blue.
In the toolbar, ensure Transform and Boundings are enabled.
In the Constraint Editor, expand the parent node and select a constraint node. In the example, the Arrow
folder was expanded and Orientation Constraint
node is selected.
Ensure Show Constraint is checked and increase Scale to a larger value, such as 300, to easily see and select the constraint handle.
Scale = 100 | Scale = 300 |
---|---|
![]() |
![]() |
Now, either Shift + LMB the constraint handle to select it or right-click the constraint node and select Select Objects In > Scenegraph.
Saving a Constraint
When constraints are created and the scene is saved as a .vpb, using File > Save or Save As, they are preserved in geometry assets and work as espected when reloaded into a scene.
Constraining a Clipping Plane
To set up a constrained and movable clipping plane, use a World-to-Local approach. This calculates the world transformation, yet applies the constraint locally to the clipping plane. This ensures the clipping plane is constrained to another node, using a parent constraint, and can move.
In the Constraint Editor, once a constraint is created, expand it to expose the Constrained Node node.
In the Scenegraph, drag and drop a clipping plane onto Constrained Nodes in the Constraint Editor.
In the Constraint Editor, select the clipping plane, then in the Apply Transformation section, set From Target to World and To Constrained to Object.
Undoing Constraint Creation and Deletion
Through the UI, a constraint cannot be uncreated or undeleted. However, using Python it can be done with vrConstraintService.
Exporting an Evaluation Sequence
Export all constraints applied to scene to a single constraints file, using Export Evaluation Sequence. Use it, for example, to share, reorder, and enable/disable constaints within a constraint set.
Go one step further and apply object limits, alongside constraints, to restrict the range of motion for target or constraint nodes. Use the Translation, Rotation, and Scaling Limits in the Transform Editor for aiming constraints and Translation and Rotation limits in the Camera Editor for restricting camera movement. These enable object limits to be set on the movement, rotation, and scaling of a target, restricting its transformation to the ranges set. Though you can use these alongside constraints, they are not mandatory to restrict the target or constraint node. Quickly constrain the translation, rotation, and scaling along the X, Y, and Z axes, by defining these with the From/To limits. Red is X, green is Y, and blue is Z.
To Limit an Object Node
In the Scenegraph, select the node to limit.
In the Quick Access Bar, select Transform to open the Transform Editor.
With the node selected in the Transform Editor, in the Basic tab of the Attributes, expand the section for the transform to be limited. For example, Translation.
Click the box in front of the limits section to enable it, then expand the section and set the limits.
To Limit a Camera Node