Create a Stylized, Vector Rubik’s Cube
Tutorial Details
- Program: Illustrator CS3
- Difficulty: Intermediate
- Estimated Completion Time: 90 minutes
Download Source Files
Final Product What You'll Be Creating
Learn to create a stylized Rubik’s Cube in Illustrator. I’ll take you through how to make every detail of the final illustration, which will teach you some new techniques and introduce you to some new Illustrator tools. Let’s get started with creating this iconic, retro puzzle cube.
Step 1 – Set Up the Document
Create a new document and put in the details below.

Step 2 – Draw a Square
Rename “Layer 1″ to “Cube,” by double-clicking the layers name in the layers panel.
Press “M” to bring up the Rectangle Tool and then click once inside the document to bring up the Rectangle window, then enter 360px for the width and height and press OK. Give the square a red fill and no stroke.

Step 3 – Turn the Square into a Cube
Press V to bring up the Selection arrow and select your new square. Now go to Effect > 3D > Extrude and Bevel. Put in the dimensions shown below and click OK. Finally, Expand Appearance (Object > Expand Appearance), then lock the “Cube” layer.

Step 4 – Draw a Grid
Create a New Layer (Command + L) at the top of the Layers window and call it “Face1.”
Get the Rectangle Grid Tool, which can be selected if you hold down the button for the Line Tool. Click once inside the document and put in the dimensions below, then click OK. Give the grid a dark blue stroke (or any color that’s easy to see). Position the grid roughly over the main front face.

Step 5 – Skew The Grid
Enter Preview view by pressing Command + Y.
Press V and select the grid, and then press E to get the Free Transform Tool. On the top right corner of the grid click and hold the small white box that you use to transform an object’s shape. Drag the corner inwards very slightly and then press and hold Command straight away. This will let you free-skew the box.

Step 6 – Line the Grid to the Face
Move all the corners so that the grid lines up with the main front face of the cube. This is a bit fiddly as nodes you’ve already moved will get moved out of place as you transform their opposite corner. You just have to go back over them until the grid lines up exactly to the face of the cube below. Zoom in and out (Command and + or -) to make sure the corners are lined up properly. Lock the layer “Face1″ after you’ve finished.

Step 7 – Do the Same for the Other Faces
Repeat this process for the other two sides on their own layers naming the left side “Face2″ and the bottom “Face3.”
Don’t be afraid to spend a bit of time on this. The bottom face is quite hard to get right, but you need all the corners to line up so persevere. I find small movements and gradually working each corner into place makes it easier.

Step 8 – Check that it Looks Right
Exit Preview (Command +Y) and zoom out so you can see the whole cube.

Step 9 – Delete the Vertical Ends
Now hide the layers “Cube,” “Face2,” and “Face3″ by clicking the small eye icon next to the layer names. Unlock the layer “Face1,” select the grid with the Selection Tool (V), and ungroup the lines (Command + Shift + G)
Now deselect the grid by clicking anywhere in the artboard and then select and delete the left and right vertical lines.

Step 10 – Copy the Middle Horizontal Lines
Select the two middle horizontal lines, then press Command + C to copy them and then press Command + F to paste them in front. Turn off the visibility of the lines you just pasted in the layers panel.

Step 11 – Join Up the Ends
Use the Direct Selection Tool (A) to select the two very end nodes on the first and second horizontal lines (when you hover over the end of the line a small white square pops up next to the Direct Selection Tool to show you’re over the end of the node).
With these selected, click Command + J or go to Object > Path > Join to join up the ends of the two separate lines. Do this to the other end of the same lines to complete the shape. Then do this for the third and forth horizontal lines underneath.

Step 12 – Join the Middle Lines
After this, make the two lines we copied from the middle visible again and then join up the ends, as you’ve just done with the others. You might want to move them to the top of the layer to make them easier to click. You should now have something that looks exactly like the grid we started with.

