Texture creation

From Unvanquished
Jump to: navigation, search


A number of open-source photo editing applications follow:

  • The GIMP — Fully-featured raster graphics image editor available for Mac OS X, Windows, and Linux. With version 2.8, the user interface may be used in single-window mode, hardware-acceleration is being added, and in future releases, higher bit-depth support will be added.
  • Krita Available for Linux. Originally intended for photo-editing, Krita is now intended much more as a painting tool, although it is still suitable for both. Has support for high bit depths.

Supported formats

The engine supports the following formats:

  • PNG (Portable Network Graphics) — Provides lossless compression of images, but with the penalty of high filesize.
  • JPEG — Provides lossy compression and very small filesizes, but image quality can suffer at higher compression values.
  • TGA — Provides raw or lossless compression, but is reported not to work well on photographic images.
  • DDS (DirectDraw Surface) — A Microsoft container format for S3TC, which is supported natively by many video cards. This format does not need decompression before use, which helps with loading times. It is lossy.
  • WebP — A relatively new format created by Google that provides excellent lossy compression (generally 39% smaller filesize than an equivalent JPEG).
  • crn — compressed texture format

Note that WebP was formerly optional when compiling the source code but is now required to ensure that everyone with the game will have it installed.

While most any graphics application that is worth using can export natively to PNG, JPEG, and TGA, most applications currently cannot export directly to DDS or WebP. Converters and plug-ins are available, however:

Note that the terms lossy and lossless were used multiple times above. Lossy means that images compressed using that format will lose some of their image quality to save space. Lossless means that the compression will not sacrifice image quality, no matter how much you compress the image with that format.

Targeting the Modern Renderer

Creating textures for use with the modern renderer is slightly different than texture creation for the vanilla renderer. This is not due to changes in formats or the like, but because of how additional rendering technologies change what information is to be encoded in which textures. Each successive rendering technology removes further information from your base texture, until only albedo (diffuse) remains:

Technology Texture Base texture
Texture mapping
Normal mapping
Specular mapping
Glow mapping