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.
As always, I’m not affiliated with the owners of the Rubik’s Cube name and trade mark, which I believe to be owned by Seven Towns, Ltd.
[…] UPDATE: I posted the rig over here! […]
Please…I tryed to use script…but i can`t execute script…How to execute script after open scene rubikRig.v1.0.ma. What i have to type in command line to execute loaded script. Pls..tnx
sasa,
I checked, and I see that the source statement had a syntax error, so it would break. After opening the file, try this instead:
source cr_cubeRigWindow; rubiksRigWindow();
-T