×
Menu

General notes about textures 2 (en)


 Выдержка из оригинальной справки. (NDL Gamebryo 1.1)
 
There are four issues you must keep in mind when adding textures to a Gamebryo scene:  the texture's dimensions, its aspect ratio, the effect of filtering, and its size in VRAM. VRAM is the memory that is actually on the graphics card that can be accessed quickly by the rendering hardware. The framebuffer (the part of VRAM used to draw and display the screen) and the Z-buffer both occupy some portion of VRAM and, thus, reduce the amount of memory available for textures.
 
It is possible to have more textures than will fit in VRAM. In this case, the graphics card will fetch the texture from system memory whenever it is needed for rendering. This process is much slower than getting a texture from VRAM and should be completely avoided on PCI graphics cards. It is not necessary to completely avoid overflowing VRAM on AGP graphics cards but performance will still degrade, as more textures have to be retrieved from system memory. Other than avoiding it entirely (by fitting all textures into VRAM) there is little you can do to improve the fetching of textures from system memory.
 
Texture Cropping/Resizing
 
The first texturing issue is the hardware "Power of 2" issue. Each texture must be a rectangle divisible by the power of two. 16x128, 32x32, 512x128 etc.  The Gamebryo 3ds max Plug-in will shrink any non-power of two textures to the appropriate size using a quick but low-quality resizing technique. This technique is fine for prototyping, however it is strongly recommended that you resize all images to a power of two before exporting final assets.
 
Texture Aspect Ratios
 
Second, textures in Gamebryo do not need to be square, but extreme aspect ratios will fragment VRAM. This fragmenting occurs because odd-shaped textures are not as easy to pack together as regularly shaped ones. (Think Tetrus.) In general, you should only use aspect ratios of less than 8:1. Additionally, you should settle on a base set of texture sizes. Textures with the same dimensions are easily interchanged in VRAM—allowing for quicker VRAM management schemes. Having a lot of textures with widely varying sizes will defeat this replacement-based texture management.
 
Texture Filtering
 
The third texturing issue is that pyramidal filtering (also known as "mipmapping" or "trilinear interpolation" in Gamebryo) increases the VRAM size of a texture by 1.3 times its original VRAM size. When pyramidal filtering (as opposed to summed area or none) is enabled a texture must be stored along with its filter levels where each level is a quarter the size of the prior level. Pyramidal filtering will improve texture aliasing but you should be aware that it comes at the cost of some space in VRAM. In other words, pyramidal filtering improves visual quality in the scene and should be used in almost all cases, but you should be aware that pyramidal filtered textures increase storage requirements by a factor of 1.3.