Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
For our final foray into the MassFX Toolbar Constraints flyout, we are going to create a crazy target, something that, comparatively speaking, has a much broader range of motion than the constraint presets we've worked with up to this point. The idea is to create something that will hopefully be a little more challenging for our ball launchers to hit. To get started, we need to run through our by now familiar procedure. So, let's select our Hinge object, which in this case happens to be this little piece of domed geometry.
And then, of course holding down the Ctrl key, we can click to add the target frame itself. Now, we can go up to the MassFX toolbar and from the flyout, add a ball- and-socket constraint. We of course need to say Yes to adding the modifiers. And then finally, we can set our constraint helper size to suit. Now obviously, we will need our dome geometry, which is we say is acting as our hinge, to remain fixed in place. This time, coming into the Modifier Properties, we can set the Rigid Body Type to Static.
Now, if we run the simulation without animation, you can see, after a few moments, our target flops forward and then begins to behave in a very odd manner indeed. Now, this is clearly not the effect that we are after here. The mistake we've made is to have two rigid body objects overlapping or into penetrating one another. In fact, if I just delete our constraint helper, you can see our hinge object does indeed intersect the stand geometry, which is itself a static rigid body.
Let's switch to our perspective view using the P key and with the hinge object selected, let's use Zoom Extents Selected to get a better view of the problem. As you can see, clear intersection. The quick fix here is to select our two pieces of geometry, switch back to our target's close-up camera, and just raise them up a little in the scene. We are best moving both objects together, so as to not inadvertently create intersection between our parent and child geometry.
That would itself create a similar problem to the one we are trying to solve. With that done, we can select our parent and child objects in turn and reapply the ball-and-socket constraint. Now interestingly, 3ds Max tells us that a static rigid body cannot be a part of a constraint setup even though we have clearly seen in earlier examples that this can be so. To work around this, let's select our hinge object and set its Rigid Body Type to Kinematic. Then we can reapply the ball-and- socket constraint and finally switch our Rigid Body Type back over to Static.
Now, when we run the simulation our target again flops forward, but after a little while, it simply settles into that position--no more odd jumping around. To get something a little more interesting, let's select the constraint helper and jump over to the Command panel. First of all, in the Swing and Twist limits rollout, I want to set the Swing Y and Swing Z angle limits to 120 degrees each. Doing this whilst leaving the Twist option set to Free will give us a nice broad range of motion for our target. To make things interesting, we do of course want our target to try its best to return to an upright position.
To do this, in the Spring rollout, we can set the Spring to Resting Swing Springiness value to something like 2.7. We also want to set the corresponding Damping option to 0.01. Now, if we didn't want our target to spin or twist quite as freely as it will, we could also set the Spring to Resting Twist values to accomplish that. With those parameter tweaks in place, let's run the simulation once again, this time with animation, and see what we get now.
As you can see, once our target takes a hit, we do indeed get a really nice range of motion from it, and of course it does try and return to an upright position. Although, I must say that it doesn't seem to be making itself particularly hard to hit, so I guess not such a success on that score. There is no doubt about it, the MassFX constraint system is robust, easy to work with, and houses lots of flexibility regarding the types of motion that we can set up with it.
We have deliberately used some very specific examples in this chapter, but with a little bit of imagination applied to our use of these constraint tools, a wealth of possibilities can open up to us. What about characters, though? Is there any way to make use of the MassFX constraint system to help with creating automated character motion? We are going to look at doing just that using the MassFX Ragdoll system.
Get unlimited access to all courses for just $25/month.Become a member
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.