If you're not sure what I'm talking about -
http://en.wikipedia.org/wiki/Texture_atlas
Was wondering if using this method is the best method for using textures in next gen games?
I was reading some stuff on the Unity forums today and they recommend you combine all your small textures into one big texture atlas or supertexture (as some people like to call it) instead of having them separate.
Currently I'm working in Unity for mobile devices at my studio, but before stumbling upon this information I was so used to importing and exporting small textures or whatever size instead of having most of them into one big texture page.
So just wondering if this same method is recommended for use in Unreal and for next-gen console rendering? I've never really had to do this method before in production, which is fine, but I did some more reading and found out that this mainly applies to engines that take the tile approach.
For example....I make a barrel, crate rock and backpack mesh...each uses a 512x512 texture. Typically I would use the textures separately instead of combining them into one big 1024 sheet. So in one scenario you have...
4 meshes + 4 512's
or
4 meshes + 1 1024
Does this all depend on the engine in the end?
Thoughts, comments, suggestions? O_O
Replies
You use that technique to save texture calls.
If they are not seen together at all it´s not that good to combine them, because you need the whole texture space for only a small part of it.
For example, if your entire level used 1 shader you can gather all the materials in the level and pack each materials texture(s) into an atlas(or multiple atlases if there are more than 1 texture on the materials). Then you can combine all the meshes together and modify their uv coords to point to the materials new atlased uv space. For per materials settings like specular brightness and color tint you would have to also make atlases for these because the final combined mesh would use a single material so it can be 1 draw call.
Anyone know what batching does exactly in an engine?
Texture atlasing is to get rid of the pause where the engine has to stop to change textures/shaders when rendering polygons. It's not always the texture fetch that causes this as it may just be that the engine always pauses between polygons with a different shader/texture on them.
It's highly engine specific as different engines will pause at different times depending on what kind of scene graph they have. Some engines may have other limitations to do with physics and so on that may be more important.