VertList->TriList

Started by
-1 comments, last by Todd Casey 23 years, 6 months ago
I am working on a project now where I have to generate 3D text using a TrueType font (I am using Direct3D and cannot switch to OpenGL). I have at this point my entire vertices list generated at runtime for every character in a given TrueType font. The problem I am having now is how do I generate the triangle list at runtime. I think I might have to every 2-3 control points (maybe every control point) add a new vertex in the middle of the character and then attach the other side to that also (the inside and outside control points might be quite different depending on the letter). The edge triangle list should be easy since they are known unlike the actual character (I can build the edge triangle list as I build the control point list). Here is what an 'i' looks like in a Tahoma type font (I hope theses turn out in the post).
    
2D Tahoma 'i':
+-+
| |
+-+
+-+
| |
| |
| |
| |
+-+

3D Tahoma 'i':
+-+
\  \
++-+
\| |
 +-+
+-+
\  \
|+-+
|| |
|| |
+| |
\| |
 +-+
  
In the above diagrams the '+' indicate control points and '|' would be an edge. The letter 'i' might be the easiest to break into triangles but a 'B', 'J', 'K' are were it gets really complex. I would greatly appreciate any ideas, tips, code, or URLs to projects like this. Thanks. Todd Edited by - Todd Casey on 10/3/00 7:42:33 AM

This topic is closed to new replies.

Advertisement