-
Notifications
You must be signed in to change notification settings - Fork 162
Texture Guidelines
nobubblegums edited this page Feb 28, 2022
·
4 revisions
As of December 2021, almost all VP textures follow standards for compression, informed by forum threads and how the base game handles this. While it's unlikely that more textures will be added to VP, here are some guidelines to follow just in case. Nutty lays down the basics perfectly:
@Nutty on civfanatics:
- Use DXT1 when there's no alpha.
- Use DXT3 when there is limited alpha with sharp transitions (e.g., unit textures)
- Use DXT5 when there are alpha gradients or transparency with rounded edges (e.g., UI elements)
A bit more detail:
- Large textures, such as leader backgrounds and splashscreens (wonders, projects, great works, etc.): These rarely have an alpha channel, and the game & VP use DXT1 for them. No mipmaps.
- Model textures (units, improvements): DXT3 or DXT5, with mipmaps. You can follow Nutty when deciding between them, if in doubt, DXT5 is the safe option.
- Icons on map (strategic view icons, unit flags, resource icons): DXT5 with mipmaps.
- Icon atlases and static UI elements (action icons, fonticons): The game uses mostly 32-bit A8R8B8G8, but there are instances where DXT5 is used. Currently, VP uses A8R8B8G8, this may change if further testing with DXT5 reveals noticeable improvements on memory usage, as the loss in quality due to compression is not significant for small textures. **No mipmaps **in either case.
- Very important to note: DXT compression requires resolutions with multiples of 4. If your base texture isn't like that, you can add empty pixels or atlas slots. For example, a single 45x45 icon is by default problematic when compressed, but you can just add empty pixels (i.e. resize the canvas, not the icon) to make it 48x48.
Best practices:
- Instead of adding new atlases for new icons, use the empty slots in the existing ones.
- Do not have empty spaces and/or oversized atlases, they add up.
- In doubt, use DXT5.
Troubleshooting:
- If a texture works fine in DX9 but not in DX11, the most likely cause is using a resolution not dividable by 4. Do note that sometimes even this isn't enough, e.g. the game doesn't like 252x252 textures for some reason, so the safest way is using powers of 2.