Hello Guest

Author Topic: MipMap setting lost on generated texture  (Read 3660 times)

virgilw

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 4
    • View Profile
MipMap setting lost on generated texture
« on: December 06, 2014, 03:18:02 pm »
I'm using the linked sprite collection functionality (again, awesome).  For the output atlas that gets generated I have set it to be a normal map, grayscale, and enabled mipmaps.  I've attached an image that shows the settings.

I then go and rebuild the atlases by clicking "commit" in the sprite collection editor.  This does everything great, but the mip map setting on the atlas for the linked sprite collection gets reset to off.  I've attached an image that shows what the settings look like immediately after clicking "commit".

I have not tested this with other textures with other settings.  I suspect it doesn't have anything to do with being a normal map, or a linked atlas... but I don't know that.  I also have only tested with Unity 4.6.0.  So this could be a problem with Unity 4.6.  A quick look at your source seems to show mipmap settings, but before I look deeper I thought I mention this to see if it is a known issue.
--edit--
Not sure you you allow image attachments.  They are attached to this post in the editor, but I can't see them when viewing the post.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: MipMap setting lost on generated texture
« Reply #1 on: December 07, 2014, 11:53:33 am »
Hmm... can you post a simple repro case for this please? I've been looking through the code and it seems to be doing what I expect, but I've lost my test cases for this during some version control move :(

virgilw

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: MipMap setting lost on generated texture
« Reply #2 on: December 07, 2014, 02:26:30 pm »
Actually, it looks like the mip map settings are being pulled from the "Texture Settings" part of the collection editor.  It uses whatever you put there (whether you check the box for mipmap or not) for the output texture atlas and for the linked texture atlases.  So that may be working as you intended...

I was initially confused because I changed the texture type of my linked texture atlas to "normal map".  And then I got it in my head that tk2d was preserving whatever changes I had made to that texture whenever it created a new one.  I thought it might read all of the settings on the output texture if it existed, then put them back.  That may be true for the texture type, but not for mipmap, aniso, etc.

Anyway, I'm fine with having the output texture and all linked textures have the same settings, so this is no longer a work flow issue for me.