|Version 1 (modified by martin, 10 years ago)|
Textures are images applied to polygons to make more realistic appearance without increased polygon count. The images can be created with almost any image editing or painting software. Examples:
Many types of image are supported by the osgDB::Image library; my preferred formats are:
- jpeg - high quality images with good compression
- tga - widely available in image editors
- png - lower colour resolution, but supports Transparent Images.
I rarely use BMP as file sizes are large (bigger than NX by NY pixels times 3 bytes for an RGB image).
Most (?all?) OpenGL implementations convert the image loaded to a power of 2 size (eg a 324 by 133 pixel image will often be rounded to 256 by 128 pixels). Therefore it is useful to produce your textures in power of 2 sizes so that all users will see the same appearance, and no re-interpolation is carried out by the end program.
Often a texture is repeated to obtain higher texel count when viewed closely - a method of generating repeating textures that do not show sharp discontinuities is described in Making Repeating Textures