Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 Nevelson · Sep 13, 2020 at 03:34 AM · 2dspriteszoompixel artorthographic camera

Pixel Perfect Camera Component 128 ppu pixel is too zoomed in for builds

alt textI'm making a 2D shooter like Enter the Gungeon, except I'm going full 2D. My camera is set to orthographic, and I have a lot of game sprites that are already drawn at 128 ppu. The trouble that I am facing is that I really like the level of detail that 128 ppu offers, and I want to make the camera pixel-perfect to make the game look crisp, but when I build the game the camera's orthographic size is SUPER zoomed in.

I am aware that there is an equation to calculate the orthographic size that the camera must adhere too > Orthographic Size = Desired Height / (2 * pixels per unit) which results in this behavior, but I would really like to have a way to have the field of view pulled back so the player can see more of his environment and still preserve the pixel-perfect camera or at least just keep it looking "nice". Are there any ways to do this or cleanly scale down all of my art to 64? I've had a lot of art already drawn, and I really don't want to redo it for a lower ppu.

Some details:

  • All of my sprites are 128 ppu

  • I attached the pixel-perfect camera component to the camera and set the ppu to 128.

  • I have tried multiple reference resolutions without success and eventually just left it at 1920x1080 for the time being because I don't know what the ideal resolution should be. I want to keep a 16:9 ratio.

  • I have tried switching to perspective and zooming out, but that makes it pixel imperfect and causes the sprites to look grainy

  • I have tried to set the game scale at runtime (which funnily enough makes it look GREAT in the editor mode, preserving pixel quality but expanding the player's field of view), but I think that API is inaccessible

  • I have tried https://github.com/glowurms/Pixel-Perfect-Camera-With-Zoom-Controls using this, but the zoom functionality only zooms down, it doesn't let you pull the camera back

  • have tried to resize my sprites in a png format to 64 ppu and set the pixel-perfect to 64 > this has given me the best results but still, there is a loss of quality

My final idea is to convert my sprites to svgs, resize them that way so they "don't" lose quality hopefully, and then convert them back to PNGs, I have no idea if this will work but it's kind of my last hope.

Anyway, any insights or ideas would be greatly appreciated. I don't know anything about pixel art or any tricks so please, anything you've got I'm all ears.

I've attached a comparison to show how zoomed in the camera is in a build (Left), versus the unity editor window which has the game scale set to lower than 1x (Right)

Comment
Add comment
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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by masta_kamzi · Sep 18, 2020 at 11:20 AM

Hi there! Can you share an example scene with at least one sprite (can be a placeholder but with the same settings) on it? It would be very helpful to this cause.

Comment
Add comment · 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

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

292 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 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 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 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 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

Is there any way for a Sprite Renderer to use mipmaps? 1 Answer

No "Pixel Snap" option in 'Sprite-Lit-Default' material causing some sprites to tear 2 Answers

2D Games with Unity? 2 Answers

Make 2D sprites glow? 4 Answers

2D top-down multiple sprite rotation 1 Answer


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