Project 5: Dominoes, 4/28
Animation:
This animation was created entirely using a single Python script. The script, which uses the Python APIs for Maya and MASH, creates a Maya scene that is render-ready. It creates a MASH network of dominoes, colors each domino according to the pixel values of an input image, and animates the dominoes to fall and reveal the image in domino form.
All it took to produce the animation below was loading the script, running it, and then playblasting the resulting Maya scene.
The animation used an image of BB-8 (sourced from the Internet) as its reference:

Instead of a grid-shaped network of dominoes, I opted for a spiral shape (sacrificing image representation fidelity for a cool domino reveal effect). To do this, I created a curve object through the script and connected it to a MASH Curve Node associated with the dominoes.
The full spiral animation, with only a single domino at the center or edge falling to start the reaction, took too much time, so I animated the dominoes in concentric rows to fall together. I did this with a pair of hidden cylinder objects, set as colliders in the MASH network and animated to knock the initial dominoes down.
To avoid issues with concurrent execution, I used the Maya API's flushIdleQueue function, which seemed to work well.
Below are images of the initial and revealed states of the domino animation.


Below is the animation result when another image, this time of R2D2, is used:
