Author Topic: Ngui tiled sprite extremely blurry (3.9.6d)  (Read 4815 times)

Demvamko

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 5
    • View Profile
Ngui tiled sprite extremely blurry (3.9.6d)
« on: April 29, 2016, 06:11:14 AM »
Hey! I am working on an android project, and i have a problem with UI Sprite. The sprite is extremely blurry although it is imported as 512x sprite. It looks totally fine on unity sprite, and its totally fine in the atlas texture but on the object it is barely recognizable. In the attachment you can see it (the background is in the question, disregard the blue icon). And also the original texture.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Ngui tiled sprite extremely blurry (3.9.6d)
« Reply #1 on: April 29, 2016, 12:45:59 PM »
For something that large I wouldn't even use a sprite. I'd keep it as a UITexture.

Check the border on that sprite and check what type of sprite you're drawing it as. Also make sure that the UISprite's dimensions actually match the sprite's.

Demvamko

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 5
    • View Profile
Re: Ngui tiled sprite extremely blurry (3.9.6d)
« Reply #2 on: April 29, 2016, 01:53:11 PM »
I managed to mitigate the effect by changing the atlas texture import setting to Sprite (2D and UI). I got the problems with stretching though. Could you help? Sorry if it is a bother, i would probably find it but my day is a bit filled.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Ngui tiled sprite extremely blurry (3.9.6d)
« Reply #3 on: April 30, 2016, 08:07:32 AM »
Problems with stretching? You will need to elaborate. Also make sure you actually specified a border on it. You're using a sliced sprite, but did you ever define a border on the sprite itself in the atlas?

Demvamko

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 5
    • View Profile
Re: Ngui tiled sprite extremely blurry (3.9.6d)
« Reply #4 on: April 30, 2016, 02:02:06 PM »
yes the border is defined, but if you look closer at the sprite ingame you will see that it is stretched because the sprite is 512x512 and the window is 800x100 i think.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Ngui tiled sprite extremely blurry (3.9.6d)
« Reply #5 on: May 03, 2016, 01:57:03 PM »
Well yeah, if you have a 512x512 sprite and you resize it to 800x100, then you end up with one side stretched, and another squished. I'm not sure what you expected there... :P

I suggest you reconsider using such large sprites. At the very least stick to 100x100 so that one side gets stretched, and another is unaffected.

As a rule of thumb, if you find yourself squishing sprites (setting sprite dimensions lower than their actual) then you're doing something wrong.