Difference between revisions of "Development:Graphics Requirements"
Line 13: | Line 13: | ||
=Graphic Files Requirements= | =Graphic Files Requirements= | ||
+ | |||
+ | ==Overview of Graphics Requirements== | ||
+ | Textures ready for submission should fulfill: | ||
+ | * Codec: dds DXT1 (opaque only) or DXT5 (with transparency) | ||
+ | * Extension: png (or jpg, bmp) | ||
+ | * Ratio (horizontal:vertical): depending on specific image type (1:1, 2:1, 4:1) | ||
+ | * Size: following the POT rule (power-of-two) | ||
+ | * Resolution: depending on specific image type | ||
+ | * Tilable (seamless): for some image types | ||
+ | * Quality: RQ or CQ | ||
==Image ratio== | ==Image ratio== | ||
− | The '''image ratio''' horizontal:vertical | + | 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== | ==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 | + | 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: | That leaves few options for the horizontal resolution: | ||
Line 29: | Line 44: | ||
*2048 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== | ==Image Compression Codec== | ||
− | The | + | 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=== | ||
+ | {{warning_text | | ||
+ | | text=Please note that nvcompress version 0.9.x is suspected to be corrupting textures. Gimp-dds is the recommended approach for DXT5 compression.}} | ||
+ | |||
+ | ===Compression with nvcompress=== | ||
+ | {{warning_text | | ||
+ | | text=Please note that nvcompress version 0.9.x is suspected to be corrupting textures. Please use gimp-dds for DXT5 compression.}} | ||
+ | |||
+ | You will need nVidia's free texture tool nvcompress to transform your original textures to optimized dds textures. | ||
+ | Get the tool here: [http://developer.nvidia.com/object/texture_tools.html 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: [http://signal-lost.homeip.net/files/nvidia-texture.patch 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: | ||
+ | * <code> ''nvcompress -bc1 textureoriginal1.png texture_dds.png'' </code> | ||
+ | |||
+ | For images with transparency: | ||
+ | * <code> ''nvcompress -bc3 textureoriginal1.png texture_dds.png'' </code> | ||
+ | |||
+ | 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: | ||
+ | * <code>''nvddsinfo texture_dds.png''</code> | ||
==Image Naming (Extension)== | ==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'''. | ||
==Believability vs Realism== | ==Believability vs Realism== | ||
Line 41: | Line 97: | ||
* RQ - Release Quality: textures with horizontal resolution of 256 or above and medium to high degree of artistic quality | * RQ - Release Quality: textures with horizontal resolution of 256 or above and medium to high degree of artistic quality | ||
* CQ - Cinematographic Quality: textures with horizontal resolution of 256 or above and very high degree of artistic quality | * CQ - Cinematographic Quality: textures with horizontal resolution of 256 or above and very high degree of artistic quality | ||
+ | |||
+ | ==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= | =See Also (References= | ||
+ | * [http://en.wikipedia.org/wiki/Power_of_two Power of two] | ||
+ | * [http://en.wikipedia.org/wiki/S3_Texture_Compression S3 Texture Compression] | ||
+ | |||
* [http://vegastrike.sourceforge.net/forums/viewtopic.php?t=10582 graphics size in data4.x] | * [http://vegastrike.sourceforge.net/forums/viewtopic.php?t=10582 graphics size in data4.x] | ||
* [http://vegastrike.sourceforge.net/forums/viewtopic.php?p=93658 GL graphics artifacts/errors] | * [http://vegastrike.sourceforge.net/forums/viewtopic.php?p=93658 GL graphics artifacts/errors] | ||
− | + | ||
+ | |||
=====Author: [[User:pyramid|pyramid]]===== | =====Author: [[User:pyramid|pyramid]]===== | ||
[[Category:Development]] | [[Category:Development]] |
Revision as of 12:00, 21 February 2008
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:
- Codec: dds DXT1 (opaque only) or DXT5 (with transparency)
- Extension: png (or jpg, bmp)
- Ratio (horizontal:vertical): depending on specific image type (1:1, 2:1, 4:1)
- Size: following the POT rule (power-of-two)
- Resolution: depending on specific image type
- 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.
Believability vs Realism
Committed textures are classified as:
- DQ - Development Quality: textures with horizontal resolution of 128 or below and low degree of artistic quality
- RQ - Release Quality: textures with horizontal resolution of 256 or above and medium to high degree of artistic quality
- CQ - Cinematographic Quality: textures with horizontal resolution of 256 or above and very high degree of artistic quality
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