How to Design Custom Game Dice with OpenSCAD

3D Printing & Imaging CAD Fun & Games Home
How to Design Custom Game Dice with OpenSCAD
All the pretty dice. Photo: Andrew Terranova
All the pretty dice. Photo: Andrew Terranova

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.

Use the cube command, and then click the Preview button.
Use the cube command, and then click the Preview button.

Press the Preview button on the toolbar, and you will see the resulting cube in the model display area of the screen.

Yay! We made a cube!
Yay! We made a cube!

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.

Use the intersection command to round off the edges of the cube.
Use the intersection command to round off the edges of the cube.

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.

Now our model is starting to look like a die.
Now our model is starting to look like a die.

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 the letter module to extrude a shape from 2D text.
Add the letter module to extrude a shape from 2D text.

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.

Position a character on top of the cube.
Position a character on top of the cube.

Once again use the Preview button to see how your model is coming along.

A little snow on top.
A little snow on top

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.

Add a character to the bottom of the cube.
Add a character to the bottom of the cube.

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.

Use the mouse to rotate the cube in the display area and see the bottom of the cube.
Use the mouse to rotate the cube in the display area and see the bottom of the cube.

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]).

The rotate command is needed for the other die faces.
The rotate command is needed for the other die faces.

Hit the Preview button again to see your work.

Add rain and clear night sky.
Add rain and clear night sky.

Here’s the other side.

Add clouds and storm clouds.
Add clouds and storm clouds.

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.

Render your model.
Render your model.

You should see the rendered model in the display area, and the result of the operation in the console area below that.

Check to see your model rendered properly.
Check to see your model rendered properly.

Finally, export the model to an STL file for later printing.

The exported STL file can be printed from Cura or your favorite 3D slicing/printing software.
The exported STL file can be printed from Cura or your favorite 3D slicing/printing software.

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!

What will the next generation of Make: look like? We’re inviting you to shape the future by investing in Make:. By becoming an investor, you help decide what’s next. The future of Make: is in your hands. Learn More.

Tagged

Andrew Terranova is an electrical engineer, writer and author of How Things Are Made: From Automobiles to Zippers. Andrew is also an electronics and robotics enthusiast and has created and curated robotics exhibits for the Children's Museum of Somerset County, NJ and taught robotics classes for the Kaleidoscope Enrichment in Blairstown, NJ and for a public primary school. Andrew is always looking for ways to engage makers and educators.

View more articles by Andrew Terranova
Discuss this article with the rest of the community on our Discord server!

ADVERTISEMENT

Escape to an island of imagination + innovation as Maker Faire Bay Area returns for its 16th iteration!

Prices Increase in....

Days
Hours
Minutes
Seconds
FEEDBACK