Author Topic: Sliced Sprite issues with atlas reference swap  (Read 2151 times)

schellenberghq

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 31
  • Game Programmer
    • View Profile
    • Blog
Sliced Sprite issues with atlas reference swap
« on: November 14, 2013, 04:20:26 PM »
In my project the expected behavior is correct on Simple Sprites.
The expected behavior when switching between low/hi def atlas is that a) the sprite uses the same real estate, b) the sprite looks low/hi quality.

The issue is with sliced sprites. In the provided images, I have 2 button sprites. One exported at 160dpi, and the other at 320dpi. The result is smaller pixel size, thus less memory and texture space.

I have ensured that both sprites have the same slicing.

The 320dpi button looks perfect. However the 160dpi sprite takes up more real estate than expected and becomes deformed. Rather than the expected behavior of looking lower quality.

Is this the expected behavior for sliced sprites?

I have considered Not using a sliced sprite, which would indeed fix the issue, but there are many areas in the project in which a sliced sprite would be much more efficient over full size exports.

Thoughts/recommendations?

Thanks!

EDIT: I just realized that you may not be able to fully see the size differences with the provided button screenshots because you can't see the full context of the scene. Unfortunately due to the projects NDA, I may run into problems revealing more.
« Last Edit: November 14, 2013, 04:25:32 PM by schellenberghq »
---------------------------
Jacob S.
Game Programmer
---------------------------

motionsmith

  • Guest
Re: Sliced Sprite issues with atlas reference swap
« Reply #1 on: November 14, 2013, 05:02:43 PM »
This can be done, I do it in my app.

In your atlas settings for your HD atlas, make sure "pixel size" is set to "0.5". This is all it takes for me. I'm using a "fixed size" UIRoot.

schellenberghq

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 31
  • Game Programmer
    • View Profile
    • Blog
Re: Sliced Sprite issues with atlas reference swap
« Reply #2 on: November 14, 2013, 05:06:07 PM »
Ah excellent. I actually had to do "1" for my 320dpi atlas, and "1.5" for my 160dpi atlas.
---------------------------
Jacob S.
Game Programmer
---------------------------