Psychedelic rubik's cube

One cube filled with smaller ones (3 different colors).
Holes left inside it.
Each cube can move freely (and randomly) inside the box.

Interesting little idea. So, how is it done, logic blocks, scripts or something, I have no idea?

Actually I did this with Python scripting.

Now I’ve added some colors and cube rotations:

Any idea on how to improve the global scene (background, compositing…)?

Very cool idea and works perfectly, though I have no idea how to make one. I think it would be better to make the blocks move slower, especially those with rotation.

Thanks.

For those interested, I put a link to download the python script in this post:

And as well, I did a very short tutorial on how to start with Python scripting:

Let me know if this was usefull…