Video: What is a constraint and how do we use it?

Whenever we add a dynamic rigid body modifier to an object or objects in our scene, they become subject to the law of gravity. This should mean of course it is enable in our global options. However having all free-floating objects in the scene automatically fall to the floor may not be the desired end result. We may, for instance, find ourselves needing to fix certain objects in places, it were, locking them to a specific point in 3D space. Alternatively, we may need to create complex relationships between two objects in the scene, such as having them dynamically slide against one another within a fixed set of boundaries or revolve around one another on a fixed axis.

This course introduces basic physics simulation principles in Autodesk 3ds Max using MassFX, a system that makes it cost effective to animate rigid body objects, cloth, and particle systems. Author Brian Bradley introduces basic concepts such as gravity, drag, volume, and density, and how Newton's Laws of Motion can help you understand the interaction of objects with these unseen forces. Using the purpose built scene, Brian walks through the tools and features of the MassFX (PhysX) system, applying the principles discussed as he goes. Along the way, discover how to combine rigid bodies and constraints, mCloth fabrics, and mParticles geometry to create fairground-style effects.

What is a constraint and how do we use it?

Whenever we add a dynamic rigid body modifier to an object or objects in ourscene, they become subject to the law of gravity.This should mean of course it is enable in our global options.However having all free-floating objects in the scene automatically fall to thefloor may not be the desired end result.We may, for instance, find ourselves needing to fix certain objects in places, itwere, locking them to a specific point in 3D space.Alternatively, we may need to create complex relationships between two objects inthe scene, such as having them dynamically slide against one another within afixed set of boundaries or revolve around one another on a fixed axis.

In these and other such situations, we will want to make use of a set oftools called constraints.As you can probably surmise from the name, a constraint inside a dynamicsimulation restricts the movement of particular objects that are part of therigid body simulation.The idea of a constraint is that it creates hierarchical parent-childrelationship between two entities.Some examples of constraints in the real world would include hinges, nails,curtain rails, and axles, to name just a few.

Now in MassFX in 3ds Max, all of the constraint types that we will mention hereare available as preset options,although it is probably worth noting that they're all just variations of theuniversal constraint but that have particular settings already applied to them.Of course, all good dynamic simulation tools will have these or similarconstraint options available.The simplest constraint type we can use in a rigid body simulation is oftenreferred to as a rigid or fixed constraint, and really, its name tells us exactlywhat it is designed to do.

By default, a rigid constraint will have all of its transform options locked.This means there can be no movement, rotation, or twist action at all oncea simulation starts.It really does lock an object in position. It can also be used to lock two objectstogether so that they move and behave as one inside the simulation.Another typical constraint type we may come across could be the Slideconstraint--very similar in construct to a rigid constraint, except in this casewe do have a limited single-axis translation enabled.

In MassFX this is the Y axis by default, but of course this can be altered.We might also find we have a Hinge constraint available.This usually has a single swing axis enabled that has a limited swing range setin degrees. We might also find a twist constraint, which will probably have asingle axis twist value that has been set to unlimited or unconstraint.This would allow an object to twist, or as I prefer to think of it, spin freely.In MassFX we also get two other preset constraint types that we can work with,these being the universal constraint that has two swing axes set to a limitedvalue, such as 45 degrees, and a ball-and-socket constraint that uses twoseparate swing axes limited this time to 80 degrees, but also with a twistamount set to unlimited.

In a rigid body simulation any objects that have been set as dynamic rigidbodies will be subject to the laws of gravity, motion, and collision,meaning they will start to react in a fairly random manner as soon as asimulation is enabled--unless, that is, we introduce constraints into the mix.With our constraint tools, we can start to craft very specific behaviors fromdynamic objects, creating complex motions and interactions that would beotherwise impossible to achieve.

There are currently no FAQs about Creating Simulations in MassFX and 3ds Max.

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.

Already a member ?

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

Upgrade to our Annual Premium Membership today and get even more value from your lynda.com subscription:

“In a way, I feel like you are rooting for me. Like you are really invested in my experience, and want me to get as much out of these courses as possible this is the best place to start on your journey to learning new material.”— Nadine H.

Thanks for signing up.

We’ll send you a confirmation email shortly.

Sign up and receive emails about lynda.com and our online training library:

new course releases

newsletter

general communications

special notices

Here’s our privacy policy with more details about how we handle your information.

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

Sign up and receive emails about lynda.com and our online training library:

new course releases

newsletter

general communications

special notices

Here’s our privacy policy with more details about how we handle your information.