dds format?

Ryoga

King
Joined
Oct 12, 2010
Messages
993
I tried to open the "dds" files of the terrains which are located at "Steam\SteamApps\common\Sid Meier's Civilization Beyond Earth\assets\terrain"

However gimp returns an error saying that the header is wrong, and photoshop (with the plugin) just shows black images with some random dots.

Anybody knows how to visualize these files correctly?
 
If the .dds files you're looking at have an _index.dds counterpart, then you need to combine and convert them to .png with this tool, then you can edit and resave them as traditional (non-indexed) .dds files for use with your mods.

EDIT: No, the ones you're looking at aren't indexed... I dunno, then. :dunno:

EDIT #2: Note that the equivalent files for Civ5 have the same behavior. The files you want are probably in the .fpk's.
 
Any solution found for this problem?

I unpacked the terrain fpk file and a good chunk of the dds files are behave like this.

Gimp error:

Unsupported format (FOURCC: DXT4, hex: 34545844).
Invalid DDS header!
 
Which ones from the fpk are causing you problems?

Well I am looking at the possibilities of making new planet types. Which means mostly the TerrainTextures.fpk, but some others as well. My solution for now to trick gimp by modifying the header of the dds files to think its have a DXT5 compression. And it works to an extend, it opens the file, not sure how much damage it cost though to the actual image.

Also if you don't mind me asking here, in the common folder there are some *.fxsb files which contain the different premade terrain pieces. How can i open that packed folder?

Thanks :)
 
Photoshop opens most of them fine. Have you tried another program? Maybe Paint.Net?

Re: .fxsb files, I'm pretty sure those aren't archives. They're probably some kind of effect (particle, lighting, etc.)
 
Getting this as well, causing real issues with trying to update model textures. DDS plugin for the Gimp 2.8 fails with a DXT4 header issue. Trying paint.net now, but this really shouldn't be necessary.

EDIT: didn't work in paint.net either.

Code:
System.FormatException: File is not a supported DDS format
   at PaintDotNet.Data.Dds.DdsFile.Load(Stream input) in d:\src\pdn\paintdotnet\src\PaintDotNet\Data\Dds\DdsFile.cs:line 472
   at PaintDotNet.Data.Dds.DdsFileType.OnLoad(Stream input) in d:\src\pdn\paintdotnet\src\PaintDotNet\Data\Dds\DdsFileType.cs:line 227
   at PaintDotNet.FileType.Load(Stream input) in d:\src\pdn\paintdotnet\src\Data\FileType.cs:line 477
   at PaintDotNet.Functional.Func.Eval[T1,TRet](Func`2 f, T1 arg1) in d:\src\pdn\paintdotnet\src\Base\Functional\Func.cs:line 158

I don't have Photoshop, and I'm not paying a bajillion pounds for it, either.
 
Alright, I think I've got this figured out. Even got a homebrew "fix" for custom textures for affected files.

1. The un-openable files are not all of the DDS assets, but a subset. I'm not sure there is any pattern, but the biome textures as a general thing are completely unaffected (contacted the guy who did those amazing mods).

2. They're unopenable because they're in DXT4. DXT4 is analogous with DXT2 in certain respects, and differs from DXT5 due to some alpha-blending techniques and other features.

Most common DDS converters handle DXT1, 3 and 5 (and not 2 and 4).

3. Windows, however, specifically Windows versions with DX11 support (Win8 and up? Could be on Win7 as well) can view DDS files natively in Windows Photo Viewer. This is integral to the workaround.

4. Screencap the file at native resolution by viewing it in Photo Viewer. Paste into Paint or your editing program of choice, and save as whatever format you want (I prefer PNG). This is your base file to work with.

The bypasses the issue of converting using a typical DDS converter (assuming you have one that even works), as they force an incorrect version of DXT that causes visual artefacts.

5. The file will be lighter; as if you'd exported the normal diffuse map at 50% saturation or similar. This is how Beyond Earth uses DXT4 to handle specular (?) effects (or at least it seems to be). The lighter / more saturated the file, the greater the specular distortion ingame. Conversely, if you make the entire file completely black, once you get it ingame it basically disappears, leaving you with nothing but the diffuse layer (and no specular effects at all).

6. You should now have enough information to edit your file. Exporting the file as you screencapped it will lead to a huge mirror-effect ingame due to specular distortion. What you want to do is alter the levels of black across the image dependent on what areas you want to be specular (to take the Explorer as the example, black out everything but the metal areas and perhaps the visor).

I'm playing with this last step myself, and it's stupidly fiddly, but it's a way around the issue that shouldn't be a hurdle to actual graphics artists (obvious note: I'm not one of those :D) and beats messing around with file headers and the like.

EDIT:

Almost damned-there. Hopefully Firaxis can resolve this at some point, DXT4 compression is virtually-impossible to deal with.

Just minor changes, preparing for Affinity re-texturing work. Red pants, reddish visor / goggles. Only thing off is the specular on the metal is still a bit too flashy compared to the vanilla textures.





Also, my sref.dds file (in a PNG format :p), for comparison:

 
Is there any specific file you are trying to open but can't? I do have Photoshop CS5, could grab a copy with 80% academic discount some years ago. I can try and see if i can open it and save it with another compression. You screenshot trick is ... interesting ... but will have it's issues as well (especially if you have to deal with a dds that has an alpha channel)
 
The alpha is applied in an interesting way; the SREF layer appears to be handled as transparent by the game engine, with an increasing brightness increasing the specular effect.

The Explorer SREF files are a good example for you here (explorer_char_sref.dds and explorer_sref.dds) and. I've just successfully edited, converted and got them ingame (to a level I'm happy with), following my hilarious workaround, above. The Explorer DIFF files are perfectly fine.



The silver bands on the arm are strips of #FFFFFF in the explorer_char_sref.dds.
 
OK, i can confirm that old Photoshop CS5 with official NVidia plug-in can open those dds files.
Apparently it's not the game that handles dds4 format strangely but windows that can't read that strange format. Here is a comparison of explorer_char_sref.dds opened in Photoshop and screen captured in windows viewer.

Alpha channel is light gray (RGB 208.208.208) so yeah, you probably have it right that it somehow changes the way the image is displayed. Unfortunately none of the blending modes appears to give the original image if i use that gray as a "mask" :rolleyes:
 
I found a simpler workaround for dealing with DDS files that won't open directly in Paint.NET. The approach uses IrfanView which can open these files fine.

1) Make sure your main window colour in Irfan is set to pure white (R255,G255,B255) - this is so transparency/alpha exports correctly.
2) Open the Beyond Earth DDS you want to convert.
3) Save to PNG with Save Transparent Color, Save Transparency as Alpha channel, Use main window color for transparency all checked - everything else unchecked. Use Binary encoding and Compression level 0 (zero).
4) Open PNG in Paint.NET/Gimp and you can now export it to DDS.
 
Top Bottom