NoMansSky:Editing NMS Textures
No Man's Sky uses the common .DDS format for its texture files. They are located in the TEXTURES folder from the unpacked game assets. Conveniently, TEXTURES is more or less organized in directories that mimic the MODELS directories. Therefore if users find a 3D model, they can quite easily find the texture and vice versa by following the mimicked paths.
The Format, itself, stores one or more textures either with or without an alpha channel. Though the DDS format is well used by the gaming industry, many texture programs still require a plugin to be able to read and write the format. This tutorial will explain how to display thumbnails of .DDS files within Windows Explorer, as well as, how to edit the files in Paint.net and/or Adobe Photoshop.
Even if .DDS is a part of DirectX, created by Microsoft, Windows doesn't support the .DDS file format preview in its explorer.
Thankfully, some other company did the job and the best way, so far, is to use Paint.net paired with the FileTypeDDS extension.
All you have to do is :
- install paint.net
- decompress FiletypeDDS zip file
- copy-paste extracted folders into the paint.net directory to overwrite the default one
- open any folder containing some NMS .DDS file
- right click a .DDS file and choose "open with"
- Select Paint.net
- Close any texture folder
Starting from now on, opening any texture folder will display all the .DDS files as thumbnails instead of generic icons !
Various Texture Tools
Below are various tools that are helpful when working with textures.
- This is a shared source library for reading and writing .DDS files, and performing various texture content processing operations on such files. The item of interest here is Texdiag.
- Texdiag is a command line tool used to analyze images. When ran on a texture, Texdiag will output useful information such as the texture size, compression format, channel information, mipmap levels, etc.
Paint.net (by Casebolt)
Paint.net is a free Open source photo editing software that can be downloaded here.
To open and read .DDS files, users will need this specific addon by Nick aka Dtzxporter.
Then follow the included readme file to install it. It's just a matter of copying 2 files.
Now, to edit a .DDS file :
- Open Paint.net and go to [File] and select [Open] (or Ctrl+O). Choose the desired .DDS file.
- Users can now edit the file as any other image.
- To save the finished file, choose [File] and select [Save as] (or Ctrl+Shift+S). Select .DDS file type as the output type and click [Save].
Photoshop is Adobe's renowned image editing program. Currently all existing versions require a paid license to use.
However, for users who do have Photoshop, all that is required to read/write .DDS files is the Intel Texture Works plug-in. To install, copy the .8bi plugin to the File Formats directory (
/Plug-ins/File Formats ) within the Photoshop installation folder.
To edit a .DDS file :
- Open the file from within Photoshop or, if .DDS files are associated to Photoshop, open the file directly from the folder
- When opening, a prompt will appear with options for loading the file. If the texture has an alpha layer or mimaps, users will see the following:
- The alpha layer is mandatory so if the option is available, always check the checkbox.
- If mip-maps box is checked, it will create a separate layer for each mip-map. This is rarely useful as mipmaps should be auto-generated during save, therefore, users should generally avoid checking this box.
- When ready to save, go to [File] and select [Save As]. Choose Intel texture Works .DDS as the file format.
- A new window will open with .DDS specific settings :
- Settings are as follows :
- Texture Type : Choose Color if there's no alpha layer (fully opaque textures) or Color + Alpha for textures with an alpha channel.
- Compression : Users should select the same compression as the original file. However, BC7 will usually provide the best results for any texture unless it has a very noisy alpha channel.
- Pre-compress Normal Maps Operation : is only available when saving normal maps and could help if some of the channels are flipped. This is not a common.
- Mip-Maps : This option offers to auto generate a given level of mip-maps. Though the game will work without them, for performance reasons, users should always generate mip-maps if the original texture also included them. Generally, users should choose to generate the same level that the original texture included.
- Finally, click [OK] to save the file.
- The final step is to rename the file from .dds into .DDS because lowercase .dds files are not recognized by the game.
If after replacing a texture, it can't be seen in-game or there are weird stripes where the texture should be, it's most likely because the edited texture is one of the NMS cached textures. To speed up some texture access, NMS stores headers and footers of some of the textures in a cache file. If one of these textures are edited, its properties, header, and/or footer will no longer match the stored information within the cache, resulting in a corrupted display of the texture.
This cache file is named CACHE.SQS and is found within the TEXTURES folder. Editing this file is quite complex, therefore, the easiest solution is to use a known workaround. The workaround is quite simple :
- Rename the texture to something new (LASER.DDS becomes LASER2.DDS).
- Find the MATERIAL.MBIN file calling the original texture file and change the name of the texture to the renamed version (LASER2.DDS).
In doing the above, users are forcing the call a texture that is not listed as cached, thus, allowing it to appear properly in game. The only minor drawback of this is users will, sadly, need to edit (and release) 2 files instead of one for a new mod.