Step 13 – Move the Vertical Ends
Again with the Direct Select Tool (A), select the top node of the second vertical line and press the Up Arrow key once. Then select the bottom node of the same line and press the Down Arrow key once. Do the same for the third vertical line.
See the image below to make sure you are moving the correct nodes.

Step 14 – Divide Below
Select the second vertical line with the Selection Tool (V), move it to the top of the layer (Command + Shift + Right Bracket key) and then go to Object > Path > Divide Objects Below. Do the same with the third vertical line.
You should now have a grid that looks identical to the grid we started with, however now the nine inner boxes should all be individually selectable.

Step 15 – Do the Same for the Other Sides
Lock the layer “Face1″, turn it’s visibility off and then add grids to layers “Face2″ and “Face3.” This process started at Step 9 if you want to look back at what we just did.
Tip: As the bottom side is at a very tight angle, when you move its two central vertical lines up by 1 pixel by pressing the up arrow once, you will also need to press the right arrow twice as well to maintain the perspective. Also, when you move the bottom nodes of the lines down, press left twice. The aim is to get the lines to match up on all three faces so keep an eye on the other two sides by turning their visibility on and off as you work.

Step 16 – Prepare to Edit
OK, that was the most fiddly part of this tutorial, but necessary to give us the ability to maintain the cool perspective and edit the inner squares independently of each other.
You can delete the layer “Cube” now. Turn the visibility of the remaining thee layers on, but lock “Face2″ and “Face3,” and unlock “Face1.”

Step 17 – Offset the Path
Now with the Selection Tool (V) select all of the squares in “Face1.” With them still all selected go to Object > Path > Offset Path. In the window that pops up enter -4px and click OK.

Step 18 – Round the Corners
Now select all the new inner boxes with the Selection Tool (V) and then group them (Command + G or Object > Group).
Then Select all of the outer boxes and group them. A quick way to do this is to select everything in the layer (Command + A) and then Shift-click the inner boxes, that you just grouped, which will deselect them leaving you with just the outer boxes selected).
Select both the groups and go to Effect > Stylize > Rounded Corners. In the pop up window enter 6px and click OK

Step 19 – Expand the Front Face
With both groups still selected go to Object > Expand Appearance. Then swap their strokes to fills by pressing Shift + X. Change the fill color of the outer boxes to black #000000. Change the fill color of the inner boxes to this blue #0AAEEF for now. You should have the image below.

Step 20 – Add the Black Boxes Together
Use the Selection Tool (V) to select the black boxes, ungroup them (Command + Shift + G), but keep them selected and then click the Add to Shape Area button in the Pathfinder window to make them all into 1 object and then click Expand (If you can’t see the Pathfinder window press Command + Shift + F9 or just go to Window > Pathfinder).
Use the Direct Selection Tool (A) to delete the four gaps that are left in the middle between the black boxes by clicking one of the nodes of the gaps and pressing Delete twice.
Rename the new black object inside the “Face1″ layer to “Face1Back.” Turn the visibility of “Face1Back” off.

Step 21 – Add the Blue Boxes Together
Use the Selection Tool (V) to select the blue boxes. Ungroup them but keep them all selected, and then click the Add to Shape Area button in the pathfinder panel again, then click Expand. Now rename them to “Face1color.”

Step 22 – Copy and Paste the Blue Boxes
Copy this set of blue boxes (Command + C) and then turn their visibility off. Paste two copies in the same place and in front of one another by pressing Command + F twice.

