[SOLVED][ART] XnView/GIMP DDS export

Does anyone have any experience converting PNG images to DDS using XnView?

Here are two DDS images:

The file “hud_events.dds” was made by GearBox and works properly in “newtaskbar.lua”.

The file “hud_bentusi.dds” is one I created myself, but looks garbled in-game.

They both look okay when viewed in XnView.



TGA export seems to work okay, but I’m still curious about DDS.

you don’t have photoshop I suppose ? I have the nvidia dds plugin on it and the correct parameters for it if you can use that.

I’ll check xnview to see how it works and report back

oh, yeah, @Mikali, it won’t work from a png file, as it doesn’t have the alpha layer anyway !

you need to first create another file with your two pngs files (one for the rgb layers, and one for the alpha layer) and save it as a .tga 32bits. And after that, convert the tga to dds.

And be careful, the alpha layer also have informations, as seen here :

Test with xnview done. It won’t work because xnview doesn’t have any way to set the correct compression settings :confused:

Edit :
I also tried with Gimp and his dds plugin, but it’s missing some of the parameters, like the number of mipmaps level to generate. (edit : doesn’t seem to be a problem, thanks @radar3301)
The dds plugin is here.
In Gimp : File -> export -> change name -> chose dds as type -> click export
In the window which appear :
Compression : None
Format : RGBA8
Mipmaps : Generate mipmaps
Advanced Options / Filter : Box

Another option is ImageMagick. It’s a command line tool, and the documentation isn’t the easiest to come to grips with, but I believe it can get the job done.

Never has been a problem in the past.

Select the “advanced options”:


Good to know !

I’ve changed the link in my previous post… the dds plugin at the top of the page was not the last version, that’s why I didn’t have the mipmap options.
I also updated the settings needed.

Thansk for the heads-up @radar3301 !

PNG can have an alpha layer too.

For instance:

Also, thanks, guys, for the GIMP tips!

Yes, I know, but it’s not a separate layer like a tga file :

That’s due to the software you’re using. Both TGA and PNG are 32 bit RGBA formats. Your software just doesn’t support PNG as well as TGA.

Here is what they look like in GIMP.

PNG example is on top. TGA example is on bottom. Both show the same four channels.

Also in GIMP both images have only one layer.

no, photoshop supports png as well, just that the alpha layer is not presented the same way than for tga in it, which is strange. Having the alpha layer totally separate is easier to work on it (for me at least)

I saw during my test that there wasn’t the separate alpha layer in Gimp, even for tga !
So I wonder how you can work only on the rgb layers in that case, because as soon as you hide the alpha, the rgb is not visible anymore oO
I never used Gimp, so there is certainly a trick I don’t know though, and it’s just my zero knowledge of it that makes me wonder how it works ^^

Yeah, I wish you could export a channel to a file, edit it, and then import it again. Paint Shop Pro used to let you do that. (I haven’t used it in years.)

Have you ever tried Paint.Net ? I don’t know how the layer are managed into it.

Oh hell no.

I’ve used it in the past when I had to perform operations on a directory full of hundreds of images. But it’s not worth it for just three images.

Paint.Net doesn’t let you view or edit the channels separately.

Argh ! I’ll stay into Photoshop ^^

Irrelevant to file exporting, but… There are a couple GIMP plugins which let GIMP use Photoshop plugins. I know of PSPI and AKVIS.

There’s no need to import/export channels, the channels menu lets you show/hide/edit channels individually or together

Clicking on the name of each channel will select or deselect it for editing (blue is selected). Deselect the red, green, and blue channels, and any color brush will only edit the alpha channel. The eye icons to the left of the channel names let you show or hide the individual channels.

Yes, but when I hide the Alpha channel, the window show an empty image, so how do I know what I’m currently editing ?

Clicking the eye makes it not visible, where as clicking it to not be blue (selected) is different.

Alternatively… (right-click menu)


Working on image layers:

Working on alpha layer (while image is active):

By clicking on the two previews (outlined in blue below), you can choose which layer (alpha vs. image) you are editing.

You can even go so far as to disable or only show alpha or image:

I’ll let you play around with those options for the sake of not posting so many images.