Positioning Dominoes with Expressions

Login to Follow
  • Film & VFX
  • Games
  • Design Visualization
  • Rendering
  • Arnold
  • Maya
Skill Level
  • Beginner
60 min

This tutorial will show you how to setup and arrange dominoes in different formations using XGen. We will use one of the preset expressions to drive the Twist attribute and by doing so create some interesting patterns. If you follow this tutorial, you can avoid all of the toil and backache that would go into arranging the dominoes individually and marvel at how much easier it is doing it this way.

This video demonstrates IPR rendering of an XGen scene containing domino primitive archives. An animation of the domino sequence can be found here.

It is important that you save the domino file to disk, otherwise when you try to export it, XGen will show the following error:

// Error: line 1: xgmArchiveExportUI failed because the current scene isn't saved yet. //

  • With the domino model selected go to Generate> Export Selection as Archive(s)...

  • Rename the Archive Name to domino and choose where you want to save the archive file.

  • We now need a surface to apply our XGen domino archive. Create a polygon plane and increase its Subdivisions Width and Subdivisions Height to 10. We will use this plane to assign the XGen description.

  • Select the polygon plane and go to Generate> Create Description... This will open up the Create XGen Description below. Choose Custom Geometry/Archives (use for any model you have created). Leave the other settings at their defaults and click Create.

  • It is good practice to lower the Percent value in the Preview/Output tab before continuing. If the Percent value is too high you may find that your computer will stall due to the large number of primitives generated.

Add Archive

Go to the Primitives tab and under Archive Files, select Add and go to the location where you saved the domino archive previously. Click Yes to import the Materials that were exported with the saved domino archive file.

  • It is possible to change the color of the icon for each domino and even add an image icon that represents each archive. To do this, right click on the red square for one of the archive files and choose Edit.

  • Click on the Thumbnail folder icon and choose a bitmap that represents each domino. In the examples below, you can see that we have screen grabbed the Maya viewport for each domino and saved those images to files. We can also change the color of the icon and increase its size by adjusting the slider above:


  • Increase the Density to around 1000. This will increase the number of domino primitives on the polygon plane. If the archives are not sitting nicely on the floor plane, make sure that the pivot point is at the base of the domino before exporting it with XGen.


Increasing this value makes the archives appear smaller, and decreasing it makes archives appear larger. This value will vary depending on the size of the floor plane geometry you used to assign the XGen description. Adjust the Size accordingly so that the dominoes do not intersect eachother.

Size value increased from 1 to 20

You should end up with something like this (Preview Percent 100):

Twist Expression

  • Under Primitive Attributes, click on the downward pointing arrow to the right of the Twist slider control.

  • Select the following from the menu:

Load Expression>samples>Geometry>flatten_Room

You should see Width and Depth attributes appear under Twist:

Twist Width

You can see the effect that increasing the Twist Width slider in the animations below (Twist Width values animated from 1 to 1000).

Randomly across the surface (left). In uniform rows and columns (right).

Around N

If you are noticing intersections between the dominoes, you could try reducing the Density or Size of the dominoes. Alternatively, you could try adjusting the Around N value. This attribute rotates the archive around the surface normal vector (this vector is not affected by Bump, Tilt U, Tilt V, etc).

'Around N' values keyframed between -180 and 180

The images below show varying Twist Width values with primitives generated both Randomly across the surface and In uniform rows and columns:

Twist Width: 47

Randomly across the surface In uniform rows and columns

Twist Width: 87

Randomly across the surface In uniform rows and columns

Twist Width: 205

Randomly across the surface In uniform rows and columns

Twist Width: 313

Randomly across the surface In uniform rows and columns

Twist Width: 630

Randomly across the surface In uniform rows and columns

Twist Width: 1000

Randomly across the surface In uniform rows and columns

Twist Width: 2000

Randomly across the surface In uniform and columns

That concludes this tutorial on positioning dominoes using expressions. Have fun experimenting with different values to produce various formations of dominoes. Be careful not to knock any over!

Domino archives animated (Tilt U and V attributes) in order to achieve falling effect. Video courtesy of Pedro Fernando Gómez

Further examples

Thanks to Pedro Fernando Gómez for his assistance with XGen.

Posted By
  • Arnold
  • Maya
  • Rendering
To post a comment please login or register