Ready to watch this entire course?
Become a member and get unlimited access to the entire skills library of over 4,900 courses, including more 3D + Animation and personalized recommendations.Start Your Free Trial Now
- View Offline
- Setting up your 3ds Max project
- Understanding volume, mass, and density
- Learning the difference between concave and convex meshes
- Discovering Ground Collision and Gravity
- Baking out a simulation for rendering
- Adding an animation override
- Adding Rigid constraints and creating breakability
- Creating springy targets with the Hinge constraint
- Spinning targets with Twist
- Working with mCloth
- Putting a rip in mCloth
- Adding forces to a simulation
- Using fracture geometry in mParticles
Skill Level Intermediate
Having demonstrated the basic workflow for adding forces to a MassFX simulation, in this video, we want to take a look at for-instance situation that highlights the kind of practical use we may find for forces. Our scene setup is very simple. We have a number of small plastic toys lined up in neat rows waiting for something to happen. That something, as you can see, comes in the form of what is essentially a hammerhead on wheels. This is a construct made up of three separate pieces of geometry, none of which are linked or grouped in any way.
All we have are two MassFX constraints making these three separate geometries act as a single object. A rigid constraint is keeping the hammerhead attached to the body, and a hinge constraint is fixing the body and head to the wheel section. If I just run the simulation, you can see how the hinge constraint is set up to behave. Over next step of course is to examine or break down the motion of objects in our simulation and determine what our expectations are, what type of reaction motions might we expect to see.
Our hammerhead has the same mass and density settings as an average house brick. When it thumps into the deck of the stand, we probably would expect to see at least some reaction from our lightweight plastic toys. In the real world, we would get a transfer of energy from hammerhead to stand and then from stand to toys that should cause them to react or move in some way. Now unfortunately, MassFX is not currently able to simulate such transference of energy, but we can easily simulate the effect using forces.
In fact, in this particular instance we can use one of the simplest of our available force options, push. To add that to our simulation, let's come over to the Create tab in the Command panel and click on the Space Warps icon. To add the Push force in the scene, I'm just going to select it, enable AutoGrid, and then click and drag to create the Push icon at the size I need it. Now the first thing I need to do here is make certain that I am using enough force to actually get my objects moving. I'm going to set a value of 20 Newtons.
That is the amount of force we are saying the stand will be transferring to our little plastic toys. Not of course that anything would happen if we were to run the simulation at this point, as we've made no connection between our toy objects and the push force itself. To do that let's select our first toy and in its rigid body modifier controls, let's scroll down until we come to the Forces rollout. Now we can click the Add button and select our force object in the scene, essentially creating a connection between the two.
Now if I just run the simulation, you can see, after a few frames, about half of our little toy crowd takes off into the air while the rest remains still. This is happening because we have two pieces of instance geometry that make up our little toy crowd. Applying the force to one object has of course applied it all of that particular geometry's instances. All we need to do to finish things off here is to select our second toy and apply the push force to that also. Now, when we run the simulation, we can see that all of our toys take off together.
Unfortunately, this is not the effect we are trying to create here, so clearly, we still need to do a little bit of parameter tweaking. The first thing we can do is determine at which frames we want our push force to be in operation. To do that let's run forward a little in our simulation by pressing the Start button. Then, as our hammer starts to fall, we can stop it and just step forward frame by frame. As we do that, we can see that the first contact appears to occur at around about frame 49.
So with our Push icon selected, let's set the On Time for our force to frame 49. Then, as we continue to step forward, we can see that we probably only need our force to be active for a frame or two, so let's set the Off Time to frame 51. Now when we run the simulation, you can see our hammer falls, strikes the stand, and of course we get a reaction from our little toy objects. Naturally, when we are dealing with very quick motions or reaction motions as we are in this case, it is always going to be a good idea to generate an animation preview so as to get a clear idea of how the motion is working.
To save some time, I'm just going to pull up our RAM player which has a couple of previews I prepared earlier already loaded in. These were created using the exact settings we have set up here. As you can see, if we play channel A, our effect looks okay, but we could improve this with just a little tweak to our scene. All we need to do is simple rotate our push icon by 10 degrees or so, pointing it away from the hammer's direction of descend. What we would get then, if we play channel B, would be this.
A subtle change, but it definitely improves our effect. Clearly then, even though the transference of energy from object to object is not currently something that MassFX is capable of, we can still add lots of realism to our simulated objects by using forces to add subtleties of motions that could otherwise get left out and so throw off the quality of our finished and rendered simulations.