Hello Guest

Author Topic: Tile map problems  (Read 18613 times)

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Tile map problems
« Reply #15 on: July 17, 2012, 12:25:04 pm »
I'll dig around a bit see if I can figure out what went wrong.

fsadeq

  • 2D Toolkit
  • Sr. Member
  • *
  • Posts: 353
    • View Profile
Re: Tile map problems
« Reply #16 on: July 25, 2012, 02:23:25 pm »
I know you're swarmed with questions, but did you ever figure out why the tilemap palette would be rendered differently from the actual placed tile? Thanks.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Tile map problems
« Reply #17 on: July 25, 2012, 06:18:09 pm »
Differently how? A screenshot would really help.

fsadeq

  • 2D Toolkit
  • Sr. Member
  • *
  • Posts: 353
    • View Profile
Re: Tile map problems
« Reply #18 on: July 25, 2012, 07:47:27 pm »
Sorry, was referring to my original question earlier in the thread: http://unikronsoftware.com/2dtoolkit/forum/index.php/topic,453.msg2146.html#msg2146
Regarding the transparent parts of a tile being rendered solid white in the palette.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Tile map problems
« Reply #19 on: July 25, 2012, 11:19:54 pm »
It should render correctly - I've not seen any case so far where it doesn't. Would it be possible to get me a repro case for this? You can delete the contents of the textures if you want, I don't need them. Just anything which can show me the issue.

fsadeq

  • 2D Toolkit
  • Sr. Member
  • *
  • Posts: 353
    • View Profile
Re: Tile map problems
« Reply #20 on: July 28, 2012, 02:35:14 am »
Ok, I've figured out the problem. This only happens when using a sprite sheet in a collection. Once you have sliced the texture and are in edit mode, if you have two different materials (one solid, one transparent) being used in the sprite collection, then once in the Tilemap Editor, it will render the tiles in the palette as if they all have a solid material. This only affects the palette, and once you place the tile, it renders correctly. The palette renders correctly if you only have one transparent material being used.

So you can check this out for yourself:

-Make a new sprite collection
-Add a sprite sheet that has some transparent tiles
-Slice, apply the config settings
-In the settings, use the default material which uses a transparent shader
-Use the collection in a tilemap editor and notice the palette should be rendering the tiles transparencies correctly

-Go back to the sprite collection and add a new material, making it solid
-Change one of the tiles to use the solid material
-Commit changes, go back to the tilemap editor, now all the tiles in the palette are rendered as solid

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Tile map problems
« Reply #21 on: July 28, 2012, 09:32:53 pm »
Thanks for the thorough repro steps.

Once you said you had different materials, I instantly knew what it was - I should've caught it sooner actually. The tile preview uses the first material in the list as initially the tilemap only supported one material initially, and I forgot to update this when adding support for multiple materials. I'll sort this out.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Tile map problems
« Reply #22 on: July 28, 2012, 11:50:34 pm »
That's fixed now. Drop me an email and I'll give you a patch.