Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
12 Jun 22 - 14 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 Sander Van Looveren · Oct 08, 2015 at 03:35 PM · mobileoptimizationbeginnertexturesspritesheet

What is a good file size for spritesheets (mobile)?

I'm just starting with unity and creating my first mobile game. It will be a 2D game for Android an Windows phone 8.1 / universal 8.1.

I have imported some spritesheets with my main characters but I'm not sure at what size I should import them. At First I made them pretty large: 4096x4096, individual sprites are about 250x450 px. Then I set the MaxSize on the sprite in unity to 1024x1024. But then I started to worry about the size of my .apk (for android), so I resized the actual spritesheet down to 1024x1024. This effectively reduced the .apk size as I thought it would, but now my sprites don't really scale to bigger screens. Is there a way to keep my .apk small and don't lose the quality of the sprites?

Also, when I replaced the spritesheets in unity, I lost all my animation clips, so I had to recreate them. Is there a way to reuse the existing animation clips with the resized spritesheet?

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 Bieere · Oct 11, 2015 at 12:14 PM 0
Share

You can also try setting your sprite type from tight to full rest, and that will help a bit if you have lots of sprites on the screen and you don't need super accurate sprite collisions!

1 Reply

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by Bieere · Oct 08, 2015 at 05:26 PM

Ok so a couple things, look into device support for texture sizes, as some older devices wont support 4096 texture sizes, while they are certainly the nicest quality. I would look into the asset bundles for your sprites, and that way you can set images for HD and SD. 2048 is a good max size if you wanted a default, though depending on the platform this could be pretty heavy, so look into the compression types (ETC, PVRTC for Android and IOS respectively). Make sure you keep with the Power of Two sizes, as they will compress properly on Mobile.

Try and avoid using the Limit size though, as its not very good, Create the images yourself at the sizes you want, within an external program so you can ensure that the quality presented is what you're actually looking for/okay with.

Now if you're ever planning on actually replacing sprite sheets, Make sure you have your Meta files not hidden within the project, and replace it within the directory directly and not within the project window, as generally it will overwrite your current meta file.

Let me know if you have other questions, or concerns though. Hope that helps!

Comment
Add comment · Show 3 · 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 Sander Van Looveren · Oct 09, 2015 at 10:00 AM 0
Share

Thanks for the detailed answer! However this raised some other questions..

I didn't have the ETC compression enabled for android, could that be the reason why my game runs a lot smoother on Windows phone compared to android? I followed your instructions by applying the compression for android, as you can see in the screenshot. I haven't had the time to test it on an android device, so I'm not sure if this fixes the smoothness issue on android. ETC compressing Android

For IOS devices I don't know how to enable PVRTC compression, as there is no checkbox to use that copression in the IOS tab. $$anonymous$$aybe I'm just looking in the wrong location?

About the replacement of spritesheets, your suggested method works great if I keep the original size of the spritesheet, but when the actual dimentions of the spritesheet change, the slices are all wrong as they are done based on actual pixels and not on the % of width and height of the spritesheet. Is there a solution to this?

Thanks for your help!

androidetc.png (10.2 kB)
avatar image Bieere · Oct 09, 2015 at 11:59 AM 0
Share

So the image types need to be set to advanced, and once you've done that when selecting format a big list will appear for options, that's where you'll find the PVRTC check out this page for more info.

Now as for your slicing issue, there is a way to fix that depending on how you're changing it. If you're familiar with photoshop or other photo editing programs, there's something called canvas size, so you'll have to use that when creating your images, and when you do that, so that unity will now move them all around you need to change the height accordingly but from bottom up, and the width so that it increases left to right. If you do that you'll get more image space but your slices should remain correct, as long as they haven't actually been moved that is.

If that doesn't make sense let me know and I'll add some images as more detail.

avatar image Sander Van Looveren Bieere · Oct 11, 2015 at 09:17 AM 0
Share

Allright thanks now it works! I don't really see any performance increase but that might not have been the problem so..

Yeah that works if the individual sprites remain the same size. But in my case they are resized aswell, that's why the sprites are cut off at like 2/3 of the character. I guess I'll just have to recreate the animation clips if I resize my spritesheet & sprites itself.

Thanks for you help!

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

lighting heavy mobile game optimization 0 Answers

Level creation, draw calls, and texturing 3 Answers

if i make a realistic scene and bake the realistic lightning, will it have a big performance impact on android? 0 Answers

Star Field - Lots Of Poly or Transparent Texture 1 Answer

Alternative to SendMessage()? / Mobile Optimization 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