When you begin learning to simulate particle physics with Particle Flow, the included preset mParticles Flow makes a good starting point. In this tutorial, you use the mParticles Flow in conjunction with other techniques for learning how to use the mParticles system.
Skill level: Intermediate
Time to complete: 1 hour
In the initial sections of this tutorial, you start from scratch, but the final section uses a prepared .max scene file.
This adds in one fell swoop all the necessary elements for a simple physics simulation.
It starts out with a cubic arrangement of box-shaped particles suspended in mid-air. The particles quickly fall to the ground and end up randomly scattered around the point of impact.
The boxy particles don't do much after they fall, but you can add some rolling action by making them round.
mParticles Shape determines the particles' characteristics during the simulation.
This time the particles fall and then disperse by rolling away.
The physics-simulation engine is the mParticles World helper, which you can access from Particle View.
This selects the helper and shows its Parameters rollout on the Modify panel.
This time, when you play the animation, the spheres fall much more slowly and take longer to roll away.
In this section you'll create a simple brick wall and use virtual glue to mortar the bricks.
Birth Group replaces Birth Grid and the particles disappear from the viewports. However, the large wireframe cube remains. This is the mParticles World helper. The down arrow pointing to its center indicates the direction of gravity, and the X on the bottom side indicates the location of the ground collision plane. By default, this coincides with the home grid in 3ds Max (the XY plane at Z=0).
There is no physical sign of Birth Group in the scene; it creates particles from mesh objects that you specify, as you'll see shortly.
The operator isn't necessary for this tutorial.
The Box object names now populate the list, and their particle counterparts appear in the viewports. The boxes are the particle objects; once you've applied them to the operator, you can get them out of the way easily.
This hides the objects in the list, leaving only their particle counterparts.
Now the mParticles Shape 001 (Box) operator governs the shape of the particles, so they are the same size as the original bricks.
The bricks succumb quickly to the pull of gravity and fall down in stacks.
You can fix this easily with the mParticles Glue test.
The Glue test creates bindings between pairs of particles, so it's important to be able to see what it's doing. Thus a crucial option is Visualize Binding.
You can't see the bindings because there aren't any yet.
The bindings are mainly vertical because that's the shortest distance between particles.
You'll probably see that the columns of bricks move together. We have virtual mortar above and below the bricks, but not on the sides.
First you need to deal with the columns moving when they shouldn't. This is due to a lack of stability in the simulation, which you can resolve by increasing the Subframe Factor value.
The general rule of thumb for setting the Subframe Factor value is to double the Glue test Max Binds p/Particle value and add 2. So, if Max Binds p/Particle is 4, then Subframe Factor should be set to (2 x 4) + 2=10. Sometimes you can get away with a lower Subframe Factor value, depending on the general complexity of your simulation. But for now, use 10.
If you set this value while the columns are disarrayed, you'll see them jump back to their original positions.
Next, to allow the columns to bind together, you'll increase the possible number of bindings.
You probably won't see bindings between every pair of horizontally adjacent bricks, but as long as you have at least one or two horizontal bindings for each column, the whole wall should hold together.
Ideally, nothing should happen. If the wall moves, increase the Subframe Factor value until it doesn't.
To create particle interaction, you'll add a Birth Stream emitter.
You also need to clone the mParticles World operator so both events use the same mParticles World helper and world setup. You'll do this in a little while.
The read-only Total field should now contain 1.
If you play the animation now, you see the single particle come shooting out from under the wall. That's because the default position of the Birth Stream icon is at the world center: (0,0,0). Also, because Birth Stream has a Speed property built in, set to 300 by default, no additional Speed operator is necessary.
The sphere goes through the wall without colliding with the bricks. That's because its event isn't participating in the physics simulation yet.
An mParticles World operator needs to be in every event whose particles participate in the simulation. It should always be the last operator in the event except for Display and any tests.
3ds Max adds an mParticles World event to the sphere event.
This time the sphere knocks the wall down. Depending on your setup, it might also then push the wall along as it rolls. The particles remain bound together tightly even when struck by the ball.
If the ball doesn't knock over the wall at first, try selecting mParticles World and reducing the Apply Gravity Acceleration value; for example, to 245. You can also save your work and take a look at the included file pflow_mparticles_tutorial.max. Check its settings to see what's different from your setup.
An important parameter group in mParticles Glue is Breakability. You can use its settings to delete the bindings when the particles encounter sufficient force.
By frame 2, all the bindings are gone. Because the default Max Force and Max Torque settings are low, the gravity force alone is enough to dissolve the bonds.
Max Force and Max Torque define the maximum forces that a binding can withstand before breaking. To create a realistic simulation, you usually need to increase both values.
Another useful mParticles Glue option is Bind Center Aligned Only. This creates bindings that are based on particle alignment as well as proximity. With the current arrangement of particle bricks, this would be difficult to see because each brick is aligned with its neighbors, so you'll rearrange the layers slightly.
This, of course, is how real-world brick walls are constructed. Also, in the real world, half-bricks are used to fill in the gaps, but that won't be necessary for this tutorial. In fact, in this section you'll make the bricks act like planks, further demonstrating that in the virtual world, anything is possible.
Turn the Birth Group operator back on.
The particles are still in their original positions. If you change the particle objects (the boxes), you need to update the Birth Group manually.
You can see more connections now, mainly because of the offset alternate layers. There were as many before, but now they go diagonally to get to the nearest brick, whose horizontal position is offset.
This eliminates all the diagonal bindings by allowing mParticles Glue to bind only to particles whose local axes are aligned with each other. So bindings can go only at right angles (the way the axes line up), not diagonally.
If you look closely, you can see the horizontal bindings between neighboring particles and the vertical bindings between particles in alternating layers. To create the plank effect, you use a third setting to eliminate the latter.
Bind Gap eliminates bindings beyond the specified distance, so the long-distance bindings between alternating vertical layers, which are much longer than the specified Bind Gap value of 1.0, are no longer enabled. You're left with horizontal bindings only, which provide the desired plank effect.
After you turn on Bind Gap, if you don't see the small horizontal bindings between boxes, increase the Bind Gap value until the bindings reappear.
The ball breaks up the bricks in such a way that it's apparent that they're acting as planks.
Before moving on to the final procedure, take a quick look at one more Glue setting that enables flexible bindings.
The Distance binding type allows more elasticity in the bindings.
The planks still hold together, but bend upon impact from the ball, as if they're connected by strings rather than being bolted together. The Distance option can produce interesting simulations such as cloth and beaded curtains; you'll find some examples of these in the included sample files.
Particle Skinner is a powerful modifier that lets particles function as "bones" inside a mesh "skin." As you'll see in this brief introduction, this allows for some quick and easy but exciting possibilities for special effects.
For this lesson, you'll go back to the particles that break up as columns.
The problem is that, as there's only one ball, only the center columns are affected by its impact. One way to resolve this is to have more particles.
Now the Total value is 3, but if you play the animation, the balls are too close together, and still don't affect all the columns. You can adjust their placement with the Uniqueness Seed value.
Not all of the columns are hit, but enough are that they all end up in different positions.
In the included sample scene, pflow_mparticles_tutorial.max, the size is 127 x 12 x 34, but this might vary in your scene.
On the Select Particle System dialog, click to select PF Source 01, and then click OK.
The Particle Flow Systems list now contains a single entry: PF Source001. However, not all the particles in this system should affect the box "skin"; just the ones in Event 001.
Particle Skinner works by letting particle motion exert an influence on nearby mesh points. Ideally, all mesh points in the modified object should be influenced by particles; otherwise, they get left behind when the particles move, causing unsightly stretching of the mesh. Thus, a useful option is the ability to check for uninfluenced mesh points, which helps you to set the influence distance to the right amount.
Now that the basic setup is finished, you don't need to see the "brick" particles anymore.
As the ball particles strike the now-invisible particles, they break up and take the skinned-box mesh with them, ripping it apart based on the distances traveled by the particles. However, the ripping isn't perfect; a few of the mesh faces just stretch out, spoiling the effect somewhat.
The remedy is simple: Just make the ripping more sensitive to the change in distance between particles.
That way a relatively small change in distance causes the mesh to rip.
This time the pieces break cleanly, with nicely jagged edges for realism.
If you prefer a straighter edge, try reducing the Edge Split Precision Relative% value.
You might notice that the pieces don't seem very solid, as you can see through the inside surfaces. This can be remedied with a standard modifier.
Now when you play the animation, the pieces look more realistic.
This tutorial, as long as it was, gave you but a tiny taste of the many capabilities of the Particle Flow simulation tools. We recommend that you experiment with the scenes you've created, changing parameters, using different types and quantities of particles, and so on.