Improve your 3ds Max workflow: Organic placement using MassFx
Paul Hatton explains how to set up realistic physics-based simulations using an out-of-the-box 3ds Max plug-in called MassFx...
Improving your 3ds Max workflow – previous chapters:
Top 10 interface secrets
Better modeling workflow
Handling massive scenes
3ds Max animation tools
MassFx for 3ds Max gives you a great set of tools for adding realistic physic-based animations to your projects. I love this tool. I've found it to be quick, stable and perfect for setting up organic-based interactions. I will even use this to place objects in a still image such as fruit in a bowl. To do this I simple create the fruit, place them above the bowl and then apply gravity to them so that they fall into the bowl in a beautiful natural way. Let's dive straight in to this underused 3ds Max tool.
Create your objects
For the purpose of this tutorial we are going to be using the physics simulation of MassFx to drop a stack of bottle corks into a large gloss bottle. This is a task that would take ages if you had to place them all manually. Create your objects, in this case a glass bottle and a cork. Alternatively feel free to create a fruit bowl and some fruit.
Position your objects
We are going to use gravity to drop our corks into the bottle. This requires placing the cork directly above the opening of the bottle and ensuring that the bottle opening is large enough for the cork to fit through it. Later on we will duplicate the cork a number of times so that each cork falls into the bottle one at a time. If you were doing this with a fruit bowl then you could drop them all in at the same time.
An introduction to the MassFX Toolbar
Right-click on the main toolbar at the top and select MassFX Toolbar to show that in your project. This gives you a set of shortcuts that are going to be really helpful. The first button toggles the visibility of your MassFX Tools. The second button attaches either dynamic, kinematic or static rigid body to the selected object. For the purposes of this tutorial you can ignore the next 3 and then finally on the right are some playback controls.
Set up MassFx for the bottle
Select your bottle object and head over to the MassFX Toolbar. Click and hold down the second button from the left which lets you add a rigid body to the selected object. Make sure you select Static Rigid Body. Your bowl is not going to move or be affected by gravity so it needs to be set as static. Change the Shape Type in the Physical Shapes rollout to Concave and hit Generate in the Physical Mesh Parameters rollout.
Set up MassFx for the cork
Select the cork and give it a Dynamic Rigid Body. The Convex shape type will be absolutely fine. This is really all you have to do for this one for now. In the MassFX Tools dialogue box under the Multi-Object Editor tab it is often helpful to tick the Use High Velocity Collisions. This will help make the simulations more correct.
Duplicate the cork
The size of the hole in the bottle is so small that we are going to need to drop the corks in 1 at a time. This will involve lining them up in one long vertical line above the bottle. We will let gravity do the rest. Make sure they're instances so that when we come to change the parameters of the cork then it will apply to all of them.
Play the simulation
In your first simulation you will probably find that it doesn't run as you were hoping! This is understandable because we've just used the default parameters for everything and these sort of things rarely work straight out the box. We need to fine tune our parameters so that they work for our specific project. We'll do this in the next steps.
Fine tune the bottle
Let's adjust the settings for the rigid body of the bottle. You'll remember that we previously set it to concave and then generated the mesh. Now we're going to adjust the Physical Mesh parameters and re-generate. Firstly, increase the Mesh Detail so that it's nearer 100, something like 98 will probably work well. Then reduce the Min. Hull Size to around 0.1 or 0.05. And finally increase the Max. Verts per Hull to 256 or 512. Clicking on Generate again will recreate the mesh based on your improved settings.
Fine tune the cork
With our bottle set up, let's move on to the cork. Go to the Physical Material Properties rollout and notice the 5 properties that you can adjust to make your cork respond in the way you want. Every object is going to be different here so it may take a while to get the settings correct. I will often find that the bounciness especially is too high for most objects but it depends on what you're simulating. Make the necessary adjustments and re-run the simulation.
Play the simulation again
With everything fine-tuned, try playing the simulation again. Hopefully this responds in the way you were expecting. If not, study the parameters and get used to what has an impact on what. As you get used to the tools you'll get quicker at setting everything up so that the number of times you have to run the simulation before you get it right is less and less. Now try it yourself!
Top tip : Simplify your static object
If your simulation is struggling or taking too long then you can use a simplified version of the bottle for the simulations. Then for rendering just hide the simplified one and unhide the high quality version. You'll need to make sure that the objects don't incorrectly intersect once you've unhidden the high-poly bottle.
Improving your 3ds Max workflow – previous chapters:
Top 10 interface secrets
Better modeling workflow
Handling massive scenes
3ds Max animation tools
Related links
Check out Paul Hatton's personal site
Are you a 3ds Max user, or looking to start? You could try our collection of 3ds Max eBooks or purchase our books, 3ds Max Projects and Photoshop for 3D Artists
Fetching comments...