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
5
Question by POLYGAMe · Jun 14, 2012 at 12:35 PM · pngtexture compression

Textures much bigger in Unity than original file size?!?!?!

Hi guys and gals,

I have an odd issue (maybe not odd... just noobish).

I have a few 2048x2048 png files that I am mapping to planes for my game to give a "Mode7" look. It's all working really well, but the final build size is massive, as each image is taking up 8mb of space within Unity, even though the original file size of the pngs is only a few hundred kb. What would cause this?

I need to have the files uncompressed, as compression, no matter what setting I use just looks horrible, as I am going for a retro 16 bit look... I really can not afford to have compression artifacts all over the place.

Is there a reason these png files need to be so large in Unity?

Any help greatly appreciated.

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

2 Replies

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

Answer by whydoidoit · Jun 14, 2012 at 12:44 PM

Well the simple answer is "that's how big they are!"

PNG is a file format, but when loaded into memory it takes that much space. The compression available on textures is all about keeping the size of a pixel down by losing information (I expect you know this). So it wouldn't matter if it was a Jpg (apart from the lack of alpha channel) it would still take a large amount of space.

So you don't have a PNG in Unity, you have a PNG imported into a texture.

Comment
Add comment · Show 4 · 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 POLYGAMe · Jun 14, 2012 at 12:50 PM 0
Share

Ah, so it's the textures that take up that space? Not just the png file? Bummer... I was hoping I could get the size down... shame Unity doesn't support 8 bit textures. LOL.

I think for the iOS version of the game I can afford to drop down to 1024x1024 textures... I'll have to make do with the large file size for $$anonymous$$ac and PC.

Thanks for your prompt response!

avatar image whydoidoit · Jun 14, 2012 at 12:53 PM 0
Share

If you are going for a 16bit look could you construct from tiles? That would give you your own way of doing compression...

avatar image whydoidoit · Jun 14, 2012 at 12:54 PM 0
Share

Also you could try actually loading them at runtime from the file... It would take that much memory - but your game would be smaller. And it would take time to load.

avatar image POLYGAMe · Jun 14, 2012 at 08:35 PM 0
Share

I thought about using tiles, but it's not really feasible for this project... while the style is 16-bit, it's really only a style, I'm doing stuff that the 16 bit consoles would never have been able to pull off... tiles would work for some of the textures, like the grass segments, but it's a bit too intricate to do completely with tiles.

Also, even if I used tiles, wouldn't the end product still be the same? I'd still need to fill a 2048x2048 texture with tile images... so I'd still have an 8mb texture. I could compress the tiles, which may give better results than compressing an entire 2048 png, but I don't think it would be worth the hassle.

I'll just stick with the large file size on PC/$$anonymous$$ac (the whole game shrinks $$anonymous$$ASSIVELY when zipped, anyway) and change to lower res textures for mobile devices. Cheers :)

avatar image
2

Answer by flamy · Jun 14, 2012 at 01:31 PM

@whydoidiot's answer is quite true. along with tht the texture settings choosen for the texture matters, true color image will be of more size and the compressed ones would be of less size.

a 1024x1024 true color will be 4 mb~ where with compression it may go down upto 1.2mb (or even lesser with the compression options i havent used yet). The reason for the increase in size i suppose is, unity doesnt handle it as png or jpg, it handles it as byte array. Im not sure with that though.

better advise to reduce size is to sacrifice quality for the models that wouldnt be noticed much.

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 POLYGAMe · Jun 14, 2012 at 08:36 PM 0
Share

Hehe, the problem is, the models I am using are custom planes (2 triangles)... can't get much less detailed than that! LOL.

avatar image flamy · Jun 15, 2012 at 05:54 AM 0
Share

no i meant the quality of the textures. not all needs to be true colored rite??

avatar image POLYGAMe · Jun 26, 2012 at 06:03 AM 0
Share

Oh, okay. I'm not using true colour, I'm using 16-bit. Because the gfx are so basic, any compression at all makes it look horrible.

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

PNG or TGA32 for semitransparent material 2 Answers

A PNG appears differently from its PSD 3 Answers

[Solved] Shader: cutout shader over a texture 1 Answer

Can you create a 2d picture book app using Unity? 1 Answer

How to make this type of tutorials at the starting of game 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