Step 23 – Make the Shadow
Select just the top set of squares you just pasted with the Selection Tool (V, and then with the arrows on your keyboard press up three times, and then right three times. Now select both of the two shapes and press the Subtract from Shape Area button in the Pathfinder window, and then click the Expand button.

Step 24 – Have a Look
Change the color of the remaining shapes to this darker blue #099AD4 and rename the object to “Face1Shadow.” Now turn the visibility of the “Face1Back” and “Face1color” back on, and lock the layer “Face1.”

Step 25 – Do it All Again!
The process for the next two sides use exactly the same techniques, but have small differences so I’ll go through them though in less detail.
Unlock and turn the visibility of “Face2″ on. Select all the boxes then offset their paths by -3px this time. Group the inner boxes. Group the outer boxes. With them both selected apply a Rounded Corners effect of 6px and then go to Object > Expand Appearance. Swap the strokes to fills.
Select the outer boxes group, ungroup them and then click the Add to Shape Area button in the Pathfinder. Rename the object to “Face2Back,” change its color to black #000000, and delete the four gaps between the boxes. Hide the visibility of “Face2Back.”
Select the inner boxes group, ungroup them and then click the Add to Shape Area button in Pathfinder and Expand. Rename the selection to “Face2color” change its color to this red #F70D0D. Copy “Face2color” and then hide its visibility.
Paste the two copies on top of each other in the same place. Select the top copy and this time press up two times and then left three times. Select both of the copies and press the Subtract from Shape Area button in the Pathfinder window and click Expand. Change the color of the remaining shapes to this darker red #D40404 and rename the selection to “Face2Shadow.” Turn the visibility of “Face2color” and “Face2Back” back on.
Now lock the layer “Face2.”

Step 26 – Same Again with Some Small Changes
Finally, for the bottom use the same process again but with a couple of small changes.
Only Offset the Path for the inner boxes by -2px.
This time only select the outer boxes and apply a 6px Rounded Corners effect. Then select the inner boxes and apply the Rounded Corners effect but with 4px instead.
Give the inner boxes this yellow #EDD70C. To make the shadow for the bottom face press down three times, then left one time, and then subtract the shapes from each other. Finally give the shadows this yellow color #CFBB0A.

Step 27 – Copy the Black Shapes
Things should start to be looking more like a Rubik’s Cube now, but we need to give it a bit of bulk!
Unlock the three layers called “Face1,” “Face2,” and “Face3.” Now use the Selection Tool (V) to select just the black shapes from each of the layers, which should be called “Face1Back,” “Face2Back,” and “Face3Back.” Copy these three selections (Command + C) and then lock all three layers.

Step 28 – Paste into a New Layer
Create a brand new layer (Command + L) on top of all the others and call it “Outline.” Paste in Front (Command + F) the three black shape copies you just made into this new layer. Make sure the three shapes are selected and add a black stroke of 1px in weight aligned to the outside. To align a stroke to the outside of a shape, click the Align Stroke to Outside button in the Stroke panel.

Step 29 – Add Together
Now with the three shapes still selected, go to Object > Expand Appearance, then ungroup them by clicking Command + Shift + G. Finally, click the Add to Shape Area button in the Pathfinder window, then Expand. On the black shape that is left, get your Direct Selection tool (A), and delete the gaps that are left in the middle.

Step 30 – Add the First Stroke
Now select your new shape and bring up the Appearance panel (Window > Appearance). In the panel drag the box that says “Stroke” underneath the box that says “Fill.” The fill should already be set to Black ,so select the Stroke box in the Appearance Panel, and add a 4px White #FFFFFF stroke to the shape, as you would do normally.

Step 31 – Add the Second Stroke
With the shape still selected, go back to the Appearance panel and click the small arrow on the right hand side that will bring out a little submenu, then select the option Add New Stroke. You should now be able to see two different strokes in the Appearance panel. Select the bottom one and add a 10px Black #000000 stroke to the shape.
Drag the layer “Outline” to the bottom of the layers panel and lock it.

Step 32 – Add a Gradient to Face1
Let’s give the faces a nice glossy feel now. Unlock the layer “Face1″ and select the blue boxes, which should be called “Face1color.” Now click the Gradient fill button at the bottom of your tools panel and place these settings into the Gradient window (Command + F9): #0CB0F0 at 0%, #29CAFE at 48%, #0AAEEF at 50%, #27C8FD at 76%, #0EB1F1 at 77% and #2CCDFF at 100%. Then set the Angel at 310 degrees. Now lock layer “Face1.”

Step 33 – Add a Gradient to Face2
Unlock “Face2″ and put in these settings for the gradient effect: #F50D0D at 0%, #F70D0D at 48%, #E41010 at 50%, and #E21010 at 100%. Then set the Angel at 310 degrees. Now lock the layer “Face2.”

Step 34 – Add a Gradient to Face3
Unlock “Face3″ and put in these settings for the gradient effect: #EDD70C at 0%, and #FFE108 at 100%. Then set the Angel to 15 degrees.

Step 35 – Scale Down
Unlock all four layers now and press Command + A to select everything. Then go to Object > Transform > Scale and put in the dimensions below. Then lock the layers again, as we’re finished with them for now. I find it’s easier to work bigger sometimes as you can zoom in and be more precise, and then scale it down later. Good old vectors!

Step 36 – Give it a Background
Let’s make the background now. Create a new layer at the very bottom of the layers window and call it “Background.” Press M to bring up the Rectangle Tool, click once inside the document and and put in 2000px for the width and height. Center the new square behind you Rubik’s Cube and give it this color #7DD6EA. With it still selected press Command + 2 to lock the selection within the layer.

Step 37 – Draw a Circle
Now press L to bring up the Ellipse Tool, and draw a circle 480px by 480px. Give the circle a white #FFFFFF fill.

Step 38 – Distort the Circle
Position the circle behind the Rubik’s Cube, and with it still selected go to Effect > Distort & Transform, and then enter the dimensions below. Now lock the “Background” layer.

Step 39 – Draw the Top of a Flag
Create a new layer at the top of the layers window and call it “Flag.” Press N to bring up the Pencil Tool and draw a line roughly like the one below. Give it a 2px black #000000 stroke and position it so the left end starts just over the left hand side of the Rubik’s cube.

Step 40 – Copy, Move and Paste
Copy the stroke (Command + C) and paste a new one in front (Command + F). Then press Shift + Down Arrow key three times to move the copy 30px down.
Copy the line you just moved and paste another one directly in front of it and press Shift + Down Arrow key another three times. Turn the visibility of the middle line off for now.

Step 41 – Join the Top and Bottom Lines Together
Bring up the Direct Select Tool (A) and join up (Command + J) the end nodes on the two lines you can still see. Give the shape a white fill #FFFFFF and call it “FlagFace.”

Step 42 – Add a Node
With the shape “FlagFace” still selected bring up the Pen Tool by pressing P and on the right hand side. In the middle of the vertical line add a new node by clicking the line once.

Step 43 – Make Some Tails
Select this node with the Direct Selection Tool (A) and move it inwards so the flag looks like it has a couple of tails. Still with the Direct Selection Tool, grab the bottom left node of the flag and move it right about 3px.

Step 44 – Write on the Flag
Now make that middle line, that we hid a minute ago, visible again. Move it to the top of the layer.
Select the Type on a Path Tool, which can be found if you hold down the Type Tool, and click somewhere towards the left of the line. Now type “Rubik’s Cubes Rock!!!”. I’ve chosen Rockwell Bold at 32px as my font, but if you don’t have that then try another font out. I find something with block serifs works well though.

Step 45 – Center the Type
With the type still selected go to Type > Type on a Path > Type on a Path Options. Put in the dimensions below to center the type vertical on the path.
If you want to move the type along the path from left to right, and vice versa, then select the type, get the Direct Selection tool, and hover over the beginning of the first word where you should see a vertical line with a white box next to it. When you hover over the box, the Direct Selection Tool will turn black with a small arrow pointing right. When you see this you can click and drag the text either way along the path.

Step 46 – Copy the Flag
Select the flag you’ve just drawn and copy it. Then press Command + B to paste it behind, then press Shift + Down Arrow key once to move it down by 10px. Change its color to black #000000 with no stroke. Call the shape “FlagShadow.”

Step 47 – Copy the Outline
Unlock the layer “Outline” and copy the shape into there, then lock the layer again. Paste the outline shape you’ve just copied in position at the bottom of the layer by pressing Command + B into the layer “Flag.”

Step 48 – Copy the Outline
Select both the pasted outline shape and the shape called “FlagShadow” and press the Intersect Shape Area button in the Pathfinder window followed by Expand. Name the remaining shape “FlagShadow” again and give it a black fill. Change the Opacity to 40% and Lock the layer “Flag.”

Step 49 – Draw the Rest of the Flag
Finally create a new layer, just above the layer called “Background,” and call it “FlagBack.” Press L and draw a quite flat ellipse with the same dimensions shown below.

Step 50 – Position the Curl
Position the shape behind the left hand corner of the flag you drew and give it a 2px black stroke and a light grey (#E8EAEA) fill color. The final image is shown below.

Subscribe to the Vectortuts+ RSS Feed to stay up to date with the latest vector tutorials and articles.

Nice tut…
Thank You. It’s my first one so it’s nice to get it under the belt! :)
Nice work Jake!
swish.
I will do it right now, as I am a Hungarian, like the man who invented rubik’s cube:) TNX
WHen I do control+Y(outline view), I just get a 1-d image. So I’m doing it with the 3d image…but it’s a pain!
In the cube layer
Select the cube
Object..Expand Appearance
Then use cmd Y
Hi David! When you enter Preview view you should only see skeletons of your vector shapes (as seen in Step 6). This should make it easier to select the corner nodes and also see that everything lines up perfectly. It may all look like a flat image but try selecting the thin black lines in Preview view and moving them.
Also try flicking between Preview and Normal view as you work so you can see what you’re doing.
Hope that helps!
Bemused hit it on the nose Jacob. I had to expand it to get it. Sorry as I’m a beginner w/illustrator(even though I’ve used it for a few months :P). However, I’ve tried again and again. I can’t really get the grid perfectly lined up. I’ve zoomed in and usually one is off a hair or so, but the rest (or two) are okay. But if I try to adjust, another gets a bit out of whack…
I may just give up and use the map art :P
You have to expand the extruded square
Hey david- don’t give up! I missed out the “Expand Appearance” part in Step 3 which has been added now. It’s my fault. It is worth learning that technique though so give it another go if you get the chance- cheers!
You are well tried. Keep it up.
Hey Jake,
Great tutorial, really easy to follow. Will give this a go today!
Do you have any others planned?
Cheers. BP ;-)
Hey BenP!
Thanks for the comment! Yes i’m thinking about my next one at the moment.
;)
Nice tut! Thanks. I had a hell of a time matching up that bottom one.
Hi Aaron!
Yes that bottom one is really annoying to get right. I find it’s a handy technique though.
Cheers
Why don’t u use MapArt function in Bevel-and-Extrude?
It is just the way to make it easy:
prepare 3 swatches — frontal, side and top views of cube without any deformations, and so on… ind just add this swatches in Map Art on extrude model…
Hi ky3mu4 – yes that’s definitely one way to make it but as this was a tutorial i wanted to show a few different techniques. I don’t want illustrator doing all the work for me!
Plus i like having the ability to easily edit individual vector sections.
I used the MapArt as a guide and drew the lines.
Great tut, I’ve learned small but really useful things here.
Nice tutorial although I would get rid off of the white outline outside the cube. I think it works without it.
Thanks for sharing.
No worries- thanks for the comment!
Very nice tut! Thanks!
Hey guys- on Step 3 i meant to add “Expand Appearence” after you Extrude the cube. My mistake- sorry!
Lovely, it’s always the subtle details that count, thanks.
Hi, im having trouble ungrouping the grid, if i hit ctr+shift+g illustrator ungroups the lines in the middle but the outline of the grid remains as a whole square wich cannot pe ungrouped again, so im stuck at this point.Any hints?
Hi Dorian!
When you create the grid make sure you have the “Use Outline Rectangle As Frame” check box UNSELECTED. If you look back at Step 4 you will see the check box at the bottom of the Rectangle Grid Tool window.
Hope that helps. Jake
Every time I try to divide below on step 14, it’s creates an incorrect division. I’ve gone over it quite a few times and I seem to be doing everything exactly according to instructions. I’m using CS4, any ideas?
Hi Craig
First of all make sure that the vertical line you select is above the path you’re dividing. If you look inside the layer you can check it’s at the top and if not drag it to the top.
Secondly make sure that the end node of the dividing path is overlapping the path below. By following Step 13 this should already be the case but if not nudge the end node up (or down for the bottom node) a couple of pixels to make sure.
Finally make sure you only have the dividing path selected.
That’s all i can think of. Hope that helps
Thanks for the quick response Jacob, it’s much appreciated. I’ve tried everything, even starting the tutorial again, I’ve followed the ( very concise) instructions to the letter and I still can’t come up with a correct division. doing both the vertical divisions as explained in step 14, leaves me with a middle band of 3 squares only. I can only assume it’s some kind of flaw with my Illustrator program as noone else seems to have encountered this problem.
Hmm, I can’t think what else it would be. That would be a very precice problem in Illustrator if that is the case. If you get really stuck with it and want to finish the tut visit my website (www.jacoblee.co.uk) and send me a message through there. Sorry I can’t be more help.
I had the same problem and then found out that I hadn’t correctly joined the end paths of the lines properly. When I selected the vertical paths and divided the objects below, it was only dividing the middle squares because the other nodes hadn’t been properly joined.
I found hiding the other layers and turning the square’s strokes to black helped me to see in the layers menu if I had all of the appropriate lines joined. Once I got that squared away (sorry, unintended pun), it worked just fine. Face 1 worked flawlessly. Face 2 had a little problem like this (even though I went through the exact same steps). Face 3 just about did me in, but I finally got it.
Overall, great, well laid out tutorial. A few kinks here and there (maybe different versions of Illustrator), but nothing I couldn’t figure out. Great job. I will look for more tuts from you.
I’ve gone through it again and now it’s fine, still can’t understand where I went wrong though. Thanks for your attention.
Please Help Me! I simply can’t get the bottom one to match up. I am getting frustrated, and I want to keep going forward on this project, without giving up. Any tips?
Hi Laura – sorry but that’s the most frustrating part of this tutorial. You just have to keep working each edge in- they do fit eventually, I promise!
Just get the corners close to where they’re meant to be and then try doing a little move on one, and then moving another one, and so on.
I too was having extreme difficulty in getting the bottom right and almost gave up with the tutorial!
What I did was just add the grid as a symbol, then used that symbol in MapArt during 3D Extrude and Bevel, to serve as guides. Then while adding the actual grids, instead of the frustrating Free Transform tool, I just used the easier to use Direct Selection tool to adjust the path of gridlines, by basing them on the guides.
Not sure if that’s the best way to do it, but the Free Transform was so not working for me.
Thanks for the tutorial though. Learn some new tricks.
Great tutorial! It’s nice to see something this impressive built from the ground up.
+1 for Niki’s Map Art method for creating the grids, particularly if you replace the grid lines with nine rectangles first (Expand Appearance and stroke lines don’t play well with each other). There’s an easier way with Smart Guides and the Free Transform tool, but this only works if your Extrude perspective is zero.
HTH.
:)
Hey Jacob! Can you tell me, why do we move the vertical ends at step #13? What does it change?
Thanks.
Great tut!… hey man, i am in a great trouble!!. Step 23, you have some beautiful shadows in every square… well, i followed everything you said, but, i get just one of the squares with that shadow! i don’t know if i am clear, but i can only get one those things in “L” form…. i don’t know what to do, i’ve tried everything and i don’t want to give up, this the first time i use illustrator … please help me :(
There’s also a screen-cast of this, you may find it useful. http://vector.tutsplus.com/tutorials/illustration/create-a-stylized-vector-rubiks-cube-screencast/