effective text rendering

Started by
6 comments, last by ehmdjii 17 years, 11 months ago
hello, in short, my question is, how are fonts managed in terms of software engineering and rendered efficiently in professional games? in most modern games (e.g. MOORPGs) texts pop up all over the place. every time i hit a monster the damage shows up over its head, i get all the numbers of my inventory, health and status and there is the chat text of course. now, is every text i see an object? what if the text changes? is a new object created? is the text rendered to the same texture again or is a new texture created? is it performance-wise better to render each character to a texture and then display a text consisiting of several quads. or is it better to render the complete text to one texture during runtime and then display the text as one quad only? and finally: how do i make really tiny text still sharp and readable? like in EVE or in WoW?
Advertisement
One way to do it is to have a font texture with an alpha channel (which contains every character in your font), and to render your text as a series of alpha-blended quads using this texture, with the texture coordinates of the vertices used to select a character from the font texture. Since the geometry is so small and simple, you can pretty much recreate it as often as you need to.

I'm not sure why you'd want to render to a texture. You'd still be drawing all your text, you'd just then be adding the extra step of drawing the final texture over your scene.

Edit: I suspect the very tiny text in WoW is readable because it is drawn with a 1-1 relationship between pixels on the screen and texels in the texture. Easily done if you draw your fonts with orthogonal projection.
Orin Tresnjak | Graphics ProgrammerBethesda Game StudiosStandard Disclaimer: My posts represent my opinions and not those of Bethesda/Zenimax, etc.
Quote:Original post by ehmdjii
hello,

in short, my question is, how are fonts managed in terms of software engineering and rendered efficiently in professional games?

in most modern games (e.g. MOORPGs) texts pop up all over the place. every time i hit a monster the damage shows up over its head, i get all the numbers of my inventory, health and status and there is the chat text of course.

now, is every text i see an object? what if the text changes? is a new object created? is the text rendered to the same texture again or is a new texture created?

is it performance-wise better to render each character to a texture and then display a text consisiting of several quads. or is it better to render the complete text to one texture during runtime and then display the text as one quad only?


and finally: how do i make really tiny text still sharp and readable? like in EVE or in WoW?



"super fast real time draw 2600 ASCII over 790FPS in nv6600"
http://www.gamedev.net/community/forums/topic.asp?topic_id=393928


Just use RTT.
"super fast real time draw 2600 ASCII over 790FPS in nv6600"
no sir.The author post the same things in bbs.gameres.com.a forum in his homaland China.he want to sell his Engine DLL file.
thank you all!

what is RTT?
Quote:Original post by ehmdjii
thank you all!

what is RTT?


render to target.render the UI Controls(include the text) to a texture created with D3DUSAGE_RENDERTARGET usage.
thanks.
im using openGL here. so i guess you mean rendering each character to a texture, like lancekt suggested?

This topic is closed to new replies.

Advertisement