3D Artist

Rubik’s Cube

here is the mhRubiksCube.mel script in action. you can see the shelf and icons that comes with the zip file  it has a bunch of buttons that allow you to play with the cube.

Starting on the left the cube rand and solve buttons:

  • cube – creates the Rubik’s Cube in your current scene.
  • rand – scrambles the cube using randomly generated turns.
  • solve – solves the cube after you scramble it.

the script editor will also give you feedback while you use these buttons. you can test yourself to a race if you apply the random scramble seq that this script generates to your own cube

the next set of buttons U, U’, D, D’…. S, S’  are the cube “moves” they will allow you to rotate a face on the cube. For instance U will rotate the “up” face clockwise, while U’ wil rotate the up face counter-clockwise

the series of multicolored “front” buttons will rotate the cube face that corresponds the button color toward the front of the view (down the Z axis)

And lastly the sp+ and sp- buttons will speed up or slow down the playback of the cube while it is rotating and solving itself. You can adjust the speed to make it a fair race if you aren’t as fast as the script….  and who would be that fast…

you can download the script here : mhRubiksCube.zip

to install:

  1.  extract the contents of the mhRubiksCube.zip into the version of Maya (2012-x64) folder in “Documents/Maya/”  ie into “C:\Users\<USERNAME>\Documents\maya\2012-x64” if you are using win7 and maya 2012 64bit
  2.  restart maya
  3.  use the mhRubiksCube shelf inside maya to create, scramble and interact with the cube.  I even made a solve button which will proceed to solve the cube from its current state

enjoy, feel free to send me comments or questions
matthew hennessy