Hello Guest

Author Topic: Sprite Scale  (Read 7532 times)

bigtunacan

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 15
    • View Profile
Sprite Scale
« on: June 17, 2012, 05:27:26 am »
I tried selecting all of my sprites in a sprite collection, setting the scale, then committing the change, but it only changes scale for the last sprite, not all that have been selected.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Sprite Scale
« Reply #1 on: June 17, 2012, 11:30:14 am »
Did you click apply after setting scale? The apply button should be visible as soon as you change the scale value.

helioxfilm

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: Sprite Scale
« Reply #2 on: November 21, 2013, 08:21:02 pm »
I hope I post in the right thread:

I have several sprites of the same animal added to an atlas. Now, I see I am wasting almost 50% of the atlas, so I would like to reduce the sizes of all the sprites of that animal inside the atlas in order to shrink its size. However, even if I set to 0.8, or 0.9 the salce parameters and hit apply, nothing happens, I still get the same waste value, and the atlas size did not shrink (sure, I hit the commit button as well  :)).

is that scale parameter for this reason there or to change the scale of the sprites when rendered on screen?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Sprite Scale
« Reply #3 on: November 22, 2013, 11:52:28 am »
sprite scale only changes the rendered sizes on screen, it doesn't rescale your image.

helioxfilm

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: Sprite Scale
« Reply #4 on: November 22, 2013, 03:28:00 pm »
I see. So if I want to scale the image, I have to reimport all the sprites...

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Sprite Scale
« Reply #5 on: November 22, 2013, 03:31:13 pm »
Yes, you will have to rescale your images in photoshop, or reexport from your vector package at the correct resolution.

David Kalina

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 26
    • View Profile
Re: Sprite Scale
« Reply #6 on: February 19, 2014, 06:47:31 pm »
Wouldn't sprite scale be more useful if it actually scaled the size of the image as it gets packed into the sprite collection?

I believe that if it worked that way, it'd be insanely useful -- then our artists could by default import art at maximum size and selectively scale individual images down to optimize their sprite collections, without having to touch the source art.

I'm not sure what the point of exposing this in the sprite collection editor is otherwise?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Sprite Scale
« Reply #7 on: February 19, 2014, 07:08:01 pm »
We've always used sprite scale is a form of compression, eg. to scale up a background image so its the correct "native size", i.e. it might want to be upscaled 2x and not be pixel perfect compared to everything else. Eg. If you've built your game, then decide texture A doesn't need the detail, scale it down in photoshop or whatever then scale it back up in the sprite collection editor, so as far as the games concerned its no different.

The problem with performing texture scales in Unity is that it'll be a lot slower than it will need to be (its in c# after all), and it'll just use bilinear scaling, which 99% of the time doesn't look good enough. No one ever uses that in Photoshop, unless you explicitly need it to be bilinear. Of course other scaling methods are possible, but will need to be coded / tested / etc, which is significant amounts of work for a small feature like this.