Development:Graphics Requirements

From VsWiki
Revision as of 12:29, 21 February 2008 by pyramid (talk | contribs) (Overview of Graphics Requirements)
Jump to: navigation, search

Introduction

Image Types

For completeness purposes, the following graphics files are being referred to on this page

  • Unit textures
  • HUD images (cockpit, shield, armor, ships, gauges, ...)
  • Main menu images
  • Cargo images
  • Space backgrounds
  • Animation images
  • Planet textures

Graphic Files Requirements

Overview of Graphics Requirements

Textures ready for submission should fulfill:

  • Ratio (horizontal:vertical): depending on specific image type (1:1, 2:1, 4:1)
  • Dimensions: following the POT rule (power-of-two), size depending on specific image type
  • Codec: dds DXT1 (opaque only) or DXT5 (with transparency)
  • Extension: png (or jpg, bmp)
  • Tilable (seamless): for some image types
  • Quality: RQ or CQ

Image ratio

The image ratio horizontal:vertical will depend on the image type. The recommendations are always assuming that pixel ratio is 1:1. This means, no matter what image ratio is used, a circle must show as a circle when viewing the image in an image viewer.

For example, it's 2:1 for planet textures, 1:1 for cargo images, planet hud images and space background faces, 4:1 for current shield and armor face images.

Square things make sense to be 1:1, however other things can be pretty arbitrary, usually you need to round to obtain the closest power of two, for example 400x300 -> 512x256.

Image dimensions

The vertical and horizontal size of the image should be a power of two (POT). Really, non-POT (non-power-of-two) textures are troublesome, time and memory consuming, since otherwise they need to be scaled when loaded and it's just best to skip that step. It'd be ideal if they were also power of two in masters, but that's not required, but the exports to data4.x should always be some power of 2.

Just use POT. Love the POT. The POT is the mother, the POT is the father. Trust the POT.

That leaves few options for the horizontal resolution:

  • 64 px
  • 128 px
  • 256 px
  • 512 px
  • 1024 px
  • 2048 px

1x1 images are allowed, for example if using a texture with a single color, or a transparent image.

The size recommendation will depend on the image type. Please refer to the specific image type requirements in the art-related Development section.

Keeping original high resolution image (e.g. 1024 or 2048) versions in stock (and in svn masters directory) helps maintaining quality and scalability as game development progresses or typical screen resolutions rise in the future with better hardware available to the players. Also, keeping original 3D-models in stock provides for unplanned future changes.

Image Compression Codec

The graphics format for the game is dds format with either DXT1 or DXT5 compression, (though the file extension can be either png (preferred), jpg, or bmp).

The distinction between the one or the other compression:

  • DTX1 for non-transparent, opaque images _ONLY_
  • DTX5 for transparent or semi-transparent images _ONLY_

Compression with Gimp dds plugin

Compression with nvcompress

You will need nVidia's free texture tool nvcompress to transform your original textures to optimized dds textures. Get the tool here: NVIDIA Texture Tools

The following applies to NVIDIA texture tools version 0.9.4. More recent versions have not yet been tested.

Due to a bug in handling 1 pixel mipmaps in the original version, you will be further required to patch the tools with safemode's patch. The patch can be obtained here: save nvidia-texture.patch file

Patch the texture tools, compile, and install them.

Transform your original texture using nvcompress using the DXT1 or DXT5 format.

For opaque images:

  • nvcompress -bc1 textureoriginal1.png texture_dds.png

For images with transparency:

  • nvcompress -bc3 textureoriginal1.png texture_dds.png

Verify the optimized texture either by opening it with GIMP (with gimp-dds plugin installed) and making sure that all mipmap layers (e.g. 12 layers for 2048x2048 original image resolution) are contained in the file, or by checking it with:

  • nvddsinfo texture_dds.png

Image Naming (Extension)

The extension for your image file will depend greatly on three things:

  • 1) the extension currently used in data for that image type
  • 2) the ability to change that without corrupting the data, engine code and python scripts
  • 3) future developments

Currently extensions range from png, through jpg, or bmp.

Artistic Image Quality

Committed textures are classified as:

  • DQ - Development Quality: textures with very low horizontal resolution and low degree of artistic quality
  • RQ - Release Quality: textures with at least medium horizontal resolution and medium to high degree of artistic quality
  • CQ - Cinematographic Quality: textures with high horizontal resolution and very high degree of artistic quality

Specific resolution requirements can be found on the development pages specific to each image type.

Committing to SVN

The subversion (svn) repository has two directories for graphics data:

  • \masters that holds the original hi-resolution textures plus optionally the source/project files that were used to create the textures
  • \data4.x that holds the optimized textures

See Also (References)


Author: pyramid