Exporting Textures - DDS Files

Exporting Textures - DDS Files

From BeamNG
Language: [[::Exporting Textures - DDS Files|English]]


This guide will show you how to export textures properly for BeamNG.drive.

About

Almost every texture should be exported as a DDS (DirectDrawSurface) file. The big advantage of DDS files is that they can be decompressed by the hardware (GPU in this case) and are therefore faster to load.


They can also automatically create mipmaps which are used to interpolate the textures properly to a lower resolution.

To take advantage of this, your texture resolution needs to be in powers of 2 (e.g: "512px by 512px" or "1024px by 2048px" etc.)


You can force your image editor to use a special compression type when exporting your texture as a DDS file.

Compression types

These are the compression types we're currently using in BeamNG.drive:

BC1 / DXT1

For a color map without an alpha channel. Use this format if your texture has no transparency.

This type contains 5 bits for the red, 6 bits for the green and another 5 bits for the blue channel per pixel.

BC3 / DXT5

For color maps with an alpha channel. Use this format if your texture has transparency.

Like BC1, this type contains 5 bits for the red, 6 bits for the green and 5 bits for the blue channel per pixel. Additionally, it includes 8 bits of alpha channel information per pixel.

BC5 / ATI2 (3Dc)

For normal maps.

This type only contains two color channels: red and green. Each of these contain 8 bits per pixel. The missing blue channel will be calculated within the engine.

BC7

The texture compression format newly supported starting from version 0.15.

Should be the preferred format for all textures except normal maps. Results in more detailed textures on-screen.


TODO: Describe this format more.

Plugins

You may need to install a plugin for your image editor to be able to export DDS files.

Photoshop

Photoshop gets shipped with a DDS exporter by default, although Intel provides a newer version on their website: Photoshop DDS plugin

GIMP

You can find the latest DDS plugin for GIMP here: GIMP DDS plugin

GIMP's DDS exporter

Paint.net

Paint.net includes a DDS exporter by default. It currently supports all compression types which are used in the game.

Compressonator

Compressonator is a set of tools to allow artists and developers to more easily create compressed texture assets or model mesh optimizations and easily visualize the quality impact of various compression and rendering technologies

Github

Compressonator


Why not use JPG or PNG files?

These are both compressed image file formats as well.


The problem is that your graphics card is not able to decompress these kind of files by itself. Your CPU needs to decompress them first and then upload them to the GPU. This would artificially increase the render time.

Besides that, DDS files commonly do have a lower file size than JPG and especially PNG files.


At some point in the future, BeamNG.drive will only support DDS textures.