Voxel Fonts

A common request to customize 3D objects is the ability to engrave, emboss or make stand-alone text.    Previously I’ve done this with triangle based text and it turned out to be a pain.  The code paths for subtracting text where very different to engraving.  Boolean subtraction operations in triangle space are much more complicated then in voxel space.  In addition the vectors for some fonts cross each other and sometimes have zero area which complicate the triangulation process.

Creating voxel spaces from a font is just an extension of the ApplyImage code I discussed in my last post.  Java makes creating images from fonts easy.   You select the font, its size and style and then render to a Graphics2D object.  You can then use this image to create a voxel space using the ApplyImage operator.  With that voxel space you can either use it stand alone to create an object or use the Subtract or Union operators to get engraved or embossed text.

Here is an example of stand-alone text:

You can find this example in the apps/lettering directory.

Advertisements
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s