Dangerous Rays engine is using the DDS texture file format. The DirectDraw Surface (DDS) file format, is a Microsoft format for storing data compressed with the proprietary S3 Texture Compression (S3TC) algorithm, which can be decompressed in hardware by GPUs.
This makes the format useful for storing graphical textures and cubic environment maps as a data file, both compressed and uncompressed. The Microsoft Windows file extension for this data format is '.dds'.

There is several compression formats that you can choose depending on how the texture will be used in the game.

A texture file may be linked with a XML “texture params” file that contain the texture parameters information (SRGB mode, filtering mode…). This XML file is automatically generated/edited by the texture editor so you don't need to (and should not) create it manually.

Please Note

The Texture Converter tool should be used for converting images to texture that can be used in the game. Using another conversion tool is not recommended. The texture converter will apply some special algorithms to the converted texture to ensure the best looking and compatible textures for the engine.
DXT1
  • The best format for textures without an Alpha channel.
  • RGB with no Alpha.
  • Smallest file size, half the size of DXT5. Same file size as DXT1a.
DXT5
  • Generally the best format for textures with a smooth Alpha channel.
  • RGB with interpolated Alpha.
  • Color is compressed the same as DXT1.
  • Twice the file size of DXT1 format.
DXT5 XGXR
  • This is the format that need to be used for normal maps to give the best quality results and avoid normal map compression artifacts.
  • Twice the file size of DXT1 format.

To render a texture more smoothly in the game, it is resized multiple times to make “mips,” which are smaller versions of the texture. These smaller versions are swapped or blended with the original texture as the texture is rendered in the 3D scene.
Without mips, as unfiltered texture pixels get smaller than screen pixels they shimmer like crazy, because the pixels are quickly switching from one color to another. This is called “nearest neighbor” filtering. Instead the engine will usually use trilinear, or anisotropic filtering, for a smoother texture rendering.

mipmaps.jpg

Dangerous Rays engine will automatically create mipmaps for you (if you choose to generate them) when you will use the Texture Converter. Those mipmaps are stored in the DDS texture file and not in a separate file for each mipmaps.
Mipmaps are not required for everything. For example a texture used for the user interface (UI) typically does not need to have mipmaps.

In computer graphics, texture filtering or texture smoothing is the method used to smooth textures used in 3D models.
The Dangerous Rays engine support the following texture filtering modes:

  • Nearest-neighbor with mipmapping: pixelated, a different lower res texture is used for long distances to avoid aliasing. Very low performance impact on the GPU.
  • Bilinear: every pixel is interpolated from the closest stored pixels (also called texels). Low performance impact on the GPU.
  • Trilinear: same as trilinear, but the different mipmaps are also smoothed between each other as the object gets further away. Normal performance impact on the GPU.
  • Anisotropic: like bilinear and trilinear filtering, anisotropic filtering eliminates aliasing effects, but improves on these other techniques by reducing blur and preserving detail at extreme viewing angles. High performance impact on the GPU.

More technical details can be found here.

Albedo Map usually means the color texture. Also called a diffuse map but the correct term with a Physically Based Rendering shading model (the one used by Dangerous Rays engine) is Albedo map.

This texture only represents the base colors without any shadows or highlights. Take the following Image as an example. On the left we have a picture of a brick wall with shadows and highlights and on the right these shadows and highlights are missing.

albedo_map_comparison.jpg

A correct albedo map would be the image on the right. It is very important to remove any shadow/highlights from your texture if you want to have some good visual results.

Warning

Since the engine is using Physically Based Rendering, It is really important to enable SRGB gamma space for your albedo maps in the texture editor or they will not be rendered correctly and look very bright once ingame. In brief sRGB should be checked for Albedo and unchecked for Roughness/Metallic/Normal maps.

A normal map is a texture that stores a direction at each pixel. These directions are called normals. The red, green, and blue channels of the texture are used to control the direction of each pixel's normal.
A normal map is commonly used to fake high-resolution details on a low-resolution model. Each pixel of the map stores the surface slope of the original high-res mesh at that point. This creates the illusion of more surface detail or better curvature. However, the silhouette of the model doesn't change.

Dangerous Rays engine is using a special way of dealing with normal maps. Regular tangent space normal maps that look like the texture below must be converted to the DTX5 xGxR format.

Here is a regular tangent space normal map
normalmap.jpg

Here is a normap map converted to DXT5 xGxR format (used by the engine)
normalmap_xgxr.jpg

With the DTX5 xGxR format, colors are packed in the texture in a special fashion. The Y-component of the normal is stored the green channel of the texture, and X-component in the alpha channel. The Z component of the normal is reconstructed by the engine in a pixel shader at runtime. This technique is useful for greatly reducing visual artifacts caused by DDS compression.

Warning

The engine does not support regular tangent space normal maps and will produce incorrect result if used. That's why you must convert your normal maps by using the DXT5 XGXR texture format.
  • modding/texture_formats_guidelines.txt
  • Last modified: 16/10/2018 11:16
  • by admin