Sign in to follow this  
ehmdjii

effective text rendering

Recommended Posts

ehmdjii    238
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?

Share this post


Link to post
Share on other sites
lancekt    348
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.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
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


Share this post


Link to post
Share on other sites
swstudio2002    132
"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.

Share this post


Link to post
Share on other sites
swstudio2002    132
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.

Share this post


Link to post
Share on other sites
ehmdjii    238
thanks.
im using openGL here. so i guess you mean rendering each character to a texture, like lancekt suggested?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this