3d fonts

Community Forums/Showcase/3d fonts

AdamStrange(Posted 2015) [#1]
After needing a font and proceeding to hack a 3d solution. I've properly implemented a 3d font solution directly into Rameses:



A font is a collection of characters - a character being a normal and (if wanted) a bold version.


The program can mix between normal and bold to get variations that go beyond the source models:





Using multiple draws would allow for outlines, etc


Rick Nasher(Posted 2015) [#2]
Great stuff.


Stevie G(Posted 2015) [#3]
Looking good. I much prefer 3D mesh fonts to the bitmap variety. As long as you keep them simple the overheads, even with alot of text on screen, are minimal.

Stevie


AdamStrange(Posted 2015) [#4]
That's what I thought, but I'm glad to have it confirmed :)

font and bold system now functioning. Here are the results:



BlitzSupport(Posted 2015) [#5]
Looks great.


ShadowTurtle(Posted 2015) [#6]
ttf ttc support? ^^


AdamStrange(Posted 2015) [#7]
ttf tic support

Unfortunately no, because it is all low poly, ttf and other font technologies are too expensive (size wise).


ShadowTurtle(Posted 2015) [#8]
no. you can setup the grade of detail @ glyph shape curves. that meant you must wrote your own ttf loader or modify one opensource solution.
I think about a font-importer/-converter that is using a modified opensource solution you could give out for free.


AdamStrange(Posted 2015) [#9]
of you have a ttf importer I could modify?


ShadowTurtle(Posted 2015) [#10]
I can do tell ya the story.

1. write a meta-data loader
2. write a glyph-index-table loader
3. write a glyph-shape & -points loader (from a choosen glyph)
4. ^- accurately here you can work with curve-tesselation (see example code)
5. you gain the siluette of many layers a glyph is havin (aside from the possibility of composed shapes)
6. Rebuild the shape with polygons
7. You do think "O" is a bordered shape? Wrong. Cut holes in glyphs with csg (construct solid geometry) in 2D.
8. Recreate normals and uv-coords and you able doing textured texts.

Alternatively you can do what i huv wrote already (see last post) and use free alternatives. So far i know blitzmax is havin a wrapper for opentype (exits as module from some one :-). you can modify it and create ya font-converter.

Here are some screenshots from my loader. Chinese is not supported. LTR is not supported. And many other things are not supported. You can gain me for a project. I do a importer for you (integrated in ya product!) for $1200 in a week. Is that ok!?





int tesselateCurve(textManager_fontEngineTTF_fontInfo_data* points, int* num_points, float x0, float y0, float x1, float y1, float x2, float y2, float objspace_flatness_squared, int nn) {
	int tcr = 0
	float mx=(x0+2.0*x1+x2)/4.0
	float my=(y0+2.0*y1+y2)/4.0
	float dx=(x0+x2)/2.0-mx
	float dy=(y0+y2)/2.0-my
	if ( nn > 16 ) {
		tcr = 1
	}
	if ( tcr == 0 ) {
		bool deciA = false
		if ( dx*dx+dy*dy > objspace_flatness_squared ) {
			tesselateCurve(points, num_points, x0, y0, (x0 + x1) / 2.0, (y0 + y1) / 2.0, mx, my, objspace_flatness_squared, nn + 1)
			tesselateCurve(points, num_points, mx, my, (x1 + x2) / 2.0, (y1 + y2) / 2.0, x2, y2, objspace_flatness_squared, nn + 1)
			deciA = true
		}
		if ( deciA == false ) {
			addPoint(points, num_points:intValue, x2, y2)
			num_points:intValue = num_points:intValue + 1
		}
	}
	return(tcr)
}