Animation Guide
Overview
The Rubik's Cube is designed to behave like a conventional Maya rig. Layer rotations are animated using standard keyframes and animation curves, allowing timing and spacing to be adjusted in the Graph Editor without the need for specialized tools.
For the most part, animating the cube follows a normal Maya workflow. The only concepts unique to the rig are control family ownership and state management.
Control Families
The rig contains three families of layer controls:
Rows
Columns
Slices
Only one control family may manipulate the cube at a time.
When a family becomes active, every control within that family may be animated independently. Controls belonging to the other two families continue to animate normally, but they do not affect the cube until ownership transfers to their family.
This restriction mirrors the behavior of a physical Rubik's Cube. At any moment, the cube is rotating about only one axis.
Ownership Transfer
Ownership changes automatically.
When every rotating control in the active family reaches a completed quarter turn, that move is committed to the cube state.
If controls from another family have already begun rotating, ownership transfers immediately to that family.
At the moment ownership changes, the affected cubelets snap to the newly active controls.
This snapping is intentional. While a control family is inactive, its controls do not influence the cube but can still rotate. The cubelets snapping to this rotation after the active control family finishes turning preserves 90° increments as being completed quarter turns.
Cubelets changing ownership to new control families
Exclusive control family ownership of cubelets and cubelet snapping on an active control family change
Saving and Loading Cube States
Unlike a traditional Maya rig, the Rubik's Cube is implemented as a state machine.
During normal playback and frame-by-frame scrubbing, the cube evaluates sequentially, allowing each completed move to become the starting point for the next. The animation therefore behaves exactly as expected.
The only exception is when the timeline is evaluated non-sequentially, such as jumping to an arbitrary frame. In this situation, the control values alone are not sufficient to reconstruct the committed cube state.
The accompanying Save/Load Tool solves this by allowing cube states to be stored and restored.
A typical workflow is:
Animate normally.
Save important cube states, such as the solved cube or significant poses.
Restore a saved state whenever the timeline is revisited non-sequentially.
The tool restores both the committed cube state and the associated control state, allowing evaluation to continue correctly regardless of timeline navigation.
To use the Save/Load Tool, open the tool with the installed shelf button. Select the root control of the Rubik’s Cube so the tool knows which cube it is operating on. The Save button will prompt a name for the permutation and will save it. The Load button will load the selected permutation into all selected Rubik’s Cubes. The tool can only load a permutation if the cube and saved permutation are the same size and will provide a warning if the sizes are not the same. The Delete button will delete the currently selected permutation.
Saving and Loading a cube permutation
Animation Tips
Animate using the layer controls exactly as you would any other Maya control.
Use the Graph Editor to adjust timing and ease in/out as normal.
Complete turns at exact quarter-turn increments for a new control family to take ownership of the cubelets.
Save important permutations throughout the animation for easy restoration after timeline jumps.