Author Topic: HD and SD atlas - Pizel size  (Read 2630 times)

Tatanan

  • Jr. Member
  • **
  • Thank You
  • -Given: 11
  • -Receive: 0
  • Posts: 81
    • View Profile
    • Casual Arena
HD and SD atlas - Pizel size
« on: July 12, 2014, 11:47:57 AM »
I am making games for 2 resolutiones: HD por iPad Retina and any device with more than 1024 px of width and SD for devices below 1024 px of width.
I am using Reference Atlas and my doubt is:
Which is the difference between those 2 options?
  • HD atlas with pixel size = 0.5 and SD atlas with pixel size = 1
  • HD atlas with pixel size = 1 and SD atlas with pixel size = 2
I just want to sure if I understand.
In first case I put UIRoot with FixedSize and height = 1536.
In the second case I put UIRoot with FixedSize and height = 728.
All that is exactly the same or are there differences?

Thank you.
Game developer on Casual Arena.

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: HD and SD atlas - Pizel size
« Reply #1 on: July 12, 2014, 02:44:56 PM »
It's almost the same.

The first assumes you work with standard ipad resolution in the editor (I assume 728 was a typo and it should say 768), the second assumes you work in retina resolution. Obviously, few people work in retina resolution as the desktop monitors generally don't support that yet.

There's also this little hitch - NGUI doesn't really work with half-pixels for widget placement. This means that if you set your height to 768 virtual pixels, then your widgets will not be placed at offsets from that - it means that the screen is divided into 768 units on height and placed on that "grid". Certain things moves widgets off of the grid like Tweens, but for raw placement it falls back to the grid.

This means that with HD, your UI will still only be placed with a fidelity of 768 virtual pixels.

If you go route 1, and set height to 1536, you will have double the resolution to place your UI, BUT on lower resolution, widgets can be placed on 0.5 pixel offsets compared to the screen, making things look a little fuzzy.

It's a trade off. I tend to go with defaulting to low resolution for placement, because it's so much easier to work with, and switching to HD data inside the widgets/atlases while using the "SD" placement.

Tatanan

  • Jr. Member
  • **
  • Thank You
  • -Given: 11
  • -Receive: 0
  • Posts: 81
    • View Profile
    • Casual Arena
Re: HD and SD atlas - Pizel size
« Reply #2 on: July 15, 2014, 01:33:31 AM »
And about fonts? Will I have better resolution using fonts in "HD" placement, ie, in HD let's say I use Unity Fonts with size 40px, while on SD I use 20px size fonts.
My doubt is: If I use SD placement and then use iPad Retina, will my fonts seem less perfect thant using HD placement?
In other words, fonts with 40px will have better resolution than fonts with 20px resized by 2?
Game developer on Casual Arena.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: HD and SD atlas - Pizel size
« Reply #3 on: July 15, 2014, 08:03:02 PM »
You can have reference fonts just like reference atlases.

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: HD and SD atlas - Pizel size
« Reply #4 on: July 16, 2014, 08:27:55 AM »
The easiest way for you to test your fears, is to actually make a test case of the two different setups.

If you have SD first, then your label placement will move by 2 pixels at a time on the HD devices. This won't diminish the quality, but it will lose a little fidelity in the actual placement.

If you have HD first, then you will have full fidelity in placement on HD devices, but will move labels by 0.5 px on SD devices. This will make them blurry, but the question is if it's a big enough degradation to warrant any fixes. Otherwise, you can attach a little "pixelFixer" script that offsets the low res devices by 0.5 when needed.

But try it out in two test scenes with both solutions, and evaluate which you prefer. :)