Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
Constraints can be applied to simulated objects to restrict or limit their movement, and in Reactor there are quite a few different methods that you can choose from in order to create those restrictions in the way things move. You'll find constraints that act like springs and hinges, even a style that allows one object to be constrained down to another. Using a file named Constraints, let's take a look at two constraint types in particular. The scene we're using consist of a metal pole, a wooden plank that will swing back and forth, a weight on the left- hand side of the plank that will be used to influence the plank's motion, and a cube hanging over the right-hand side of the plank that will drop down in our scene to initiate the movement.
Now, in order to pull things off here, we're going to be using two different kinds of constraints: one called a hinge constraint that we'll use to have the wooden plank rotate or pivot in relation to the metal pole, and another referred to as a point-to-point constraint that will allow us to attach toolbar objects together having those objects react relative to each other, having a single attachment point in common. The Hinge constraint will be used to spin the wooden plank, while the point-to-point constraint will secure the metal weight below the plank to the plank.
In order to set this up, our scene will require two additional elements: a Rigid Body Collection that will hold all of our objects and a helper container that will be used to hold and simulate our two constraints. Reactor calls that container a Constraint Solver. Let's first create a Rigid Body Collection. We'll select all of our objects using the Ctrl+A shortcut. Then in the Reactor toolbar, on the left- hand side, up at the top, we'll click on the icon that reads Rigid Body Collection.
Once we have the collection in our scene, we'll activate the Move command and move the icon to the right. Now, let's go ahead and add in our two constraints. We'll first work on the hinge, but before the constraint comes into play, we're going to want to select the two objects in our scene that will be influenced by that constraint. That will be the pole and the plank. Now when you click one, just hold the Ctrl key down. Then click on the other. Back in the Reactor toolbar on the left, down at the bottom you'll see an icon that looks like a door hinge. That's your Hinge Constraint.
When you find it, go ahead and click. Now, the constraint creates an invisible axis that attaches to the pole and allows the plank to spin around it in the direction of the arrow. The next thing we're going to want to do, over on the right, is identify the parent and child. We're going to want the parent to be pole and the child to be the plank. Now because of the way we made our selection, we are already set up correctly. If your object names read different, click on the name next to Parent, clicking on the parent object--that being the pole. Then click on the name next to the child, clicking on the child object, which will be the plank.
Once we've done that, we'll go ahead and create our point-to-point constraint. Now again, the process begins by first identifying the two objects in the scene that'll be influenced by that constraint. For the point to point, that's going to be the plank and then the weight, down to its left-hand side. Go ahead and select both of those. This time to create our constraint, we'll use the handy Quad menu. We can access that by using the Shift+Alt+Right-click combo. Go ahead. When the menu opens, in the lower left-hand quadrant choose Point-Point Constraint.
Now again, back on the ride we're going to have to identify the parent and child for this particular constraint. We are going to want the parent to be the plank and the weight to be the child. So as things currently read, to the right of parent, I'll click on the name Weight. Now back in the scene, I'll now click physically on the plank. That should change as what's going to serve as our parent. Now for our child object, to the right of Child where it says Plank, go ahead and click. Then back in the scene, we'll go ahead and click on that little metal weight down to the left-hand side.
When we are done, just be sure things are set up correctly. The plank should be the parent and the weight should be the child. Once we've done that, we can now add in our Constraint Container. On the Reactor toolbar, we'll choose Constraint Solver. It's going to look like a torus knot. We'll click on the button. Then we can click anywhere within the view. Now once we've done that, over in column on the right we will go to our Properties. From here, we are going to have to identify both the Rigid Body Collection and our two constraints.
Under RB Collection, click on the None button. Then click on the Rigid Body icon. For the two constraints, we'll go down below the window, clicking on the Add button. Then from the list, we can choose both Hinge and Point-Point. Now, in order for our simulation to run properly, we'll need to give a few of our objects a little bit of weight. We'll do that by first selecting each object, then changing their Mass value inside their Property Editor. Let's start with the cube up at the top. We'll select the cube. Then to activate the Property Editor, I'll simply Shift+Alt+Right-click.
In the menu down in the lower- right, I'll choose Open Property Editor. For the cube, let's give it a mass of 10. Leaving the Property Editor open, let's now click on Plank. In its settings, we'll also change its mass to 10. Once that's in place, we'll go ahead in the view and click on the weight. Then back in the Property Editor for its Mass value, we'll type in 5. Once we're done with that, we can go ahead and close the Property Editor. Let's go ahead and run our sim and see how things look.
I will hold down Shift+Alt+right- click--in the menu on the lower-right, choosing Preview Animation. Now before you run this, let's roll our wheel inside the Preview window so we can zoom in just a bit. Then to begin our play, we'll simply type P. You can see how the Plank is swinging around, being controlled by the Hinge Constraint, while the weight swinging around at the bottom of the plank is being constrained at the left-hand edge of the plank.
If we wanted to change the behavior of our objects, we could simply go back in and adjust a few of the Physical Properties. Let's select the plank and open up its Property Editor. Once open, we'll change its Mass setting to 15. Keeping the Property Editor open, we'll select the weight in the scene and change its mass to 10. Let's run our preview again.
Boy, what a difference that made! Now if your preview seems to stop a little prematurely, you might need to go into the Constraint Solver and adjust what is called the Deactivation Threshold. This is what controls just how long the constraining influence lasts. So we'll close our Preview window and select the Constraint Container or Solver down to the lower right-hand side of our view. In the Modify column down below the second window, you'll find the Deactivation Threshold. Let's change that value to one. Then create another preview.
That will give you a little taste as to how constraints in Reactor work. When you're running a simulation that needs something in your scene restricted in some way, it will be a constraint and a Constraint Solver as a holding container that will make it all possible.
Get unlimited access to all courses for just $25/month.Become a member
107 Video lessons · 33156 Viewers
94 Video lessons · 23002 Viewers
78 Video lessons · 9384 Viewers
147 Video lessons · 3130 Viewers
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.
Your file was successfully uploaded.