Hello Guest

Author Topic: Confused by Sprite size at creation and use in Scene  (Read 8263 times)

outtoplay

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 24
    • View Profile
Confused by Sprite size at creation and use in Scene
« on: May 21, 2012, 11:02:09 pm »
Hi,
I know this is likely rudimentary but I'd appreciate some guidance for the best looking animated Sprites.

Say I create my sprite images in Photoshop, usually at a way bigger size then required, then we'd scale them down to about the right size for the scene.  But after setting up the animated sprite and popping him into the scene, he still feels a bit big... here's the question.

Which is the best workflow for razor sharp sprites?
  • Just use Unity's scale feature to scale him down (to .8 or whatever)?
  • Go back to Photoshop and rescale and save the source images there, and rebuild the sprite sheet?

It seems that scaling them in Unity softens the sprite image a bit.  But going back to PS to rescale is a pain in the butt.  I'm curious what the best option is.  Thanks!
« Last Edit: May 21, 2012, 11:10:47 pm by outtoplay »

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Confused by Sprite size at creation and use in Scene
« Reply #1 on: May 21, 2012, 11:10:51 pm »
If you don't use the tk2dCamera, make sure your target resolution and camera size in the sprite collection editor is correct, and that your game window is the right size. Creating a sprite then will make it 1:1. Make sure you set up your game view to be the right resolution using the dropdown, otherwise it may be scaled up.

If you're using tk2dCamera (and the sprite collection has been created with the Use tk2dCamera option), the size should automatically be 1:1, unless you're using an override.

outtoplay

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 24
    • View Profile
Re: Confused by Sprite size at creation and use in Scene
« Reply #2 on: May 21, 2012, 11:16:35 pm »
If you don't use the tk2dCamera, make sure your target resolution and camera size in the sprite collection editor is correct, and that your game window is the right size. Creating a sprite then will make it 1:1. Make sure you set up your game view to be the right resolution using the dropdown, otherwise it may be scaled up.

If you're using tk2dCamera (and the sprite collection has been created with the Use tk2dCamera option), the size should automatically be 1:1, unless you're using an override.

Thanks for speedy answer, Unikron... but that wasn't my question.
If I look at my character in the Camera view  and he's 1 to1 , but 'feels' a little big or small and needs to be adjusted, how best to 'resize' the sprite.  Scale in Unity?  Go back out to PS and shrink the source a bit.

Sometimes, element size needs to be tweaked a bit, I'm trying to determine where best to make this change.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Confused by Sprite size at creation and use in Scene
« Reply #3 on: May 21, 2012, 11:47:05 pm »
Oh right. Now that makes a bit more sense :) I was wondering why you were asking about photoshop there!

What you're suggesting might be good practice in photoshop, but probably not in game. When in photoshop, you work at a higher res and scale down - the downscaling algorithm can take as long as it'd like. On graphics hardware though, where everything has to run fast, what happens is you'll end up picking the next miplevel down. This is always 1/2 size and scales down like that, so anything in between is going to either be a selection (bilinear) or a blend (trilinear). I.e. its going to look much worse than you rescaling in photoshop and importing at the right size.

So anyway, to answer your question, its best to resize to the right size in photoshop and rebuild the sprite sheet.
If you need to tweak scales in Unity beyond that, use the scale property on the tk2dSprite, rather than the Unity transform - changing that will break batching whilst changing it on the sprite won't. Keep in mind the explanation above as to why this is probably not a good idea.