Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: DuckOfDoom on January 09, 2013, 04:37:32 AM
-
I'm having an issue with atlas maker, I couldn't find an appropriate topic for that.
I have texture atlas to which i've been adding stuff for a while and there is still a lot of space left(texture is 2048x2048 and about 1/3 is free) but now, when i try to add something new, every sprite becomes clipped from upper-right corner and sprite coordinates in atlast prefab become inconsistent, pointing to wrong sprites on texture.
I wonder if there is a limit to texture measurements/overall size or to number of elements in atlas(currently 130+ elements)? If there is no simple answer to this, i'll dig in atlas maker script myself later and I can attach some texture samples if needed. I wonder if I'm the only one with this issue.
Also, do texture import settings matter for sprite/atlas in this case?
-
Try using the built-in texture packer instead of Unity's (it's a checkbox option).
Also I suggest eliminating long / narrow sprites. They don't pack well. Use sliced sprites wherever possible.
-
Also I suggest eliminating long / narrow sprites. They don't pack well. Use sliced sprites wherever possible.
I'm using sliced sprites but there are some gradienty bacgrounds where I have to preserve designer's complex gradient. Maybe I should look into some solution to make it in code.
Can you please explain why long/narrow sprites don't pack well? (If it won't take long, I'm just curious)
Thanks.
-
Ask Unity's texture packer. :)
It just seems to treat their dimensions as square... ie: if you have 1000x10 sprite, it will treat it as a 1000x1000 for atlas creation, meaning your atlas will be 1024x1024 instead of 1024x16.