Rubik’s Cube Rig

Animation-Ready Rubik's Cube

This Rubik's Cube rig was designed with animators in mind. Layer turns are animated using standard animation curves, allowing motion to be shaped with familiar Graph Editor workflows, ease-in and ease-out tangents, and fully editable keyframes.

A custom Maya dependency node manages the cube's internal state while evaluating live control input, allowing the rig to accurately reproduce the behavior of a dynamic hierarchy.

The result is a physically accurate Rubik's Cube rig that integrates naturally into Maya's animation pipeline while remaining practical for production use.

The rig, necessary plugin, and tool can be downloaded here.

The entire C++ project can be found on my github page here if you want to poke around to see how it works.

Features

Animation

  • Animation-ready — Animate with standard Maya controls and editable animation curves.

  • No baking required — Animation remains fully editable throughout production.

  • Physical behavior — Only one control family (Row, Column, or Slice) can drive the cube at a time and interpolation between layer turns follows rotations physically accurate to a real cube.

  • Arbitrary cube sizes — Supports NxNxN sized Rubik’s Cubes

State Management

  • Save/Load permutations — Store and restore cube states at any point in an animation.

  • Timeline-friendly workflow — Sequential playback and frame-by-frame scrubbing work naturally, while the Save/Load tool handles non-sequential timeline jumps.

Technical

  • Custom MPxNode implementation — Built as a native Maya dependency node in C++.

  • Offset Parent Matrix workflow — Drives cubelets directly through Offset Parent Matrices without dynamic parenting or constraints.

  • Automatic ownership reconstruction — Rebuilds cubelet membership and control ownership from the committed cube state automatically.

  • Lightweight serialized data — Stores only the committed cube and control state while reconstructing transient caches as needed.