pouët.net

3D fonts, building the meshes

category: general [glöplog]
 
Hello all, this has been on my mind for some time now, how do you generate a mesh for a character in a font.

I just saw the Horde2007 invitation and it must have been generated at run-time since it's 4k. And it looks really nice too.
The only way I've done it was by generating a cylinder along a spline.

Thanks
added on the 2007-07-11 18:34:00 by duffman duffman
Check CreateFont() and wglUseFontOutlines()
added on the 2007-07-11 18:39:31 by keops keops
(there are probably better ways to do that though, I dont use system fonts in our 64k intros but prevectorized fonts)
added on the 2007-07-11 18:41:20 by keops keops
OpenGL (at least in windows) has a function that does it for you (wglUseFontOutlines)... there's probably equivalent functions in other OSes with GL, and probably with DirectX too
added on the 2007-07-11 18:41:21 by Jcl Jcl
oops, keops was faster :)
added on the 2007-07-11 18:41:46 by Jcl Jcl
Or if you're using d3d, you could always do GetGlyphOutline and use gluTess (yeah, gluTess works without a GL-context) and construct the mesh from that.
added on the 2007-07-11 18:45:24 by kusma kusma
Here's a very old and rather chunky code that makes use of it: http://jcl.scenesp.org/files/code/Font3D.cs ( and the interface: http://jcl.scenesp.org/files/code/IFont.cs )...

... it's C# and my very begginings with it (i'd probably do things quite differently now :) ) but the usage in OpenGL is quite clear there
added on the 2007-07-11 18:48:03 by Jcl Jcl
That code in action (one of the very first tests of it):

BB Image
added on the 2007-07-11 18:52:53 by Jcl Jcl
Why do you have an icon of Mario on the Load Mesh button?
added on the 2007-07-11 19:02:41 by mrdoob mrdoob
I have no clue, sincerely... thing is, it eventually dissapeared from the application... this is the last snap I did of that application, and it had gone away:

BB Image
added on the 2007-07-11 19:08:07 by Jcl Jcl
and what is this program supposed to do exactly ? is it a demo maker ?
added on the 2007-07-11 19:21:28 by Navis Navis
it originally was a material editor (as the caption says)... it evolved to somehow a "flyby scene editor", but far from being a demomaker (and was not used for that... it was part of my VJ thinggie).

I stopped its development some years ago though (I don't do VJ stuff anymore)

Some more snapshots here: http://jcl.scenesp.org/files/meditorsnaps/. From bottom to top, you can kinda see the evolution (at least till I stopped making screenshots :) )
added on the 2007-07-11 19:25:07 by Jcl Jcl
thanks for the help
added on the 2007-07-11 19:39:37 by duffman duffman

login