Author Topic: Can't see GUIText & UILabel crispness  (Read 8814 times)

FizzPow

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 83
    • View Profile
    • FizzPow Games
Can't see GUIText & UILabel crispness
« on: December 24, 2012, 02:11:25 PM »
I am trying to use a GUIText for an FPS counter like I usually do on my projects.  I prefer GUIText over UILabel for this purpose, because it produces a very crisp tiny font that I can't seem to replicate with Bitmap Fonts.

So my question is two fold

1) Why can't I see my GUI Text, I have tried adjusting Z coords and anything else I could think of, but I cannot make it visible in game. I can see it in my 'scene' view though.  I am using 2D NGUI settings.

2) How can I create a font that appears as crisp as the default GUIText font using UILabel at the same size?  I am using Glyph Designer, and even just looking at the raw texture, it's too heavily anti-aliased or something, but turning off AA, makes it unusable.

Thanks!
« Last Edit: December 24, 2012, 02:14:46 PM by FizzPow »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Can't see GUIText & UILabel crispness
« Reply #1 on: December 24, 2012, 03:09:00 PM »
GUIText isn't NGUI, so this question falls out of the support forum's area. However... make sure you chose the correct game object layer. Your camera only sees what you tell it to see.

To create a crisp font, it's all about making it pixel-perfect on the screen. I use BMFont myself, not Glyph Designer -- and there are videos that cover how to create fonts for NGUI. Generally if you have a large label on the screen, you will need a large size font.

Also, make sure the quality settings are not set to "fastest" as that degrades texture quality.

FizzPow

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 83
    • View Profile
    • FizzPow Games
Re: Can't see GUIText & UILabel crispness
« Reply #2 on: December 24, 2012, 03:35:48 PM »
I understand GUIText is not part of NGUI, but I ask here, because I have never had this issue before using NGUI.  I am using Default layer for Camera and GUIText.  I really just am clueless as to why I can't see it, and figured it might be a common issue because of how your camera is setup or something?

I am using UILabel's heavily in my app, and I believe I understand them well.  I just can't find a way to get a very small, crisp font to look good.  I will play with BMFont and see if it somehow creates better quality small fonts.  Generally I don't need this in our app anyways, but it's handy for an FPS counter.  I am using all custom quality settings, and am aware of how they work with mip-maps texture settings.


Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: Can't see GUIText & UILabel crispness
« Reply #3 on: December 24, 2012, 04:25:41 PM »
Your camera needs to have a GUILayer component on it. Then it will show.

FizzPow

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 83
    • View Profile
    • FizzPow Games
Re: Can't see GUIText & UILabel crispness
« Reply #4 on: December 24, 2012, 04:27:02 PM »
Your camera needs to have a GUILayer component on it. Then it will show.

Ahhh, that was it, thank you!!

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: Can't see GUIText & UILabel crispness
« Reply #5 on: December 24, 2012, 04:27:45 PM »
Also, BMFont makes shit fonts when it's small size. The Unity importer is god-like for that. If you use Glyph Designer you can get close to the same results.

I think the Unity importer uses http://www.freetype.org/ so you can adopt that if you have time. ;)

FizzPow

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 83
    • View Profile
    • FizzPow Games
Re: Can't see GUIText & UILabel crispness
« Reply #6 on: December 24, 2012, 04:32:27 PM »
Also, BMFont makes shit fonts when it's small size. The Unity importer is god-like for that. If you use Glyph Designer you can get close to the same results.

I think the Unity importer uses http://www.freetype.org/ so you can adopt that if you have time. ;)

I see, thanks for the info.  Have you played with dynamic fonts in Unity 4.0 for mobile?  That seems like the ideal solution.  I haven't gotten 4.0 yet though.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Can't see GUIText & UILabel crispness
« Reply #7 on: December 24, 2012, 04:42:35 PM »
BMFont is fine if you tweak the settings, akshuly. I may post an example later. :P

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: Can't see GUIText & UILabel crispness
« Reply #8 on: December 25, 2012, 08:22:17 PM »
I gave up on BMFont, but I'm sure a lot of people would love an example of a good way of doing it. :D

I haven't messed much with the new Unity 4 fonts yet, FizzPow, but we just converted to it, so I'm expecting to give it a go in the new year.