Difference between revisions of "Choosing dimensions"

From FreeSpace Wiki
Jump to: navigation, search
(No difference)

Revision as of 21:06, 7 June 2005

When making textures for models always use dimensions that are equal to ‘2 to the power of a number’, this means these numbers:

16, 32, 64, 128, 256, 512, 1024, 2048, 4096.. etc etc.

16 is the smallest texture FS2 will deal with, using anything less is a waste.

256 is a special value because without changing a registry setting D3DuseLargeTextures (or using the launcher ‘Use Large textures’) this is the largest texture that can be used by the engine without it having to cut into sections. This is also the maximum texture size for voodoo 2 & 3 cards.

1024 This is the maximum texture size for many older cards that aren’t voodoo, a TNT2 for example would have this maximum.

4096 This is the maximum for a Geforce 4 card, however make sure you consider your texture sizes carefully a 4096x4096 (16 bit) texture takes up about 34 Meg, that’s more memory for one texture than the TNT2 has in its entire video memory.

So what happens if you don’t use these magic numbers? The engine will use the next one up. So if your texture is 257x257 then the texture will be 512x512 and the image will either be stretched across this larger area or the extra space will be wasted.

Remember that texturing is one of the most time consuming things your card has to deal with, with bad texture sizes its easy to waste processor time without making the result look any better.

The same goes for most other textures (and ani’s) in FS2 and all other games, the exception to this is interface art. e.g. the mall hall background, this texture wont look good if it is stretched in the y res to 480 or 768 because the smoothing code is different.