Spring reads PCXs preferentially over BMPs! damn you all to
Moderator: Moderators
Spring reads PCXs preferentially over BMPs! damn you all to
Gah! Subject line was too short. This needs to be fixed... at least BMPs don't crash the game apparently, but the problem is that spring will read any PCX unitpic before it reads a BMP unitpic, even though the BMP one is specified.
.. Never did for me when I still had the pcxs in the image dir... of course, that was several versions of the engine ago, but I don't see why that'd change. You have "buildpic=afg.bmp;" in the FBI, right?
On a semi-related note, I ran a test a couple nights ago. I batch converted the SWTA buildpics from 24bit BMP to DDS, JPEG, and PCX. Here are the results:
24bit BMP (perfect quality) = 3.39 MB
DXT1 DDS (compression artifacts not noticable in game) = 592 KB
50% compression JPEG (looks bad, but tolerable given spring's squashing) =344 KB
PCX: 3.34 MB
Surely, you say, JPEG obviously reigns supreme here. It's smallest, so the archive will naturally be smaller. Well, I'll let the results when compressed in a 7z archive, all with the same compression settings, speak for themselves (do note that the only difference between each archive is the filetype used for unitpics):
BMP: 11.4 MB (As seen in the current SWTA release)
DDS: 11.2 MB (negligible size difference, higher quality bmps go in for sure)
JPG: 11.0 MB (still not worth the quality loss)
PCX: 13.2 MB (obviously these aren't handled well by 7z)
So, with SWTA's 130ish units, the difference is only 400 KB with a very large loss in quality. There's no reason at this point to use anything other than BMP (even if you're doing an initial port from OTA, you should batch convert the PCXes!). 7zip basically cancels out any benefits gained from running image compression on the pics before compressing the entire mod itself.
On a semi-related note, I ran a test a couple nights ago. I batch converted the SWTA buildpics from 24bit BMP to DDS, JPEG, and PCX. Here are the results:
24bit BMP (perfect quality) = 3.39 MB
DXT1 DDS (compression artifacts not noticable in game) = 592 KB
50% compression JPEG (looks bad, but tolerable given spring's squashing) =344 KB
PCX: 3.34 MB
Surely, you say, JPEG obviously reigns supreme here. It's smallest, so the archive will naturally be smaller. Well, I'll let the results when compressed in a 7z archive, all with the same compression settings, speak for themselves (do note that the only difference between each archive is the filetype used for unitpics):
BMP: 11.4 MB (As seen in the current SWTA release)
DDS: 11.2 MB (negligible size difference, higher quality bmps go in for sure)
JPG: 11.0 MB (still not worth the quality loss)
PCX: 13.2 MB (obviously these aren't handled well by 7z)
So, with SWTA's 130ish units, the difference is only 400 KB with a very large loss in quality. There's no reason at this point to use anything other than BMP (even if you're doing an initial port from OTA, you should batch convert the PCXes!). 7zip basically cancels out any benefits gained from running image compression on the pics before compressing the entire mod itself.
Gnome, the size difference is not so negligible in a mod with 391 buildpics. It's a difference of about 7 mb between JPG and PCX compression, AFTER 7zipping. The reason bmps work fine for you is that there isn't a PCX waiting to take its place. Since AA has all those OTA units, the buildpics included with Spring take precedence. So for instance, if I use BMPs, the only unit the arm commander has which has a high quality buildpic is the Dragon Eye. This is because there's no "armeyes.pcx" in the ota content archive. And believe me, aside from the extra memory usage as Yeha mentions, JPG is the ultimate format for buidpics. At 85% quality, there is virtually no discernable loss to quality yet the filesize is 2.5 kb compared with 28 kb for a pcx or 12 for a BMP.
@Yeha, yes, I figured as much. That's why I tried DDS... all I got were white boxes regardless of the compression technique I used. Even with and without alpha layers on any of the DXT compressions.... just a white box ingame.
Armsolar.dds:

This is with DXT3 and an alpha layer. Same result without an alpha layer. Same result in DXT1 or 5. If ANYONE knows a way to fix this, PLEASE speak up!!
@Yeha, yes, I figured as much. That's why I tried DDS... all I got were white boxes regardless of the compression technique I used. Even with and without alpha layers on any of the DXT compressions.... just a white box ingame.
Armsolar.dds:

This is with DXT3 and an alpha layer. Same result without an alpha layer. Same result in DXT1 or 5. If ANYONE knows a way to fix this, PLEASE speak up!!
Hmm, alright Yeha, that makes it worth it then. I will keep the HQ BMPs around though, no point in throwing them out :)
http://wormhole.tauniverse.com/images/s ... sworks.jpg <-- filename speaks for itself. The jpeg compression hurts more than the dds'.
I'll try to find where the hell PS is storing the batch conversion script I had to create specifically to make those dds files... when I do, I'll get it to you.
http://wormhole.tauniverse.com/images/s ... sworks.jpg <-- filename speaks for itself. The jpeg compression hurts more than the dds'.
I'll try to find where the hell PS is storing the batch conversion script I had to create specifically to make those dds files... when I do, I'll get it to you.
-
- Posts: 704
- Joined: 30 Oct 2004, 14:14
Unbelievable. Just unbelievable. I have to believe what I'm about to say is complete bunk, since this engine is advanced enough that I'd think the devs would realize this problem and account for it... I'd think this except that I've seen it with my own eyes.
Someone add what I'm about to say to the wiki somewhere, as it's of great imporantance...
The following tags give a white box:
buildpic=armsolar.dds;
BUILDPIC=armsolar.dds;
buildpic=armsolar.DDS;
BUILDPIC=ARMSOLAR.dds;
buildpic=ARMSOLAR.DDS:
The following tags work:
BUILDPIC=armsolar.DDS;
BUILDPIC=ARMSOLAR.DDS;
Both "BUILDPIC" and ".DDS" MUST be capitalized. That's the whole problem and the whole solution to my problem.
Someone add what I'm about to say to the wiki somewhere, as it's of great imporantance...
The following tags give a white box:
buildpic=armsolar.dds;
BUILDPIC=armsolar.dds;
buildpic=armsolar.DDS;
BUILDPIC=ARMSOLAR.dds;
buildpic=ARMSOLAR.DDS:
The following tags work:
BUILDPIC=armsolar.DDS;
BUILDPIC=ARMSOLAR.DDS;
Both "BUILDPIC" and ".DDS" MUST be capitalized. That's the whole problem and the whole solution to my problem.
I can't come up with any other explanation. All I know is, if I use any of those "white box" combinations, that's exactly what I get... I can't explain it, I don't want to, I'm just happy that for some reason it's working. I can replicate the problem any time you want, if you want proof. Maybe it's something specific to my mod, or the fact that there's already similarly-named PCXs.... or something. Like I said, I'm just going to smile and nod.