# is it possible to rig a Rubik's cube?

I make many animations with my speed cubes. So I'm wondering if it is possible to rig the cube in a way that if I want to rotate the left side (L) it will select all the objects on the left side and just like the video below shows if I wanted to then rotate the top layer (U) it will select only the objects that are currently on the top layer.

As you can see, I'm showing with the arrow that the one piece changes orientation but also would be considered a top layer piece even though it's on the left side when I'm wanting to only rotate the top layer. I know I can just select the pieces from each side and animate them like anyone else would, but I do this a lot and I figured if it can be rigged then maybe it will speed up my process and make things easier because I do animate several speed cubes.

For example, a rig that will select any pieces that are on the side I choose and will rotate the whole side. Just like this video below. If I select one of the 2 wireframe objects I put in place, it will know to only select the objects that are within the boxes and I can control the rotation of those pieces. But I wonder if it matters that the cube pieces origin is all set to the center, so could I still set something up like this even if the cube pieces origins are not within the wireframe box?

• Nov 19, 2021 at 18:05
• Rigging a cube in the way you're describing is not possible, not over infinite transformations. But it is possible for each element-- each subcube-- to have a control where you just box select the 9 controls and rotate them about the center of the cube at the same time. Nov 19, 2021 at 18:14

I think it should be possible. You basically have six orientation points, so you need to have bones for each one of them, as well as one bone for each cube, and a root bone like any rig should have.

Both the rotation and cubes' bones are parented to the root bones, but the cubes' bones also have a Child Of Constraint for each rotation bone possible.

Then theoretically, all you have to do is before each rotation - set each cube bone's Child Of weights depending the rotation you want to perform and key their offset - then do rotation.

Now that sounds quite long to set each bone cube's constraint state. Maybe there's a way to detect which bonecubes are near a rotation bone and do the constraints weights accordingly.

• Can you elaborate? As far as I know Rubik's with rig only is not possible. Nov 19, 2021 at 19:21
• @lemon blendernation.com/2019/06/11/dynamic-fluid-rig-tutorial this may be a stretch, but I saw this rig and thought that the box placed over the wine hides the wine level. So I'm wondering if the cube can be rigged with the same concept where the box covers the left objects and if you select the "box" it will just select all the objects on that side and rotate all at the same thing and if there was another box that only covered the top layer pieces. Does that make sense?? I hope I'm saying it clearly Nov 19, 2021 at 19:31
• I'm at work atm so I can't do tests but python scripting aside I think it would be possible in Blender, it's just a matter of seting up contraints and keying their influence and offset over time. (now that I think about it, keying the offset of a constraint is maybe doable only in Maya's constraints. But then, we can probably try performing a visual keying on the cubes) Nov 19, 2021 at 19:35
• You would have to either keyframe the child-of inverses-- which isn't possible-- or you'd need a new child-of for every subsequent rotation, which is not something you can keep up for very long. I'd recommend trying it out if you disagree. Nov 19, 2021 at 19:38
• I'm interested in your ideas, as I do not know how to transfer a rig influence as a cube face rotates... Nov 19, 2021 at 19:42