Hello Guest

Author Topic: Platform Specific Sprite Collections Question.  (Read 6808 times)

Bigcheese

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 19
    • View Profile
Platform Specific Sprite Collections Question.
« on: February 06, 2014, 12:23:37 pm »
I have an issue with using this, I tried adding a platform, anf making it the default one, however I'm getting an issue where if I'm using the 2X one, Instead of getting a better defined sprite, I get a sprite that represents 4 sprites from the atlas. So for example with my Character, I don't get one character, I get 4 different frames of the character in the same sprite. and in the case of 4X I get a 16 in the same sprite.

What Could the problem be?

Bigcheese

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: Platform Specific Sprite Collections Question.
« Reply #1 on: February 06, 2014, 02:07:33 pm »
It seems to be an issue with imported spritesheets only, so the normal single sprites are fine, but the spritesheets get cut into more pieces.

Also it seems that with these single sprite changing between different platform options, changes the size of the billboard itself, is there a way to keep a uniformed scale across all of them whilst changing the quality of the graphics only?
« Last Edit: February 06, 2014, 02:24:30 pm by Bigcheese »

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Platform Specific Sprite Collections Question.
« Reply #2 on: February 06, 2014, 09:57:40 pm »
What version of tk2d are you on?

Bigcheese

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: Platform Specific Sprite Collections Question.
« Reply #3 on: February 09, 2014, 10:12:07 am »
v2.3.3 I guess that's the latest.

Also one more bug I noticed! If I have multiple materials and then I do multiple platforms, the materials are lost and I get errors in the console saying that some sprites can't be found. "Unable to find platform specific texture XXXX for platform XXX"

Thanks

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Platform Specific Sprite Collections Question.
« Reply #4 on: February 10, 2014, 02:40:53 pm »
I've just tested this in 2.3.3 and I can't reproduce it.
Is your 2x sprite sheet exactly 2x the size, and is something limiting it in Unity? Select the source sprite sheet textures in Unity and look at it in the preview window - are the dimensions as you expect? 2x should be exactly 2x the size of 1x.

Bigcheese

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: Platform Specific Sprite Collections Question.
« Reply #5 on: February 10, 2014, 03:14:54 pm »
Alright I think it's something about that, so my atlas was 1024X2048 but half empty, so the 2X one was 1024X2048 but more filled. There are no restrictions in the unity texture editor, the max size is set to 4k

Then I tried to remove some stuff, so the size of the atlas was 1024X1024, and the 2X one was 1024X2048. and now for imported spritesheet it's showing 2 characters and 2 black blocks in the same billboard, as opposed to 4 characters with the previous one.
I also tried to force square, which resulted in the 2X size being 2048X2048 but with the same results.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Platform Specific Sprite Collections Question.
« Reply #6 on: February 10, 2014, 03:21:08 pm »
Force square isn't going to work - you need to make sure your textures are exactly 2x the size, and contain exactly the same information with twice the detail. i.e. if you downscale the 2x texture in photoshop by 50% it should almost perfectly match the 1x texture.

Bigcheese

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: Platform Specific Sprite Collections Question.
« Reply #7 on: February 10, 2014, 03:38:02 pm »
Understood, however the plugin is not baking the atlas in twice the size, even though there are no restrictions on Unity's side.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Platform Specific Sprite Collections Question.
« Reply #8 on: February 10, 2014, 04:01:49 pm »
Can you create a repro project and email support, please? Its passed all its internal tests, perhaps theres something we're not considering.

Bigcheese

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: Platform Specific Sprite Collections Question.
« Reply #9 on: February 11, 2014, 10:49:40 am »
Alright, got it working properly now, it was a problem of not finding the scaled texture in the path.
However there's still a problem where if I had different materials in the atlas and I add more platform support, then tk2d will ignore the older materials and reset both atlases to the default material.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Platform Specific Sprite Collections Question.
« Reply #10 on: February 11, 2014, 10:54:40 am »
That is a bit more tricky, as it effectively re-creates the materials. Its probably best to simply change the materials once again after platforms are added, it won't mess with it subsequently.