Jump to content
  • Advertisement
Sign in to follow this  
leonard2012

Viable 3D text rendering solution for DirectX11

This topic is 2150 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I need to draw text in 3D perspective scene. The text can be rotated/translated/scaled so that it can be drawn with desired position and orientation. Is there any viable solutions to my issue? thanks.

Share this post


Link to post
Share on other sites
Advertisement

I can't understand if the text should be 3D or not.

If all you want is projected 2D text, you can use regular billboarding technique - just apply transformation to the billboard before drawing the texture on it.

Share this post


Link to post
Share on other sites

Of course. You can render your text into texture and then apply this said texture to whatever 3D object you want.

Or you can render the letters into separate quads, then combine those quads into common parent and translate it right in 3D space.

Edited by GuardianX

Share this post


Link to post
Share on other sites

I can't understand if the text should be 3D or not.

If all you want is projected 2D text, you can use regular billboarding technique - just apply transformation to the billboard before drawing the texture on it.

Thanks, I just need the projected 2D text. I searched "DirectX billboard" but all the results are for DX10 and below or XNA. I need one for DX11.

Share this post


Link to post
Share on other sites

I was searching to find a suitable method for rendering text in DX11.

http://rastertek.com/dx11tut12.html was best way but it has some limitations and extra works:

1-Creating Font atlas for an artist is a hard work.

2-This sample did not used some Dx11 ability such as Geometry Shader witch is very suitable to rendering font.

3-This sample implements text in screen space not in world space.

 

also I do not recommend that you use this method :

http://fw1.codeplex.com/

This lib create an extra device 9 or 10 to create DirectDraw thus it is a 2D font system and you can not use some debugging tools such as PIX and VS 2012 Diagnostics.

Share this post


Link to post
Share on other sites

http://fw1.codeplex.com/ can do this, if you're OK with using a library (or adding the library source to your project). The samples has an example of 3D transformed text.

Thank you.

I've tried FW1FontWrapper but found it had one problem: it use Win32 GDI APIs that are not available in WinRT (Windows store and phone store APIs).

Share this post


Link to post
Share on other sites

I was searching to find a suitable method for rendering text in DX11.

http://rastertek.com/dx11tut12.html was best way but it has some limitations and extra works:

1-Creating Font atlas for an artist is a hard work.

2-This sample did not used some Dx11 ability such as Geometry Shader witch is very suitable to rendering font.

3-This sample implements text in screen space not in world space.

 

also I do not recommend that you use this method :

http://fw1.codeplex.com/

This lib create an extra device 9 or 10 to create DirectDraw thus it is a 2D font system and you can not use some debugging tools such as PIX and VS 2012 Diagnostics.

Thank you for the recommendations. I've tried both and decided to skip FW1FontWrapper, which cannot be consumed in Windows Phone applications. The font engine (rastertek.com/dx11tut12.html) is great, but it has the common problem with DirectX Tool Kit's SpritonFont/SpriteBatch implementation: it works in screen space, not in world space. This means I have to read and modify  the code to suit my need.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!