DDS unpacker for interface textures

Sterkhov

Chieftain
Joined
Oct 1, 2010
Messages
11
Location
Russia
I made DDS unpacker.
It unpack some packed interface textures. These textures consist of two files (filename-index.dds and filename.dds). This utility creates filename.png from these files.
 

Attachments

  • CivDdsUnpacker.zip
    9.1 KB · Views: 6,787
I made DDS unpacker.
It unpack some packed interface textures. These textures consist of two files (filename-index.dds and filename.dds). This utility creates filename.png from these files.

You, sir, are awesome. May many cookies be bestowed upon you. :goodjob:
 
This program is working as advertised, but only for the contents of the DX9 dir.

EDIT: btw :goodjob:
 
Any chance you could make it unpack into the original DDS format instead of converting them to PNG? Would be nice to have the alpha channel data as well.
 
There is no alpha channel in the PNGs your program creates - none that I can spot in Photoshop anyway.

EDIT: Ok, if I save them as DDS files and then reloads the file the alpha channel appears. Odd stuff.
 
There is no alpha channel in the PNGs your program creates - none that I can spot in Photoshop anyway.

This is an oddity of how Photoshop opens PNG files. The transparency IS there - you can see by the fact that the underlying white/grey checkered background is visible. However it's treating them as transparent RGB pixels rather than a separate alpha channel.

See this thread for a variety of ways around this problem:
http://forums.cgsociety.org/archive/index.php/t-665136.html
 
Cool! Спасибо, земляк! :goodjob:
 
Sterkhov you are amazing!

Very nice!!!

:D:D

Any chance you could make a version that supports command line arguments so I could incorporate support for loading up all the texture atlases in the tech tree editor? Like the user can set a path to it or something? Or put it in the same directory? Credit obviously will be provided. :)
 
Sterkhov you are amazing!

Very nice!!!

:D:D

Any chance you could make a version that supports command line arguments so I could incorporate support for loading up all the texture atlases in the tech tree editor? Like the user can set a path to it or something? Or put it in the same directory? Credit obviously will be provided. :)

I can give you the source code and you'll be able to integrate this functionality into your project
 
aw well that's awesome of you :D

I already had a nose at the code in reflector so source code won't be be necessary, but I didn't want to diminish the use of your tool by incorporating it into mine. Entirely up to you though, obviously. We'd stick a credit on the (soon to be in) splash screen or we can call it separately if you'd prefer, I'm cool either way.
 
Bump.

So is this tool meant to make the somehow run-length encoded DDS files readable?

It doesn't work for me, anyways, it starts, finishes but doesn't unpack anything and doesn't display an error
 
Civ reads in normal DDS files. Just export using the NVidia DDS exporter plugin for Photoshop / GIMP or whatever and you're good to go.

Nothing work for me. I modified a png file then saved as DDS then added the DDS file to my project but when I start the game old textures are loaded. I tried modifying icons like diplomacy icons, yield icons and worker action icons. it seems you need both filename.dds and filename-index.dds

If it works for you can you give me an example?
 
We've added about 80 religion icons, several tech icons, unit icons, interface changes. Trust me it works. :p

However, mod DDS files don't get loaded on-top of core ones, so you can't replace icons like you can UI files, you can only make new ones. So to change an existing icon, you'll need to modify the XML of the appropriate UI or IconAtlas to point to a new DDS file. As such making new yield icons is impossible since they are part of the fonticons which is currently defined in non-moddable xml, so you can't redirect to a new one. I'm sure a patch will sort this out.

Though you could possibly add a new yield to the city screen etc by editing the XML / Lua to point to a new icon atlas, but you would never be able to reference that new yield in text (tooltips, top bar, etc) as other yields are since it's not part of the fonticons.

Also, what format of DDS are you saving out as? I use DXT5 and it works fine.
 
Top Bottom