# Adding a rigid constraint and creating breakability

## Video: Adding a rigid constraint and creating breakability

As with objects in the real world, objects in a MassFX simulation are subject to the laws of physics, in particular gravity. In order to remain in a fixed position once a simulations start, they need to either be standing firmly on another static rigid body, such as the MassFX ground plane for instance, or be fixed somehow to another object in the scene. In this video, we will walk through accomplishing the latter in MassFX by making use of its constraint tools.

## Adding a rigid constraint and creating breakability

As with objects in the real world, objects in a MassFX simulation are subject to the laws of physics, in particular gravity. In order to remain in a fixed position once a simulations start, they need to either be standing firmly on another static rigid body, such as the MassFX ground plane for instance, or be fixed somehow to another object in the scene. In this video, we will walk through accomplishing the latter in MassFX by making use of its constraint tools.

A constraint is a MassFX helper object that can be thought of as a joint or a connector between two objects in the simulation. In terms of real-world examples of constraints, we might think of a nail pinning a wanted poster to a tree or a hinge connecting a door to a door frame. Now, there is one extremely important piece of information regarding constraints in MassFX that we need to understand right at the start of our working with them. Constraints use the pivot points of the objects we are constraining together; they use them as the point of connection, so to speak.

It is therefore absolutely critical that our object's transforms have not been messed up in any way, such as can occur if we scale geometry when not in a subobject mode or if we mirror objects using the 3ds Max Mirror tool. This also means that the placement or the location of pivots on objects will itself play a critical role in many situations. To get started then, as you can see in this particular version of our start scene, we have a number of target objects that we will be wanting to hit with the spheres coming from our launchers.

They are all made up of three distinct paths. We have a target body, or frame; we have a gray hinge object; and we have the central target panel itself. Of course at this moment in time, applying a dynamic rigid body modifier to any of these parts and then running a simulation would see them fall to the floor. Let's see though if can change that particular behavior by using a rigid constraint. There are of course, as we may expect by now, a number of ways that we can approach setting up our constraints in MassFX.

For demonstration purposes though, let's see what happens if we simply select one of our target panels and then try to apply a rigid constraint from the MassFX toolbar. What we get is a MAXScript message dialog giving us a critical piece of constraint use information, namely objects connected by a constraint must be rigid bodies. The nice thing here is that the system is offering to apply the required modifiers for us rather than making us go away, take care of it, and then come back.

If I click Yes to accept the offer, we are taken straight into creating the rigid constraint we originally wanted. The first thing we see is a constraint gizmo that could be sized by simply moving our mouse either left and right or up and down. Actually, what is really happening is the closer we move our mouse to our parent object, the smaller the constraint becomes, and of course the opposite is also true. As this helper object houses a number of important options, and because we are going to want to easily select them in the scene, we can set this to be fairly big.

All we need to do then is left-mouse-click to exit Creation mode. Now if we come and run our simulation, we may be a little surprised at the results. Why, you may ask, isn't our dynamic rigid body object dropping to the floor under the influence of gravity, as we have come to expect? And why aren't our dynamic rigid body spheres that are clearly colliding with this panel having any effect on it either? We have, after all, only applied our constraint to this one single object.

With the Constraint helper selected, let's come over to the Command panel. If we take a look in the General options for our constraint, we can see that the panel object has been set as a child in this relationship. But our parent is saying that it is as of yet undefined. With no parent object explicitly specified, the MassFX system constrains a child object to the world itself, essentially pinning it in place in 3D space. Our geometry now acts much like a static rigid body. As we've seen, neither the projectiles nor gravity have any effect on it at all.

In fact if we take a look at the default transform limits that have been set up for our rigid constraint preset, you can see that everything is completely locked. In our particular case, this functionality actually works quite well for us. So let's apply a rigid constraint to our other panel objects. This time we will use a slightly different workflow. So I am just going to use the Ctrl key and then left-mouse-click to select all of the remaining panel objects, and then we can apply a MassFX dynamic rigid body modifier to them from the MassFX toolbar.

If I run the simulation now, as you can see, we get a very expected result: our panels fall to the floor being affected by gravity. What we can do now is again select our target, this time one at a time, and apply a rigid constraint to them. We can do that from the MassFX toolbar. As we go, we do of course want to leave our gizmos quite large so that we can easily select them in the viewport. Once all of our setup is in place, we can again come and run the simulation, and this time we can see that our constraints are working perfect. All of the panels are firmly locked in place, which actually means we can now go and make use of a constraint option that can add a very specific effect to our simulation-- namely the ability to make our constraints breakable.

To do this, all we need to do is, again, use the Ctrl key to select all of our constraint helpers and then we can come across to the Multi-Object Editor. If we just scroll down to the Advanced rollout, we can enable this breakable option by simply putting a check in the box. The Break Force and Break Torque settings control how much force needs to be applied before the constraint will break or turn off. The Break Force controls direct impacts, and Break Torque determines how much twist or rotational force would need to be applied, again, before the break would occur.

