Jump to content

  • Log In with Google      Sign In   
  • Create Account

Best way to draw rotated text?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 Ti-cul   Members   -  Reputation: 107

Like
0Likes
Like

Posted 04 November 2012 - 01:37 AM

I am writing a program that displays words which can be rotated or moved. The words are adjacent to other meshes of objects.

Is D3DXCreateText the best way to do this?

A scene typically consists of 50 to 1,000 groups of words. A group averages 4,000 to 6,000 vertices (at .001 chordal deviation).

It takes a couple of seconds to generate the static meshes, after that I can get 50-200 fps, which is OK.

Is there a better way to create text that will rotate or move? The words are not rotated indidually. The entire set moves as one when the user zooms, pans or rotates. The words must remain as crisp and legible as possible even at small point sizes.

I tried textures, but the appearance of the font quickly becomes fuzzy when zooming out.

D3DXCreateFont / DrawText doesn't seem to be the answer, as the text does not move when the scene is rotated.

Thank you for your input.

Sponsor:

#2 Amr0   Members   -  Reputation: 1153

Like
0Likes
Like

Posted 04 November 2012 - 03:28 AM

D3DXCreateText can get too slow and too resource-consuming quickly. You can draw transformed text by rendering the text to a texture (render target) and then drawing the texture on a transformed quad, or you can use an ID3DXSprite object with D3DXCreateFont/DrawText(), and apply transformations to the ID3DXSprite object, although what you can do with that technique could be limited.

#3 sprezzatura   Members   -  Reputation: 109

Like
0Likes
Like

Posted 05 November 2012 - 06:50 AM

Thanks for the reply. I have found that text rendered as texture maps quickly becomes fuzzy and illegible when zooming out.

Aren't sprites 2D? Which would mean they can't rotate in 3D (yaw, around the Y axis)?

I can pump out 4M vertices (2K words) in a couple of seconds, and rotate that at 40 fps, so that's pretty acceptable. I guess I'll stick with that for now. I can try progressive meshes to reduce the rendering load.

Also, I can animate the scene while creating the meshes, by gradually showing what has been generated so far, so that will keep the user entertained.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS