The Forums Are Now Closed!

The content will remain as a historical reference, thank you.

[TUTORIAL] DDS Image Files

By on November 21, 2009 10:53:06 AM from Demigod Forums Demigod Forums

DDS stands for DirectDraw Surface, and is used in a lot of games as textures and other images. They function pretty much like a regular image file, and some of them will hold alpha maps.

Adobe Photoshop Plugin:
http://developer.nvidia.com/object/photoshop_dds_plugins.html

GIMP Plugin
http://nifelheim.dyndns.org/~cocidius/dds/


(if you know of a plugin for a different image editor, please let me know and I will add it to the list)

Once you have the plugin, you will be able to open and save DDS files. As an example, I will open:
Demigod\bindata\textures\ui\common\frame_frontend.dds



If you get this popup, you can simple click off "Show this dialog" and then "OK", or else you will get that every time you open a DDS file.

Now you get the large image frame showing up. If you hit "Channels" and then click on the "Alpha 1" you will get the alpha channel, which basically lets parts of the image be see-through. Black is 0% visible, white is 100% visible, and perfect grey would be 50% visible; you get my drift.

Now, when you are saving it, we will want to do a Save As... so that we don't overwrite this original file. You should save it under your mod folder, though exactly where is really dependant upon your mod itself.

When you hit "Save", you will be greeted with the following window.

The only things that you really need to worry about here (of course I could totally be wrong, so let me know if I am) are:

1) The very top-left dropdown box. This selects which format you want your DDS file to be in. At the very top are two "DXT1's". One has an alpha layer, and one does not. As it pretty much shows, one will save your alpha layer, and the other will not. Even if you don't have an alpha in your original image and choose a format that has one, that shouldn't affect what your file does in-game. This format makes a small file size, but in very bad quality.

2) The MIP Map Generation section. You pretty much want this on when doing textures that will be applied for models, but you don't want it on if you are simply doing user-interface work, and things like that that do not make use of MIP mapping. (Thanks to Colonel_Jessep for this one)

Down to "DXT5", this is what I used to use, although the image height and width need to be of a multiple of 4.

What I have been using lately is "8.8.8.8 ARGB." It creates very large image sizes, but the quality -- as far as I can tell -- is 1:1. I am sure that there is a really good comparison of the formats somewhere. I am not sure what GPG uses, and it may not even be on that list as I was not able to emulate the correct file size.

Well, once you choose one and hit Save, all should be good and saved, and you now have your DDS file.

+45 Karma | 12 Replies
November 21, 2009 12:47:23 PM from Demigod Forums Demigod Forums

Very Interesting! it seems that i have to get the dust of Photoshop and start using it again. I kinda need it for this short of stuff.

Btw if i just change an image (lets say .JPG) to .DDS wouldnt it be converted like all files??

November 21, 2009 1:30:34 PM from Demigod Forums Demigod Forums

Btw if i just change an image (lets say .JPG) to .DDS wouldnt it be converted like all files??
If you convert it with the Nvidia tool it will work, just renaming it won't do the trick.

Maybe one thing you should know about is MIP mapping. It's technique used to decrease the workload of your graphic card. Rule of thumb: If it's a texture on a surface of a 3D-mesh leave MIP mapping on, if it's a button or pic for the user interface (2D, always same size) switch it off.

More info: http://en.wikipedia.org/wiki/Mip_map

November 21, 2009 1:37:51 PM from Demigod Forums Demigod Forums

Well thank you Colonel!

LOL and i tried that renaming and it didnt work. Then i realised how stupid it was of me to think that it could.

Interesting info on Mip mapping.

November 21, 2009 5:01:01 PM from Demigod Forums Demigod Forums

Thanks for the info, Jessep!

November 24, 2009 1:56:54 AM from Demigod Forums Demigod Forums

I haven't yet started playing with modding Demigod, but this may be helpful to others.

Little fact (unless they've taken it out, after Supcom)

The engine at least supports pngs, you do have to rename them .dds but it will load and convert. This is useful when you are testing out your mod. I'd recommend converting prior to releasing it.

 

In terms of DDS editors for other editors:

DDS plugin for gimp

http://nifelheim.dyndns.org/~cocidius/dds/

 

November 26, 2009 7:25:34 PM from Demigod Forums Demigod Forums
I'm using the GIMP plugin and am trying to figure out what type of DDS file GPG uses. 

I believe that GPG uses 8bits for RGB, not sure about alpha.
I tried using the default (not sure what compression level, but the files size was 25 meg)
and DXT1 (filesize 685k). Both seemed to work fine at low settings.

The demigod color tones are all rather neutral toned. So, the goal of my endeavor is to
give them alittle more color. My main interest is in the QoT, probably because she is so
under appreciated by both the community and GPG. Here are some of the things I've
gotten to work so far.





The 1st and 3rd images are with low visual settings. The middle is with high visual
settings. The blue flowers are both with the 684k dds file, the red is the 24meg
dds file. I'm not sure if this will have an impact upon gameplay yet.


One useful thing I've found so far is that you can make changes while demigods is
running and then reload the scenario using the console and F10.

November 26, 2009 8:29:50 PM from Demigod Forums Demigod Forums

If you figure out how the team color texture file works can you post that it would be great. Also the standard they use is dxt5 for most of their stuff.

November 26, 2009 9:58:41 PM from Demigod Forums Demigod Forums

umm... noob question:

Is the DXT5 the maximum compression you can use?

November 26, 2009 10:16:46 PM from Demigod Forums Demigod Forums

Another demonstration, because eyecandy is always fun.

 

Team Color seem to be relatively simple.

Each unit has some *SpecTeam.dds files. If you decompose them into RGB using gimp (irfanview shows it normally) you can see the different layers in the *_Albedo.dds file. I'm removing the content here because Chirmaya's link is much better.

 

 

Some experiments in the FlowerSpecTeam.dds file. The top left image is what happens if you color everything white. The right image is what happens if you color everything in black (or any color). The lower left image is what happens if you leave the entire file as the alpha channel.

Once you decompose the images you can then edit them individually. Once you are done recombine them add put them back into the *SpecTeam.dds. The following are the important color mixes (taken from Chirmaya's link, props to mangriff).

yellow = (red + green) shiny and reflective, good for metal

cyan = (blue + green) glowing and shiny, hard to tell because glow covers up shine

magenta = (blue + red) glowing and reflective, cool if used lightly

white = all 3 (red + green + blue) not really useful

black = none 3 (no red, no green, no blue) good for matte surfaces

alpha = teamcolors

 

November 26, 2009 10:49:18 PM from Demigod Forums Demigod Forums

Is it possible that we can see an OAK in camo-army like colors?

November 26, 2009 11:27:08 PM from Demigod Forums Demigod Forums

The team colours are single colours, so you won't be able to get camo as a team colour.

There is a really good tutorial here about how the albedo and specteams are setup: http://forums.gaspowered.com/viewtopic.php?t=17224

November 27, 2009 12:27:50 PM from Demigod Forums Demigod Forums

So, I just found this out so I thought I would pass it along. If all the dds files are present you can freely change them and reload the map using the console to have the changes appear. If you are missing a file however, that file will not be (re)loaded. You will have to restart the game after placing the file in the appropriate directory. Also, if you are missing a *SpecTeam file, it is assumed to be all alpha channeled which makes the entire object team colored.

Stardock Forums v1.0.0.0    #108435  walnut2   Server Load Time: 00:00:00.0000313   Page Render Time:

Stardock Magazine | Register | Online Privacy Policy | Terms of Use

Copyright ?? 2012 Stardock Entertainment and Gas Powered Games. Demigod is a trademark of Gas Powered Games. All rights reserved. All other trademarks and copyrights are the properties of their respective owners. Windows, the Windows Vista Start button and Xbox 360 are trademarks of the Microsoft group of companies, and 'Games for Windows' and the Windows Vista Start button logo are used under license from Microsoft. ?? 2012 Advanced Micro Devices, Inc. All rights reserved. AMD, the AMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices, Inc.