What does everyone here usually do for texture atlas creation?
I know you can script Unity to PackTextures and to combine the UV maps and such. I’ve done that, but that option requires setting the “IsReadable” setting for the texture. Which would double the amount of texture memory needed for that texture.
Plus the action of combining all the textures into an atlas bumps up the VRAM a lot.
So my concern is all of this happening on something targeted at like an iphone 3g. Is there a more efficient way of creating texture atlases and combining UV maps without double memory requirements?
Creating atlases of a bunch of texture will obviously raise the texture size so the memory, use for it , but you will get back lower draw call which in my opinion for performance at run time is quite important.
also it is best to plan that before and make it by hand while you are doing your UV ( if you use 3D model ) cause you have more control over what your doing than automatic process ( specially for UV on 3D model )
for sprite things SM2 does a pretty good job tho about that.
if you finish with 1 or 2 1024 sheet for your whole scene and using the pvrtc compression you should be fine with Vram…
at this point i think you need to make a compromise
you can also reduce the overall size of your atlases if you get enough resolution to show …
Yeah I know using an atlas in general would increase VRAM size, the issue is marking Textures as “Is Readable” in Unity, doubles the memory amount. Because Unity has to duplicate the texture. On a PC or a iPhone 3gs wouldn’t make a difference but on something like a 3g, double memory being taken up is big.
But I guess if I made the atlas ahead of time this wouldnt be an issue. But making an atlas by hand would add a lot more overhead when building environments.
Yes you can… when you create your 3D environnement…
This the 3D artist to deal with the constraint…
On PSP we combine parts with the same colors using low bits texture and working with several small textures…
But on iPhone we need to add all or the maximum we can a single texture, double, or less as possible to reduce batches and texture memory in the same way…
Here is an example I done on a project I am building with Guyomu
Shuriken - 3D work - sama.van
(full bottom of the page of Uvs + texture exemple with 1024x1024 diffuse and then lightmap)
And there is also that one I built 3D for a client :
The Package - 3D work -= sama.van
(I didn’t released texture preview but I am using one diffuse 1024x1024 on each background and sometime a lightmap)
I accept those constraints are not easy to respect, but they are the source of a good pre-production work.
(ok… sometimes this is freestyle) :lol:
Or… Another way…
On character, or large props with no instance…
You can create a new uvs set… baking e the texture of the old model to the new version.
There are pretty good tools for it in Maya.
Be careful with auto uvs stuff… there are not always good for this kind of optimization…
3 important points are :
mip-mapping : you tools has to be able to add some 20 pixel on the border of your uvs…
Pixel orientation : if you work for iphone, it often happened an artist will create horizontal or vertical pixel line in his texture to prevent strange effect on the right line… But with an automatic mapping… if he change the orientation of the uvs, this line of pixel could change and produce a dirty render… I dunno if I explain well the problem…
If automatic mapping deform your Uvs… then texture will be deformed too
Anyway, had work is better for the last optimization step before rendering the new texture!
Thanks for the information! I’m just going to disable auto rotation in the script. And the script allows for the definition of pixel margins. So I should hopefully be okay…haha.