Tony's Rubik Adventure Page
ChickletGuy's adventure with the Rubik's Cube
This page serves as the information page for the Rubik's Cube model. This is the final Rubik's cube construction. Due to some crazy mathematical principles, this toy is a lot harder to animate than one would imagine at first. It took me around two days to get a good working model built. The good news is that it can also solve itself (animated properly) once it gets mixed up.
The model works with a variant of dynamic simulation type techniques. When the system detects any of the 6 center cubes rotating, it quickly determines which 8 cubes should rotate with it. The system reparents the 8 cubes underneath the center cube in the scene hierarchy so that they rotate properly with it. Once the center cube stops rotating, the 8 outside cubes are unparented from the center cube.
This allows the animator to only keyframe the 6 center cubes. In addition to this scripting, I wrote some scripts that allow for rapid keyframing of these 6 cubes. By specifying the color, direction, and distance to rotate, the cube can be quickly keyframed to complex rotations.
Because of the forward biased scripts, the cube must be "rewound" before it can be animated to solve itself. By advancing the animation to the end of the animation range, resetting the cube to the "solved" position, then running the animation backwards to the beginning, the cube then properly animated itself advancing into the solved state. It's the one complicated part of the cube setup. I'm still working on a better system for it - and with plugin coding it should be quite simple to better store the state of each of the cubes, and avoid this forward biased scripting.
Here are animations of the cube in action
I wanted to experiment with combining my posing figure (who will be called ChickletGuy, do to his resemblance to the candy and my having no better name for him at this time. Suggestions are welcome) and my functional Rubik's cube object. So while there is no animation, yet, this is a storyboard of the animation I have in my mind.