Trouble with .dds

twoday

Chieftain
Joined
Aug 13, 2012
Messages
2
Hello everyone. I'm pretty unfamiliar with this whole practice, but making my first attempt at a mod, and I'm having a (probably pretty newbish) problem with .dds files.

It seems that the modder's guide is telling me that I need to make certain dds files.

The DOM image should be 1024 by 768, some icon atlases should be 640 by 640, etc., but photoshop doesn't let me save any .dds files that aren't in powers of 2, so I'm stuck being unable to save the files I create.

I am totally unfamiliar with the possible settings for saving a .dds file and what they mean, but I've tried every combination of modes and such with no success.

How do I do this?

Thanks,
Twoday

Moderator Action: Moved to the main forum.
Because the tutorials subforum is only for tutorials, not for questions ;).
 
I'm not home, though, I'll try and help.

I've seen lots of different advice online or posts recommended DXT1, DXT3, or DXT5. Or, that it's situational and when it's best to use each one.

But, lately, the setting I've had the best results with while using Photoshop, and which actually works with Civ, is the 32 bit ARGB. I think it's named something like 8:8:8:8 (8 bits of every channel, I guess). I think I discovered it while using the "3D View" option which shows what the image will look like at different settings. Before that, I just assumed that the option was incompatible with the game since everyone seemed to be using the first couple DXT ones.

Also, another awesome thing I've recently discovered while experimenting: you don't seem to have to worry about the "product of 4" rule for DDS sizes when using 32 bit ARGB. When I was creating single portrait atlases, or 2x2 atlases, I used to tweak the canvas sizes of the 214 and 45 sizes; not any more. :D
 
The DOM image should be 1024 by 768, some icon atlases should be 640 by 640, etc., but photoshop doesn't let me save any .dds files that aren't in powers of 2, so I'm stuck being unable to save the files I create.
Hello. Which plugin do you use to save your files? The one from NVidia? A recent version? I mostly use paint.net myself (I'm a developer, not a graphist) but I don't remember experiencing those kind of restrictions with photoshop.

But, lately, the setting I've had the best results with while using Photoshop, and which actually works with Civ, is the 32 bit ARGB. I think it's named something like 8:8:8:8 (8 bits of every channel, I guess). I think I discovered it while using the "3D View" option which shows what the image will look like at different settings. Before that, I just assumed that the option was incompatible with the game since everyone seemed to be using the first couple DXT ones.
I recently tried to encode some dds files as ARGB32 and the game could not load it. Maybe either the encoder or civ5 do violate the standard, or maybe it depends on where you use those textures. Anyway, I had to resort to DXT3 although civ5 itself uses some ARGB32 textures.

Also, another awesome thing I've recently discovered while experimenting: you don't seem to have to worry about the "product of 4" rule for DDS sizes when using 32 bit ARGB. When I was creating single portrait atlases, or 2x2 atlases, I used to tweak the canvas sizes of the 214 and 45 sizes; not any more. :D
This is actually hardware-specific. On recent GPU with updated drivers you can use whatever size you want but those textures won't be loaded and displayed on older/badly setup computers. So, no, stick to power of two sizes (32, 64, 128, 256, 512, etc), unless you want some users to report missing textures.

That being said, in some circumstances (when large textures are expected I guess, like loading screens, wonder splashes, etc) you can use arbitrary sizes as civ5 will split your image into smaller power-of-two textures.
 
I have been using the most recent Nvidia plug in.

It does let me save these sizes on the 32bit mode, but only if I make it "image only" (without mipmaps).

Anyway, I think that'll do the trick, since I am only using them as images, and not, say, skins or anything very complex.

Thanks a lot!
 
Interesting, thanks for explaining the technical side of it, DQ.

Perhaps, I'll have to reconsider my use of those sizes if I want to expand the usability of my mods and artwork.

Though, question: if the existing game already contains portrait/icon art which has sizes that deviate from the power-of-two rule, why would modders need to follow it for users with obsolete/inadequate gpu's? As in, those users wouldn't be able to play the existing game anyway without graphical errors. I don't understand.

Also, I performed a little bit of Googling, and it seems like the generalizing of texture sizes which aren't powers of two, with Nvidia for example, started at least as far back as the 6 series, about 7 years ago. Within the context of computer technology, that's pretty old.
 
Though, question: if the existing game already contains portrait/icon art which has sizes that deviate from the power-of-two rule, why would modders need to follow it for users with obsolete/inadequate gpu's? As in, those users wouldn't be able to play the existing game anyway without graphical errors. I don't understand.
It's related to what I said earlier about civ5 splitting some textures into smaller square power-of-two textures. The problem is that the game does not always do it and we don't know when it does. Maybe it's related to the texture format, maybe it's related to its size, maybe it's related to when it's used, etc. The bets are opened! :)

Also, I performed a little bit of Googling, and it seems like the generalizing of texture sizes which aren't powers of two, with Nvidia for example, started at least as far back as the 6 series, about 7 years ago. Within the context of computer technology, that's pretty old.
Well, first of all, you need to realize that most computers only have an integrated GPU chipset (they only became decent recently), and a game editor cannot just deem those consumers as worthless and not support them, especially for a game like civ5 which has not the same users base as Crysis. Now add the fact that the average PC lasts many years, and that you must look at the whole world, especially India and China, and their 2.5 - 3 billions customers who often have terribly old computers where 800*600 is not uncommon (hence why Firaxis actually did choose 800*600 for their minimum resolution, which is a severe constrain when it comes to UI design). And if you think that at least, since Vista (2007), every new computer had decent graphics capability to match the Vista label, well, it's not true, even big brands released after that computers displaying the Vista label but unable to use Aero.

But the real dark side of 3D lies in the drivers hell. Roughly speaking, about half of the computers either have no 3D drivers, or have bad drivers, or have the very first versions of their drivers, those full of bugs and such. The result of this and the numerous bugs (drivers are fortunately improving nowadays but they used to be real crap) is that many GPU are detected as older, sometimes way older, than they really are, or as not supporting some features they could actually support. Yep, some people do have modern GPU that are detected as a year 2000 hardware. Let's talk about Intel too: sure they released dx9 compatible hardware as soon as 2006... but the pixel shaders were ran in software! A bit later they released an opengl 2.x (I don't remember) compatible hardware, but it then took them three years to release a driver that could use those capacities!

Nowadays, in 2012, more than half of computers cannot simply run Firefox with hardware acceleration and Chrome disabled it by default. But since games cannot just run without 3D, many games choose lower requirements than Firefox and keep a pipeline compliant with old GPU, sometimes as old as the early dx9 (2003), while providing other pipelines for more recent computers. Unfortunately this is common in the computers industry : many softwares and webpages we use are still designed for 800*600 while I run in 1920*1080 since six or seven years now. Games are not an exception and the poor quality of drivers make things even worse ; this is the real pain in 3D programming.
 
I'm having a different problem with .dds files.

First of all, how many layers should you have in the .dds file? Two? One being the alpha layer which is the template of all the white cirlces and the other being your icon?

Secondly, I just tried to load my mod in the mod screen and Civ V froze. Is there a common cause for that? Checking the log files, I don't see anything that mentions the .dds files that I'm trying to get Civ to read from.
 
First of all, how many layers should you have in the .dds file? Two? One being the alpha layer which is the template of all the white cirlces and the other being your icon?
There are no layers in dds files (just as with bmp, png, jpg, gif, etc). You create your photoshop file, add as many layers as you want, then everything is flattened into a single layer when you export it to dds.

Secondly, I just tried to load my mod in the mod screen and Civ V froze. Is there a common cause for that? Checking the log files, I don't see anything that mentions the .dds files that I'm trying to get Civ to read from.
Did you ever managed to use mods before? Do you use a legal version?
 
Alright, I didn't know that exporting to .dds flattens it automatically. And yes, I do use a legal version. My mod loaded fine before I tried to add in icons. Once I hit next after selecting the mod, the cursor turns into a spinning globe then into a white arrow. There's a error box but it disappears too quickly to read.
 
First of all, you should be able to get the error text from one of the logs in MyDocuments/My Games/Sid Meier.../Logs.

Now, some guesses:
* You didn't import your dds into VFS (modbuddy, select file, F4 for properties).
* You used an incorrect format, I suggest you try dxt3 and generate mipmaps.
 
I've been trying to find the logs...I went through all the ones that were generated today, but didn't see anything. I'll give these a shot again with the format corrected.

I did add all the .dds files to the project here. I don't think I missed anything in the Modders Guide though. Thanks for the guesses.

Edit : I did fail to import my dds into VFS.

Edit edit : After changing them all to dxt3 compression, generating mipmaps and having them all import to VFS, I can make it past the load mod screen to where it gives me the option of setting up the game. As soon as I go to select a leader, it freeze/crashes in a similar way.
 
Back
Top Bottom