Hey, Was just wondering how are texture atlases generally constructed, I've been playing with trims etc and i now understand those but I'm doing some distant buildings in the background that really don't need a trim as i feel it's overkill and I'm trying to keep the materials down. The thing i needed clearing up is the creation of them are they.
1. unique uvs all packed into one and textured
2. Images put together in a texture in say photoshop and then the geo is unwrapped later the same as a trim?
3. Geo baked into a plane and then textured
Or are all of these correct but depend on the situation I've just been trying to wrap my head around how these are created lol, i feel like I'm overthinking this as i end up doing but some clarification on direction would be great. I've put some examples of what I'm on about in the post.
Cheers
Replies
When making an atlas you want to consider how they would scale down for mip-maps (unless you're doing retro 3D of some sort that doesn't use them). To do this the individual textures should each be power of 2 resolution (128x128, 256x512, etc.), and you'll need to determine which method you want to use for padding;
A. Add padding directly into each texture you're packing (so add a few pixels to the border when authoring each individual texture)
B. Scale the texture inward by a few pixels and use the outer blank area for padding (this method should obviously be avoided if you're authoring textures per-pixel since the scaling will blur them).
C. Create / Edit the mip-maps by hand instead of relying on the game engines automatic solution.
D. Leave space in the atlas for padding to be placed around each texture. Color bleeding will occur with this method if your mip map resolution gets too low.
Also, the second example picture you posted was done by someone who was definitely more interested in saving triangles then texture memory, as that is one incredibly wasteful atlas.
As for if you should use an atlas, that's up to you. If you think having them all on one sheet will make them easier to work with, and/or it'll help performance (something you'd have to find out through testing when making a game), then go for it.