Custom Dice for a Creative World
Six sided dice are common enough in many games, but you can kick the fun up a notch with a custom design that matches the theme of your game. Or you can invent a whole new game based on your own ideas. Maybe you just lost a specialized die from a game and want to replace it.
In this skill builder, you will learn how to create a simple custom model for dice in OpenSCAD. I’ll explain the basics of the tool, show examples, and provide links for 3D printing custom dice for your game. You can start from my example .scad files and tweak them for your needs, and then export .stl files for printing.
My example Weather Dice! design is a die with six different symbols for sun, clouds, storms, snow, rain, and clear night so you can predict (or affect?) the weather. At the end of the post I also provide a link to my Emoticon Dice.
Creating a Model in OpenSCAD
OpenSCAD is a free 3D Computer Aided Design (CAD) modeling tool, that lets you program your model, rather than draw it. For Makers familiar with programming, this is a great approach. There are many other modeling tools available, but this post is going to show you how to make a simple but fun dice model in OpenSCAD.
Download the latest version of OpenSCAD software for your preferred computer operating system, and install it.
Create a Cube
Fire up OpenSCAD and create a new file. Save your file with a unique filename so you can find it later.
Comments in OpenSCAD start with a double-slash, as you can see below.
Start by making a simple cube. Define a variable “cube_size”, then use the cube command as shown below. The center=true setting centers the cube at the origin of the model.
Using different colors for the objects you create in OpenSCAD is handy, because it helps you visualize as you work. We’ll make the cube gray.
Press the Preview button on the toolbar, and you will see the resulting cube in the model display area of the screen.
Round the Cube Edges
Next we will make the edges of the cube rounded, by intersecting the cube with a sphere. The intersection command is a Boolean operation that combines two shapes and only keeps the parts that intersect.
Note how the red coloring of the sphere makes the model stand out in the resulting rounded cube. This has no effect on the actual printable file we will eventually output. It’s just there to make things easier while we work on the design.
Create 3D Text
First, we’ll define what is called a module within OpenSCAD to create extruded letters. The text command in OpenSCAD only creates a 2D shape. The letter module below, borrowed from the text_on_cube example included in OpenSCAD, uses the linear_extrude command to add a third dimension to the 2D text.
We also add variables to control the height and depth of the extruded text. The “o” variable will be used later to help position the characters on the face of the die.
Add a Character to the Die
Let’s start with adding a character to the top face. We want to subtract the extruded character shapes from the faces of the die. The difference command is another Boolean operation that removes one shape from another, which we will use for this purpose. Note how the intersection command is entirely nested inside the difference command.
Here we are using the translate command to move where the character will appear. The format is translate ([x-position, y-position, z-position]). We want the character to keep the same horizontal position (the x and y axes), and move up (z axis). Notice that we use the “o” variable that we defined earlier in the translate command.
I used the “Wingdings” font to get a snowflake character, which corresponds to a capital “T” in the character map.
Once again use the Preview button to see how your model is coming along.
Special Considerations for the Bottom Die Face
For the bottom face we simply use the translate command again, only in the negative direction on the z axis. Because the character would be positioned entirely inside the cube, we also have to subtract the height of the letter from the z axis position.
From a practical design perspective, it is important to consider how the shape and size of the character on the bottom of the die will print. Large open areas won’t be supported, and may sag during printing. Very small open areas may get squished and close up. I used the Windings sun character, which worked well for me. Your mileage may vary based on the character you choose, your printer settings, etc.
Add Characters to the Rest of the Die Faces
Now that you see how that works, we can add characters to the rest of the faces. In addition to the translate command, we’ll use the rotate command to position each of the characters. The format is similar to the translate command: rotate([x-rotation, y-rotation, z-rotation]).
Hit the Preview button again to see your work.
Here’s the other side.
Render the Model and Export the STL File for Printing
Once you are happy with your model, you need to render it. Click the Render button and see if it completes without error.
You should see the rendered model in the display area, and the result of the operation in the console area below that.
Finally, export the model to an STL file for later printing.
I used Cura version 15.04 on a Printrbot Simple Metal, and I was very happy with my results. I scaled the model down to 16mm×16mm×16mm within my printing software, which is the size of a standard game die.
You can find the files for my Weather Dice! and Emoticon Dice on Thingiverse.
Don’t just stop with my examples, try something on your own! Work with different character sets, fonts, sizes, etc. Have fun!
ADVERTISEMENT