Quick Dice Models for a Video Game Project

We’re creating some games for the Android platform using Unity 3 and the Qualcomm Augmented Reality extension as part of a university research project. Don’t worry if you don’t know what these are as, my questions have little to do with it.

A game I have in development requires dice models for 4, 6, 8, 10, 12, and 20-sided dice. I have no 3D modeling experience, nor do I ever intend to consider myself a 3D modeler. I was able to find an abundance of tutorials for creating a 6-sided die with pips, and it turned out beautifully. The other dice, and the 6-sided die with numbers instead of pips, are proving to be far more difficult.

At first I thought I’d take the easy route and see if anyone had provided dice models for free. I managed to find this thread. However, trying to export these models as .3ds files is only resulting in the following error:

Traceback (most recent call last):
File “C:\Program Files\Blender Foundation\Blender\2.58\scripts\addons\io_scene_3ds_init_.py”, line 137, in execute
return export_3ds.save(self, context, **keywords)
File “C:\Program Files\Blender Foundation\Blender\2.58\scripts\addons\io_scene_3ds\export_3ds.py”, line 1046, in save
primary.write(file)
File “C:\Program Files\Blender Foundation\Blender\2.58\scripts\addons\io_scene_3ds\export_3ds.py”, line 398, in write
subchunk.write(file)
File “C:\Program Files\Blender Foundation\Blender\2.58\scripts\addons\io_scene_3ds\export_3ds.py”, line 398, in write
subchunk.write(file)
File “C:\Program Files\Blender Foundation\Blender\2.58\scripts\addons\io_scene_3ds\export_3ds.py”, line 398, in write
subchunk.write(file)
File “C:\Program Files\Blender Foundation\Blender\2.58\scripts\addons\io_scene_3ds\export_3ds.py”, line 398, in write
subchunk.write(file)
File “C:\Program Files\Blender Foundation\Blender\2.58\scripts\addons\io_scene_3ds\export_3ds.py”, line 396, in write
variable.write(file)
File “C:\Program Files\Blender Foundation\Blender\2.58\scripts\addons\io_scene_3ds\export_3ds.py”, line 336, in write
self.value.write(file)
File “C:\Program Files\Blender Foundation\Blender\2.58\scripts\addons\io_scene_3ds\export_3ds.py”, line 308, in write
_3ds_short(len(self.values)).write(file)
File “C:\Program Files\Blender Foundation\Blender\2.58\scripts\addons\io_scene_3ds\export_3ds.py”, line 136, in write
file.write(struct.pack("<H", self.value))
struct.error: ushort format requires 0 <= number <= USHRT_MAX

location:<unknown location>:-1

If you know how to fix this error, then that would solve all of my problems in one fell swoop. If not, read on:

After hours of Google searching, I gave up trying to fix this error. I decided to tackle making the models on my own. Starting with the 6-sided die with numbers. Create a cube, subdivide with 4 cuts, subdivision surface modifier to get nice rounded edges, create the text, convert it to mesh, snap it to the side of the cube, move it out a bit so they aren’t occupying the same space, change the diffuse colours, join, and export.

Problem: the cube’s mesh still exists underneath the numbers. This creates an odd flickering effect on the numbers during gameplay. I need to find some way to merge the meshes. I thought about using textures, but I want to be able to keep using two materials with different diffuse colours, as this allows easy colour customization in Unity.

I’ve had limited success extruding the text and using a boolean modifier on the cube to create an engraving (this seems to only work when it feels like it), and going through the time consuming process of selecting the faces manually and assigning a different material to them.

Is there a better way to go about this?

Funny, I was considering modelling these only about 2 weeks ago. Well, short answer, there is definitely a better way then booleans to do this. There is an addon (forget the name off the top of my head) that will make the 4, 6, 8, 10, 12 and 20 sided figures. At that point I think it might be more worth while using a bump map to do the numbers, but of course they could be modeled in as well. I’ll look at this tonight and see what comes of it.

Can Max import .obj? If so I would export them as .obj and import them that way.

Blender 2.49b exports them .3ds with no trouble, use that.

Exporting as .obj worked, and made me realize that the error was actually due to an overflow (too many faces?). Knocking down the subdivision surface modifier to 1 enabled exporting the .3ds from Blender 2.58a, and importing it into Unity 3.

Thank you for helping! Now I can get back to what I do best :slight_smile: