Hello Guest

Author Topic: An incredibly noob question cencerning atlases  (Read 7059 times)

TekuStudios

  • 2D Toolkit
  • Full Member
  • *
  • Posts: 177
    • View Profile
    • Teku Studios
An incredibly noob question cencerning atlases
« on: July 23, 2013, 07:19:04 pm »
Hi there again.

We are trying to compress as much as we can every single image of our game to keep it running at 60fps. We have compressed the original PNG files a lot, and a little more using the Posterize option of Photoshop (with the appropriate setup), and we have updated all our collections with the new reduced images.

After doing that, we've checked out the new atlases of the collections, and all them weigh the same as before! So then every single level has exactly the same size to load? How does exactly the atlases work? Even if an atlas is the same size as before, if the images it contains are lighter, shouldn't it be lighter too? We are a little lost on this subject.

Thanks for your time.
We are an Indie videogame developer located in Teruel, Spain. A small 6-people team which is currently working on the upcoming 'Candle'.

DannyB

  • 2D Toolkit
  • Hero Member
  • *
  • Posts: 609
    • View Profile
    • Chicks Ahead
Re: An incredibly noob question cencerning atlases
« Reply #1 on: July 23, 2013, 08:14:09 pm »
The source images you feed into the atlases have no influence on the result, as Unity processes these textures.

Your way to influence the weight of the atlas is by opening the collection editor, and selecting the texture type (True Color, Compressed, 16 Bit Reduced).

But dont get your hopes up.
Compressed gets usually terrible results. You can get away with it for backgrounds.
16 bit works well if you dont have detailed gradients.
But for most things, I find myself using True Color, if you want things to look sharp.


TekuStudios

  • 2D Toolkit
  • Full Member
  • *
  • Posts: 177
    • View Profile
    • Teku Studios
Re: An incredibly noob question cencerning atlases
« Reply #2 on: July 23, 2013, 08:34:59 pm »
Yeah, we are dealing with Compressed/True Color, but we hoped to find another compression way to reduce even more the weight of each atlas.

Thanks for your answer.
We are an Indie videogame developer located in Teruel, Spain. A small 6-people team which is currently working on the upcoming 'Candle'.

DannyB

  • 2D Toolkit
  • Hero Member
  • *
  • Posts: 609
    • View Profile
    • Chicks Ahead
Re: An incredibly noob question cencerning atlases
« Reply #3 on: July 23, 2013, 08:40:29 pm »
You and me both...
To me it was a very frustrating realization that for iOS - my primary target platform - you only deal with those extremely useless PVRTC compressed textures.

The only other good trick I can tell you works great, is the sprite dicing in the collection editor.
This way you can save more space per atlas, especially when you have non rectangular images or big images.

Besides that, its a balance of weight vs. quality.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: An incredibly noob question cencerning atlases
« Reply #4 on: July 23, 2013, 10:07:54 pm »
What are you trying to save here? Disk space? VRAM?

If you cared about VRAM usage, you don't have much choice but to use PVRTC / DXT textures. In my experience DXT isn't generally as horrible as PVRTC, but still very noticable.

On the other hand if you weren't too bothered about VRAM usage, but cared more about disk space, there is one more fairly viable option - keep the atlas images as PNGs. I had a user contribution for this, but not had the chance to integrate completely + test all possibilities. This will trade of some additional main memory & load speed, for a massively reduced disk footprint.

Vote for it on the trello if you'd like it implemented sooner :)
https://trello.com/b/UfqlXqXy/2d-toolkit-roadmap

This isn't a complete solution to solve everything though - ultimately, you're making some pretty serious trade-offs, main memory + load speed. It would  be much better if Unity compressed assets as it does in the webplayer or at least had the option to do so... Try building your project for webplayer and see how small it is.

DannyB

  • 2D Toolkit
  • Hero Member
  • *
  • Posts: 609
    • View Profile
    • Chicks Ahead
Re: An incredibly noob question cencerning atlases
« Reply #5 on: July 23, 2013, 10:24:56 pm »
This would be awesome!
Assuming the memory consumption does not increase too much.
Loading time, I can sacrifice.

Voted in Trello.

TekuStudios

  • 2D Toolkit
  • Full Member
  • *
  • Posts: 177
    • View Profile
    • Teku Studios
Re: An incredibly noob question cencerning atlases
« Reply #6 on: July 24, 2013, 11:51:04 am »
I couldn't build it for web, Unity threw me some errors. However, I've built it for Windows with just one level, and the Data folder is 200Mb. Just one unfinished level!

Anyway, when we reach the final stages of development, we'll try then some solutions for this.
We are an Indie videogame developer located in Teruel, Spain. A small 6-people team which is currently working on the upcoming 'Candle'.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: An incredibly noob question cencerning atlases
« Reply #7 on: July 24, 2013, 12:01:25 pm »
Another option is using assetbundles - assetbundles can be compressed (AFAIK), and you can build one asset bundle per scene. Check out BuildStreamedSceneAssetBundle