Here is my latest rig for animating a Rubik’s Cube in Maya. I’ve mentioned it over here before. This rig is a zip file of the three MEL scripts and the two example scene files. Hopefully soon I can write up a good tutorial on using it.
For now, copy the scripts into your ~/maya/scripts directory, open rubikRig.v1.0.ma, then run:
UPDATE: The quotes were messing up this syntax, you don’t need them.
source “cr_cubeRigWindow”; rubiksRigWindow();
source cr_cubeRigWindow; rubiksRigWindow();
That will load the UI, and automatically attach it to the cube in the scene. (Otherwise you’ll need to select the cube, and press “Set UI to Control Selected Cube”).
The three tabs give you options for manually keying the rig, automatically keying the rig based on Singmaster Notation, and some utilities. The Bake/Hide/Edit tab gives you utilities for baking the simulation for easier scrubbing (including baking the simulation backward so that the cube ends in a solved position), hiding/showing various parts of the rig, and editing some under-the-hood elements of the rig’s operation.
rubikRig.v1.0.ma contains the base rig, with some default placeholder geometry in it that can be easily turned off for rendering.
rubikRigModel.v1.0.ma has some non-default “hero” geometry included in it, as a demonstration of how you can add your own geometry to the rig.