View Daniel Harjanto's profile on LinkedIn

Domino Effect

by Daniel Harjanto a.k.a misterdi

As this tutorial has been available in several other sites written by several other people, this tutorial is just express my workflow on dealing with the effect.

This tutorial will discuss on several issues, how to setup the geometry and how to apply passive to active key switch among them.

 

The setup

As the domino geometry we will use a standard polyoganl Cube and scale up to approximately the domino size. It was rename as dominoProxy since it is only use in rigid body simulation not as the final geometry.

The most important thing to do with the dominoProxy is moving the pivot point to the bottom edge of the geometry.

We also need to create a table (a simple polygonal plane) and on top of the table we draw a curve that will be used as a motion path curve to put all the domino proxies.

To create a series of domino proxy in the scenes, we will use motion path as a tools to layout all the objects into a series and automatically re-orient the proxies so it form the row of the proxies

As I want to create 30 domino proxies along the curve, when we set the motion path the option that was use is as:

Start time was set to 1, and end time was set to 30, parametric length and follow is checked. Front axis is set to X and up axis is set to Y. Since the curve is on to of the table, and all the proxies will sit on top of the table to, make sure that Bank is un-check.

When you scrub the timeline between 1 to 30, you will see that the dominoProxy is moving along the curve nicely at evenly distributed length as result of using parametric length being checked. And also you will notice that the orientation of the dominoProxy is automatically adjusted to the curve as result of Follow being checked.

Now the next task is duplicating the dominoProxy at every frame between 1 to 30 so it will then generate a series of domino proxies along the path. There are couple ways to do it.
The first method, is using Animation->Animate->Create Animation Snapshot

where you can set the End Time to 30, and hit Snapshot.

The drawback of this method is: Animation Snapshot will create a new node (snapshot node) and all of the duplicate objects (after deleting the history) will have it's pivot at the Origin, which is OK in this case but may create some difficulties in other case.

The second method, is doing duplication manually from frame 1 to 30, which is not a big deal in this case but a bit boring when you have 100 frames to work on instead of 30.

The third method, is doing duplication as second method, but using a simple script as

I prefer the third method, since it is cleaner and the result is:

 

Setting up Rigid bodies.

Since we already have 30 duplicate object of the domino Proxy, you can savely delete the original dominoProxy or you can hide it so you won't accidentally select it when you work with the duplicates.

Select all your domino proxies, and assign a gravity field to it.

This will automatically add active rigid body to the domino proxies and connect them to the new gravity field. Default gravity field should be sufficient for this case, or you can increase the magnitude higher let say somewhere about 25 to make the effect happening faster.

Select the table and set it as a passive rigid body, and hit play, you will see nothing is happening.

 

The trigger.

To make the domino effect to happen, we need to trigger it. You could trigger it with several way as setting inital velocity of the first domino proxy to tumble toward the second proxy, or giving a dynamic field to the first proxy, hitting the first proxy with a passive rigidBody, or setting impulse to it.

But the approach that I will use in this tutorial is using passive to active rigidbody switch, which will carry over momentum of the passive rigid body animation to the active rigid body simulation.

At frame 1, with the first domino proxy (dominoProxy1) selected, do dynamics->Soft/RigidBodies->Set Passive Key

Move the time slider to frame 8, and rotate dominoProxy1 on Z-axis so it just leaning at dominoProxy2. You might need to move it up a bit so it doesn't penetrate the table (otherwise you will get warning of interpenetration and the simulation might be screwed up), and do dynamics->Soft/RigidBodies->Set Active Key

You don't need to worry that's dominoProxy1 is penetrating dominoProxy2 rightnow, since it will be solved during the simulation.

From frame 8 onward, you let Maya dynamic simulations to take over the job, so just rewind your animation, set end time to some high number like 300, and hit play.

You might want to do a playblast and see how the effects working and do some adjustment on the rigidBodies attributes until you happy with the movement. Then you can do bake the animation of the proxy and do some camera works to get more dynamic action.

Here is a sample rendered movies of the Domino Effect (domino.mov), and the scene before baking the animtion (domino.mb) or in zipped file (domino.zip)

 

Beyond this tutorial.

When you are happy with the animation, duplicate one of the proxy, and create the final model of the domino within the proxy, texture it and make it really fantastic.

Duplicate the new model, make it child of each proxy and hide the proxyshape node. So it will inherit the animation from the proxy but it will be rendered without the proxy shape.

When the last piece of the domino fall off the table, you could use trax editor to create some sort of bullet effect (or time sliced effect).

Next tutorial is "Flipping the crown".

<<back>>