Code samples
 
 
 

New types of constraints can be developed using the Open Reality SDK, expanding the existing set of constraints available in MotionBuilder. These new constraints are available under 'Constraints' in the asset browser, whena new constraint is added.

To see the plugins in MotionBuilder:

  1. Build the sample plugins.
  2. Choose Asset Browser > Constraints.
  3. Drag and drop a new constraint in the viewer.

Constraints samples

constraint_template

Template for new constraints: has no particular functionality, but shows the basics of developing a constraint in MotionBuilder. It has a layout with a button, and shows how to create and manage a layout for a constraint.

constraintdeformer

Simple deformation constraint: shows the basics of deformation constraints by affecting the displacement of a constrained object.

To test:

  1. Drag and drop OR - Q-Stretch Deformation Constraint into the viewer.
  2. Add a marker as the source object (Alt-Drag).
  3. Add a cube as the deform object (Alt-Drag).
  4. Activate the constraint.
  5. Move around the marker. The cube displaces non-linearly, like a damping constraint.

In the layout, you can modify the displacement multiplier to get the cube to deform towards or away from its actual position.

constraintposition

Re-implements the Position from Positions constraint in MotionBuilder, showing how simple relations can be encapsulated in a new box.

To test:

  1. Drag and drop OR - Position from Position Constraint' in the viewer.
  2. Add two markers to the scene.
  3. Assign them as source and constrain objects in the constraint with Alt+Drag.
  4. Activate the constraint; it should move on top of the source object because the constraint uses the source position to set the position of the constrain object.