Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Detinator10 · Jan 09, 2017 at 04:51 AM · pixelpixel art

How to keep pixel art crisp in unity

My sprites look fine in a photo viewer, but in unity they blur. Can someone please list all of the steps i need to take to make sure that pixel clarity is preserved upon import into unity? I understand this question has been asked multiple times, but i've tried all of the obvious stuff (point filtering, no generate mipmaps) and i'm not sure what else to do.

Bump: Still need help, check my images posted as a comment to one of the answers (which didn't work for me)

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Cherno · Jan 09, 2017 at 04:09 PM 0
Share

point filtering should be all that is needed. To be sure, please post a screenshot of your art how it apears in the external program and in Unity.

1 Reply

· Add your reply
  • Sort: 
avatar image
4

Answer by johnd_unity3d · Jan 09, 2017 at 06:08 PM

Filter Mode: Point (no filter) Generate Mip Maps: NO Format: Truecolor

Very important: get your PPU right. You want one pixel on your sprite to equal an integer number of screen pixels. E.g. if the vertical screen resolution is 600, and the camera's orthographic size is 5 you have 10 world units vertically (2 * orthographic size) which means you have 60 pixels (vertically) per world unit. PPU is how many pixels in the sprite correspond to 1 world unit. So if in our example you set PPU to 60 for that sprite, you will have 1 sprite pixel == 1 screen pixel, which would be good. If you set PPU to 30 then 1 sprite pixel == 2 screen pixels, so your sprite will be twice as big but still an integer number of screen pixels, so that is also good. If you set PPU to 45 then 1 sprite pixel == (60 / 45) == 1.33333 screen pixels, which would be bad from a pixel-perfect point of view.

You may also want to use a material derived from Sprites/Default and enable pixel-snap. This should mitigate problems associated with making sub-pixel movements of your sprite or the camera which can otherwise cause artifacts.

Avoid having odd dimensions in your sprite (51x51 pixels is bad, 50x50 is ok).

Avoid having a screen (camera) resolution with odd dimensions (801x601 is bad, 800x600 is ok).

Comment
Add comment · Show 8 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Detinator10 · Jan 09, 2017 at 11:46 PM 0
Share

These are images of my editor

capture.png (68.8 kB)
avatar image Detinator10 · Jan 09, 2017 at 11:46 PM 0
Share

alt text

capture-1.png (222.7 kB)
avatar image Detinator10 · Jan 09, 2017 at 11:46 PM 0
Share

alt text

capture-2.png (74.7 kB)
avatar image Detinator10 · Jan 09, 2017 at 11:48 PM 0
Share

I apologize for putting these as seperate comments, but it wouldn't allow me to post them otherwise. I've tried all of your suggestions and im still seeing the same issue. I've set my orthographic size to 6 which should mean that with the camera as 768 vertically the PPU would be 64. $$anonymous$$aybe I'm just not seeing something. Did I miss something or do something wrong? Thanks

avatar image johnd_unity3d · Jan 10, 2017 at 10:37 AM 0
Share

The import settings look fine. It appears from your first screenshot that the Scale (at top of game view) is less than one. I think this is because the size of your game view in the editor is in fact smaller than the resolution you have set (768 vertically you say). I think this is the problem. Even though you set a given resolution, you can drag the game view smaller than that, and Unity will try to scale everything down to fit, but the scaling will not be pixel perfect. Either a) drag your game window so that it is the correct size, or b) (if it won't fit on your screen) select a lower resolution that you can actually fit within your game view (which will mean you will have to do your ppu calculation again).

avatar image Detinator10 johnd_unity3d · Jan 11, 2017 at 12:22 AM 0
Share

I tried building and running the game at 1366*768 which is what my ppu is configured for and it's still blurry. Is it possible that the issue is with the map being an atlas of tiles that are saved in photoshop as one file? Because individually the tiles look fine in unity but the image that's made out of the tiles (it's one image) is blurred. Also, my character sprites are fine too once i configured them

avatar image johnd_unity3d Detinator10 · Jan 11, 2017 at 10:29 AM 0
Share

O$$anonymous$$, well I've exhausted things I can think of. Regarding whether it's related to using a sprite atlas, I don't know, but this is something you can easily test yourself by extracting it in Photoshop or whatever to a single sprite and reimporting. If I were you I'd try to investigate the problem by simplifying everything - just start with a simple small image imported as a sprite on a scene on its own, with no scripts or plugins. Check all the things we've discussed and see if it looks blurred. Assu$$anonymous$$g it doesn't, start changing things to be more like your problem scene, building up until something makes it go blurry.

Show more comments

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

66 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Should I change the Pixel To Unit ratio in a 2D Project? 0 Answers

How to achieve better compression for Pixel art. 0 Answers

Pixel Perfect Camera auto *zoom/scales* on different resolution 1 Answer

Unity2D - Platform Game] How Can I automatically create a pixel perfect collider out of the .png alpha channel? 0 Answers

Pixel Perfect Camera - Change PPU by script depending on screen width/height 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges