Hello Guest

Author Topic: Trimming performance overhead  (Read 3206 times)

milos

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 3
    • View Profile
Trimming performance overhead
« on: November 20, 2013, 09:23:18 am »
Hi!
I just wanted to know if there is any significant cpu or storage overhead if I trim my sprites before adding to Unity and creating Sprite Collections of them.
I have scenes with maybe 100 sprites, also running sprite animations. The majority of them are (when trimmed) only 100-300 pixels high/wide. Without trimming the transparency, all of them are 1024x768.

Development target is iPad 2+.

It takes me a little time to pre-trim them, so using the automatic trimming in 2dtk is prefferable. Unless the runtime un-trimming is performance heavy?
Thanks in advance

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Trimming performance overhead
« Reply #1 on: November 20, 2013, 10:01:30 am »
There is no cost at all for runtime untrimming, if anything it will be faster as the transparent pixels won't need to be drawn.

milos

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Trimming performance overhead
« Reply #2 on: November 20, 2013, 10:26:43 am »
OK so from now on I can just forget about trimming sprites in photoshop and instead just let them get trimmed automatically by 2dtk...
Although it increases source sprites' sizes a lot, I guess it is okay since only the trimmed sprite atlas is baked into binary
Thanks for your reply