Page 1 of 2

Experimenting - Soldiers - DDS to PNG

Posted: Tue Mar 25, 2014 1:55 am
by Davinci
All , I took one of the uniforms from the previous game and then converted over to this game saving them as dds files. This part is already known by some of you.

The 43 files saved as dds came to approximately 33.2 MB .

I then converted the same 43 files but this time saving them as png files with an Alpha-Channel and the file size went down to 11.9 MB . That is quite a memory savings.

I only experimented with one of the uniforms so far, but this looks quite promising.

Just thought that I would share this info with some of the modders.

davinci

Re: Experimenting - Soldiers - DDS to PNG

Posted: Tue Mar 25, 2014 2:29 am
by Marching Thru Georgia
It's probably all the white space around the individual sprites. That probably allows for good compression. When they are packed, (less white space), the dds size is usually smaller than the png size.

Re: Experimenting - Soldiers - DDS to PNG

Posted: Tue Mar 25, 2014 2:35 am
by Garnier
I assume that after the PNGs are loaded by the game, it stores them in memory uncompressed in the format that they are rendered. When you download the game / mods they're always zipped so the files are already compressed, so png vs dds doesn't change anything. This would change how much space they take up on your hard drive. I don't know how it affects game loading time. It's either positive because of less reading from the hard drive, or negative due to the overhead of decompressing the images.

I can't imagine it having any effect on performance while running the game. Is there a reason it would?

Re: Experimenting - Soldiers - DDS to PNG

Posted: Tue Mar 25, 2014 3:51 am
by Davinci
It's probably all the white space around the individual sprites. That probably allows for good compression. When they are packed, (less white space), the dds size is usually smaller than the png size.
This would change how much space they take up on your hard drive. I don't know how it affects game loading time. It's either positive because of less reading from the hard drive, or negative due to the overhead of decompressing the images.
So basically I'm just saving memory on the Hard-Drive and not memory in the game, that's not that good!

Well, considering that I have already started converting the uniforms to the png format, I'll continue and play around with it for a few months.

Also, some of the houses and the roofs do work better as png files, the dds-roofs seem to display moving artifacts while in the game.

Thanks, for the information!

davinci

Re: Experimenting - Soldiers - DDS to PNG

Posted: Tue Mar 25, 2014 6:36 am
by Garnier
I don't know for sure how the game handles it, I just wouldn't expect this to change the memory consumption of the game after it's loaded. AFAIK textures are usually stored in memory uncompressed.

Re: Experimenting - Soldiers - DDS to PNG

Posted: Tue Mar 25, 2014 7:28 am
by Davinci
I don't know for sure how the game handles it, I just wouldn't expect this to change the memory consumption of the game after it's loaded. AFAIK textures are usually stored in memory uncompressed.
Thanks, after reading yours and MTG's response I went and did a Google search about how games handle various texture files.

It seems that there are pro’s and con’s too both of them.

I converted seven of the uniforms and can’t really tell any performance increase or decrease, but the (dds) uniforms seem to look better in the game compared to the (png) uniforms.

I do like the way that the (png) files work with the houses and the roofs compared to the (dds) houses.

Hmm, I might as well try the trees and the fences next to see if that makes a difference.

davinci

Re: Experimenting - Soldiers - DDS to PNG

Posted: Tue Mar 25, 2014 2:17 pm
by Saddletank
Also, some of the houses and the roofs do work better as png files, the dds-roofs seem to display moving artifacts while in the game.
I've noticed moiré effects on some buildings, usually the roof tiles and the walls if the textures are planked. The moiré noise is caused by the density of lines on a game's textures and your monitor refresh rate. Mine's a flat screen running at 60Hz which I think is quite common though. Its a similar effect to how a spinning spoked wheel can appear stationary on some movies.

It would be good to see this graphic noise removed if possible.

Re: Experimenting - Soldiers - DDS to PNG

Posted: Tue Mar 25, 2014 4:55 pm
by Davinci
Mine's a flat screen running at 60Hz which I think is quite common though. Its a similar effect to how a spinning spoked wheel can appear stationary on some movies.
It would be good to see this graphic noise removed if possible.
True, I'm also running a 32"-flat-screen with the game so the artifacts are quite noticeable while in the F-Key-Mod .

But, I really wasn't trying to remove them at first, I was taking one of the houses and making multiple houses from that one by changing the textures and the doors and windows.

But, as mentioned above, this does increase the size of the files which might not be a good thing.

davinci

Re: Experimenting - Soldiers - DDS to PNG

Posted: Tue Mar 25, 2014 9:31 pm
by RebBugler
moiré noise eh? ...I called it the 'shimmering effect. To try and eliminate this 'noise' I also tried to find other compression formats for my flags, .tga conversions work for removing the shimmer but have other issues.

Yeah, a .dds replacement would be nice. At least it makes waterways look more real, until the the camera halts. :huh:

Good quest here D, keep at it. :)

Re: Experimenting - Soldiers - DDS to PNG

Posted: Fri Mar 28, 2014 4:25 am
by Davinci
The png files seem to work very good with the fences also; the default worm-fence is saved as a tga files with a size of 256kb.

The png file is only 30kb but as far as I can tell it doesn't seem to affect the game for better or for worse.

I would think that that would be a good memory savings with so many fences, but apparently not!

But, I like the look of the lighter brown fences, I don't really know if that is an accurate-looking-fence color but it blends in with the terrain.
The attachment Fence.jpg is no longer available
The attachment Fence2.jpg is no longer available
davinci