View Full Version : Bevel Text ?
04-02-2007, 09:39 PM
i am building a 3d text using wglUseFontOutlines it works fine.but now i need to make some bevel on it
is it possible to make a bevel effect on my text on the front fac and back face ?
thanks in advance
i dont know what wglUseFontOutlines does
i assume it return a series of curves/geometry crap
( since fonts are stored usually like that to deal with multiresolutions )
if so then for each point on the curve ( or straight line )
u need to create a another point X units along the curves normal vector, u should be able to find some info online (search) about calculating tangents/normals from curves
youre welcome in ar-rears
04-03-2007, 03:18 AM
i dont know what wglUseFontOutlines doesI do. :)
The answer is: No, you cannot bevel font characters with wglUseFontOutlines.
The main reason is that data is put into display lists which you cannot change.
You need to write your own converter or find a font library already doing it for you.
If you write your own you will notice that the TrueType format description structures are overly complicated. Have fun.
Tesselation of the front and back faces can be done with the GLU tesselator.
Because of the sharp creases in most characters you need multiple normals per corner in those. Depending on the bevel look you want (additional triangles at corners or not?), stretching along the normal direction might not be the right approach.
The simpler solution which keeps the outline unchanged just duplicates the outline vertices and displaces one set to the inside (ok, agreed that could be interpreted as along the negative smooth normal direction) and moves the other a little back (or forth). Fill those two outlines with geometry, which is easy because the number of vertices and their placement is matching, and you got a bevel. Don't overdo the bevel displacement or you will break characters with tiny features.
For sharp creases on the inner bevel edges (and the edges between bevel and front and side faces) you need to generate additional normals. Independent quads for the bevel would be the simplest choice allowing smooth or sharp creases.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.