Creating 3D text
Someone knows any site/tut on creating 3D meshes from texts?
I mean, how to build by hand the meshes?
I hace seen several tutorials, including a very good on Nehe, but none that give me total control of the resulting mesh.
Why not just model the letters and use them as needed? If you need a good program to do that, check out TrueSpace. At least one of the versions is free now I think and it will extrude TT-Text to 3D and then you can convert from there. It''s one way at least...
Always remember, you''''re unique. Just like everyone else.
Always remember, you''''re unique. Just like everyone else.
Always remember, you''re unique. Just like everyone else.Greven
I need to create the mesh on the fly!
I''m creating a presentation tool, ahd need to create 3D text based on the user settings.
Something like
CMesh* Create3DText(string text, CFont font, int extrudeSize, int effects);
effects could be creating a bevelled text, for example.
I know that DX8 have functions to do that, but I would like to create a portable tool. That''s why I need to know exactly how to create 3D text.
I''m creating a presentation tool, ahd need to create 3D text based on the user settings.
Something like
CMesh* Create3DText(string text, CFont font, int extrudeSize, int effects);
effects could be creating a bevelled text, for example.
I know that DX8 have functions to do that, but I would like to create a portable tool. That''s why I need to know exactly how to create 3D text.
In that case convert from a 3D file type to c++ code. Implement the model in your code instead of a file.
Otherwise you''ll need a method to parse font files or CFont''s if you really want. Then extrude them. I''m afraid that''s a little beyond me
Always remember, you''''re unique. Just like everyone else.
Otherwise you''ll need a method to parse font files or CFont''s if you really want. Then extrude them. I''m afraid that''s a little beyond me

Always remember, you''''re unique. Just like everyone else.
Always remember, you''re unique. Just like everyone else.Greven
I think I wasn''t clear:
I need to create a mesh(a bunch of triangles) based on a string( for example : "Gamedev") and a font( the font currently selected in the HDC).
I need to create a mesh(a bunch of triangles) based on a string( for example : "Gamedev") and a font( the font currently selected in the HDC).
i''ve found a tutorial that seems to cover everything you need here. when i was doing outline fonts, however, i didn''t know about it yet. so if you want to know the resources i used, read on.
first, know how truetype outlines work. you want to extract the outlines from the fonts and turn them into contours. start on msdn with getglyphoutlines and follow the hyperlinks around. there''s some stuff in ms knowledge base as well. use google, there''s a load of stuff on it too. some links from my bookmarks:
http://www.truetype.demon.co.uk/ttoutln.htm
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q241358
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q241020
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q87115
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q243285
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q135058
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaskdr/html/drgui55.asp
then learn about glu tesselators. i couldn''t find much info when i needed it except for manpages, so i basically worked by trial and error. you want to tesselate the contours to produce solid face primitives.
then you need to extrude the face and generate normals and texture coordinates. this is where i got stuck, although my code seemed ok to me it wouldn''t generate normals correctly.
your best bet would be probably to read the above tutorial. i was writing an outline font engine, which is something more general than just creating a 3d mesh. before you get overexcited,
the engine was very slow.
---
visit #directxdev on afternet
first, know how truetype outlines work. you want to extract the outlines from the fonts and turn them into contours. start on msdn with getglyphoutlines and follow the hyperlinks around. there''s some stuff in ms knowledge base as well. use google, there''s a load of stuff on it too. some links from my bookmarks:
http://www.truetype.demon.co.uk/ttoutln.htm
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q241358
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q241020
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q87115
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q243285
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q135058
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaskdr/html/drgui55.asp
then learn about glu tesselators. i couldn''t find much info when i needed it except for manpages, so i basically worked by trial and error. you want to tesselate the contours to produce solid face primitives.
then you need to extrude the face and generate normals and texture coordinates. this is where i got stuck, although my code seemed ok to me it wouldn''t generate normals correctly.
your best bet would be probably to read the above tutorial. i was writing an outline font engine, which is something more general than just creating a 3d mesh. before you get overexcited,

---
visit #directxdev on afternet
---visit #directxdev on afternet <- not just for directx, despite the name
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement