DDS Validator

Introduction

I started this project during pre-production of our first game project.
I saw it as a challenge for myself to refresh my programming and create something useful for the projects at The Game Assembly to come.
It's easy to use and highlights problematic files not utilizing the DDS formats strengths.

After receiving some feedback I decided to also integrate Perforce into the program, which proved to be a valuable opportunity to learn more about Perforce and its accompanied API.

Features

• Reads flags for power-of-two, compression, mipmaps and cubemap.
• Supports all common compression formats like BCn/DXT and ASTC.
• Highlights files of large sizes with a warning.
• Open and read individual files or entire directories.
• Supports drag-drop on application window and executable.
• Open Windows Explorer to selected file.
• Perforce integration for quick owner identification and workspace validation.

Reading Data from the File Header

The first 128 bytes accommodate the 4 byte long magic value (DDS ), followed by the 124 byte long basic "DDS_HEADER".
Here is where most information about the file can be found, like X and Y resolution, mipmap count and cubemap flags.

However, compression format of modern DDS files can be found in the DX10 extended header, which increase the header size to 144 bytes.
The program reads and saves these values in a struct for each and every file, including their file size and file path as an identifier.
This way I can close any file streams after collecting the data in the file header.

Using this data I immediately compare it to some rules, like power-of-two, if it uses mipmaps and in some cases, if it's a cubemap.
I then populate a list view with all the collected data and present it in a clear way where it can be sorted and inspected.
A detailed view for individual files with more in-depth information about validity is also possible by selecting a single item in the list.

Perforce Integration

The perforce integration is an addition I made from feedback I got of the tool. It would make the tool more integrated in the pipeline at The Game Assembly, where we use Perforce as version control.

It features workspace/client swapping, open and read workspace/client folder and information like revision, changelist ID, date, user and description.

Conclusion

In most modern engines you never have to work directly with the DDS format, unless you're a programmer. However, for the projects at The Game Assembly, where all textures are DDS, it proves to be a useful tool.

Either for Technical Artists, game artists or the group as a whole.
In the end I learned a lot about the DDS format, Perforce and their API as well as refreshing my programming.

Thank you for reading!