Hello Guest

Author Topic: mipmaps clarification  (Read 4109 times)

pedronveloso

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 13
    • View Profile
mipmaps clarification
« on: October 23, 2013, 03:07:58 pm »
Hi,

I'm doing a top-down game and all the scenario is mainly contained within atlases. The game allows for zooming in and out, so I'm interested in using mipmaps to keep it from loading a huge amount of memory when zoomed out (which will make a really big area visible).

There is a mipmap option in both Sprite Collections, and on the Textures themselves. What are the differences? Should I use both, or just one of the options, and why?

Also on the Sprite Collections there is an option named "rescale", what does the value here actually do? (it defaults to 1..)

PS: the last information should be added to documentation here IMO: http://www.unikronsoftware.com/2dtoolkit/docs/2.2/reference/sprite_collection.html

Thanks in advance.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: mipmaps clarification
« Reply #1 on: October 23, 2013, 08:23:30 pm »
The mipmap option on the sprite collection is applied to the texture. A sprite collection can have more than one atlas texture, thats why the setting is on the sprite collection. Just set it on the sprite collection, it gets propagated to the atlas textures.

The rescale option is an experimental feature to rescale the textures by 0.5 or 0.25x, its not meant to be enabled in the GUI under normal use. I'll add a note to the docs, thanks.

pedronveloso

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: mipmaps clarification
« Reply #2 on: October 24, 2013, 02:19:26 pm »
Thank you for the reply :).

I can't use multiple atlas because I'm dicing the images. Got it, I'll just use the "mip maps" option in the sprite collection. I'm assuming mipmap works just as well with dicing, yes? (If I wanted to, how can I know how many images are generated by the mipmapping, and can I have finer control when Unity chooses one level over another?)

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: mipmaps clarification
« Reply #3 on: October 24, 2013, 05:13:23 pm »
Mipmaps are implemented in the graphics hardware - you don't get control over selection, unless you bias and thats probably a bad thing to be doing. Mipmaps work with dicing, but as it goes down the mip chain, the likelihood of things breaking increases - when it gets to the point where the images start blurring into each other, you're going to see some horrible seams.