# Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Rubik’s cube expression

• # Rubik’s cube expression

Posted by on November 14, 2023 at 9:48 am

Hello Creative Cows!

I’m trying to create an animation where a parenting bond would change depending on a random event.

To simplify the case, let’s say I have 6 cubes equally placed around a Null Object. Depending on whether the Null decide to turn either 90° on its X or Y axis, it will affect the cubes located on that same axis, like a Rubik’s cube, or like it is poorly shown it that demo I’m attaching.

Any idea how that could be achieved?

3 Members · 5 Replies
• 5 Replies
• ### Hector Vera

November 15, 2023 at 1:32 am

It seems to me that all the blocks are seen pretty flat, not sure if there is a lack of Z Dimension on this animation. Perhaps that dimension should be modified. Not sure how that works in after effects but its good to experiment with the axis points to see if you can get a better representation of the moving cubes. Hope you can figure this out soon, Simon! 🙂

• ### Simon Francois

November 15, 2023 at 11:45 am

Yes, I modified a camera so the perspective is almost gone, and the volumes are seen flat when looked from the front. This is for me a way to create sort of a surprise, since the viewer will first assume he is looking at a flat graphics, which will, by moving, reveal its depth. Not sure if is what you meant…

• ### Simon Francois

November 16, 2023 at 1:57 pm

Here is another demo of what I’m trying to achieve.

Here I chose a more obvious POV to see more clearly what is happening.

I did it here “by hand” cheating with the help of editing multiple compositions in a row, but my goal is to have all that happening on one composition, and have an expression that randomizes the result and the color palette visible.

Do you that can be achieve in After Effects through expressions?

• ### Filip Vandueren

November 20, 2023 at 6:46 pm

Over the years, Rubik’s cubes in after effects have bene discussed a few times.

If you want to do it dynamically, I think it’s easiest to do the animation of 1 of the bricklayers rotating, and just when it hits 90°, actually reset it to 0° but switch the colors.

It’s much easier to keep track of just the colors of the faces, than to keep track of all the 3D rotations that are adding up.

I’ll see if I can dig up an example from the past.

• ### Simon Francois

November 23, 2023 at 8:59 pm

Thank you Filip 🙏

We use anonymous cookies to give you the best experience we can.