Graphic Files

From FreeSpace Wiki
(Redirected from Dds)
Jump to: navigation, search

Retail FreeSpace 2 only supports the PCX format for non-animated graphics. However, FreeSpace 2 Open is able to use several different graphic file formats. These include the .PCX file format which was originally supported by the retail FreeSpace 2. In addition to this the game is able to make use of several other graphic file formats which are .JPG, .TGA and more recently .DDS and .PNG file formats. Of these the .DDS file format is the most often used with FreeSpace 2 Open modifications.

For animated effects and textures see Multimedia Files.

DDS

DDS is a compressed texture format that is supported by FreeSpace SCP. Any modeler should use DDS for their textures as much as possible, as it is 1/2 the size of a PCX and 1/8 the size of a TGA image.

Some low-end video cards are unable to display DDS textures under the FreeSpace engine; if you have this problem, use a batch-conversion program such as IrfanView to convert the offending DDS files to a supported format (such as .PNG) and use the -mipmap Launcher/Commandline flag.

Background

The DDS File format was created by Microsoft for its DirectX graphics API, however, it has become a general format for textures and is supported (via S3TC Extension) by OpenGL (the graphics API the FS2 SCP uses). The official description of DDS is "The Microsoft DirectDraw Surface (DDS) file format is used to store textures and cubic environment maps, both with and without mipmap levels. This format can store uncompressed and compressed pixel formats, and is the preferred file format for storing DXTn compressed data."

Tools

Several tools exist for working with this format, besides any tools created by the FS2 SCP team. These tools are detailed at the nVidia website and should be useful.

Usage of DDS

The primary note to any texturer using the DDS file format is that even if DDS enables you to have twice the texture size, doesn't mean you should use all the available memory. For diffuse and glow, DXT1 iterative (or whatever the best quality setting is) is the preferred option. For shine and normals, use DXT5.


PNG

Portable Network Graphics support is a rather recent addition to the SCP code base (Feb 05, 2010), where it has been making its rounds as an intermediary format for testing created UVMaps, and being used in effects, anims (as EFFs) and some background pieces, as well as most heavily used in Interface elements.

The format is great for testing created, un-finalized ship maps, because it is a loss-less format and doesn't suffer DXT compression or re-compression artifacts like DDS does. And the results can often be a smaller file than an uncompressed DDS if you're needing to share the work. However, since mip-mapping doesn't occur with PNG, final distribution should be done in DDS (which PNG will convert to nicely, including with any alpha channel information).

As interface artwork goes, PNG is excellent in that it provides far more color depth than PCX and affords semi- or gradient transparency to elements, and has a slightly lower over head than the same files in TGA.

PNG is also a format that can be saved to by any number of image file editors/converters, generally without the need for any special plugins or modules, and can also be natively loaded in many 3D modeling programs or save to from the modeling program.

JPG

JPG (or JPEG) files are compressed images that can be opened in virtually all popular graphic utilities, including Microsoft Paint. They use the same amount of graphics memory as 24 bit TGA images do, but they often have lots of compression artefacts. The compression in JPG files can be very noticeable, which is why they are almost never used by FreeSpace modders. Only potential benefit from using JPG images would be to save the actual image file size, but as this happens at considerable cost in image quality and without any degree lower graphics memory usage as TGA images, it is often avoided.


PCX

PCX were the first of the graphic files introduced to FreeSpace. Generally speaking, these files are among the largest graphic files used in FreeSpace. However, a lot of modders still use PCXs since it is the most compatible graphic file known inside FreeSpace. Earlier the TGA and JPG format files caused some graphical issues in game as it needed the command line option -jpgtga (see Command-Line_Reference) to work. However, this command line option is no longer in use and game loads TGA and JPG format files automatically.

Tools

PCX is a image format that is less well supported in the standard imaging editing software such as Microsoft Paint. However, advanced image editing programs such as Photoshop or the GIMP can easily save PCX files.


TGA

The FreeSpace 2 retail source code contained unimplemented support for TGA textures. FreeSpace 2 Open, however, fully supports these textures. The old Lightspeed's Nebula Pack is a common background add-on that uses large TGAs, so you may want to convert the Lightspeed files to a more efficient format before using them.