Now if I just right-click on both of these spinners for a moment to set them to their minimum values and then if I come and run the simulation again, you can see that there is a danger in setting these values too low. Even a slight shift in the object as the simulation starts applies in a force to turn our constraint off and drop the object to the floor. If we wanted to fix this and yet still keep our values very low, if we just set these two a value of 1 each, you can see that that is enough to keep them fixed in place as the simulation starts.

On the other hand of course, if we set these values to high, we might not get our constraints to break at all, so we do need to set these options with care. In our case, if we set them to, say, 5 and 60 respectively and then come and run the simulation, you can see the constraints are clearly strong enough to hold the objects in place, but only until they are struck with enough force to switch the constraint off. For simply pinning an object or objects in place then, or indeed for creating a locked relationship between two dynamic rigid bodies, the rigid constraint is the perfect tool. But what if we wanted to create something a little more interesting than static or fixed target? Could constraints help us create something a little more challenging, such as a dynamic moving target? We will answer that question in our next video.

Show transcript

#### This video is part of

Creating Simulations in MassFX and 3ds Max

51 video lessons · 2665 viewers

Author

Expand all | Collapse all
1. ### Introduction

3m 27s
1. Welcome
58s
2. Working with the exercise files
46s
3. Setting up the 3ds Max project structure
1m 43s
2. ### 1. Dynamics Simulation 101: Understanding the Basics

39m 20s
1. Why simulate and not animate?
3m 38s
2. A look at gravity and drag
3m 55s
3. Understanding volume, mass, and density
3m 45s
4. What are Newton's laws of motion?
3m 20s
5. Finding believable frames per second and substeps
3m 5s
6. Understanding the difference between rigid and soft bodies
3m 28s
7. More about rigid body types
3m 32s
8. How collisions are calculated
4m 35s
9. Learning the difference between concave and convex meshes
6m 24s
10. What is a constraint and how do we use it?
3m 38s
3. ### 2. The MassFX Approach

24m 20s
1. A look at the MassFX and the 3ds Max user interfaces
5m 52s
2. Exploring the MassFX workflow
5m 14s
3. Discovering ground collision and gravity
4m 49s
4. Adjusting substeps and solver iterations
3m 43s
5. Using the Multi-Editor and the MassFX Visualizer
4m 42s
4. ### 3. Working with Rigid Bodies

44m 11s
1. Breaking down the shot
4m 51s
2. Setting up the launchers
3m 59s
3. Setting up the drop system
4m 30s
4. Prepping the cans
3m 33s
5. Refining the simulation on the launchers
5m 9s
6. Refining the simulation on the colliders
6m 5s
7. Baking out the simulation for rendering
5m 37s
8. Reviewing the simulation with an animation sequence
5m 3s
9. Adding an animation override
5m 24s
5. ### 4. Making Use of Constraints

33m 32s
1. Adding a rigid constraint and creating breakability
8m 3s
2. Creating a moving target with the Slide constraint
4m 47s
3. Creating springy targets with the Hinge constraint
5m 59s
4. Spinning targets using the Twist constraint
4m 57s
5. Creating crazy targets with the Ball & Socket constraint
4m 58s
6. Constructing a MassFX Ragdoll
4m 48s
6. ### 5. Working with mCloth

36m 51s
1. Applying the mCloth modifier and pinning the hammock
5m 55s
2. Setting up the hammock's physical properties
5m 39s
3. Working with the mCloth interaction controls
6m 14s
4. Attaching the hammock to animated objects
4m 5s
5. Putting a rip in mCloth
6m 14s
6. Using mCloth to create a rope object
4m 53s
7. Creating a soft body object
3m 51s
7. ### 6. Using Forces with MassFX

14m 47s
1. Adding forces to a simulation
5m 27s
2. Putting forces to practical use
5m 33s
3. Using forces with mCloth
3m 47s
8. ### 7. A Brief Introduction to mParticles

35m 27s
1. Walking through mParticles
4m 38s
2. Using fracture geometry
6m 0s
3. Creating breakable glue: Part 1
4m 19s
4. Creating breakable glue: Part 2
5m 19s
5. Creating a gloopy fluid: Part 1
4m 14s
6. Creating a gloopy fluid: Part 2
4m 41s
7. Adding forces to mParticles
6m 16s
9. ### Conclusion

1m 5s
1. What's next?
1m 5s

### Start learning today

Get unlimited access to all courses for just \$25/month.

Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold
Share a link to this course

### What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

### Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.

Exercise files

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ .

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.

Congratulations

You have completed Creating Simulations in MassFX and 3ds Max.

Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

### Already a member ?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

### Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

How to use exercise files.

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferences from the dropdown menu.

• Mark video as unwatched
• Mark all as unwatched
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

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.

#### Get our Annual Premium Membership at our best savings yet.

Thanks for signing up.

We’ll send you a confirmation email shortly.

• new course releases
• general communications
• special notices

Keep up with news, tips, and latest courses with emails from lynda.com.

• new course releases
• general communications
• special notices

Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).