Tuesday, February 14, 2012

Project: Extruded 3D text

I work with 3D virtual environments.  I've had multiple occasions to place 3D text in the world as part of a 3D user interface or for other purposes.  I've been quite happy with FTGL which allows me to load a font and produce extruded text.  However, I was thinking that it would be fun to add to this. 

FTGL is great.  It uses the Freetype library to load and parse the fonts.  On top of the 3D modeled fonts, you can also generate texture fonts and other methods for displaying text with OpenGL.  It also has utilities for layout.  However, there are a few things that I wish it could do.  Primarily, I wish that it was a little better about exposing the OpenGL.  The display-lists that it uses tend to fight with the display lists that I use.  I would also like to have direct access to the vertices that are used to render the text.  This is handy if I want to apply texture to the text or if I want to apply perturbations to the vertices (dents or protrusions).  Once I have the vertices, I can do whatever I want with them. 

While we're at it, perhaps we can improve upon the extrusion capabilities by incorporating the GLE tubing and extrusion library.  Some of this functionality might already exist in gle32.