Were all those separate PIGs in D2 even necessary?

For Descent, Descent II and Descent3 level editing and modification assistance.
Post Reply
User avatar
Xfing
DBB Fleet Admiral
DBB Fleet Admiral
Posts: 2021
Joined: Mon Jun 15, 2009 3:03 am
Location: Ringing Satan's Doorbell

Were all those separate PIGs in D2 even necessary?

Post by Xfing »

I mean seriously, the differences between the given tilesets are subtle at most, and the levels don't lose any of their appeal if constructed on say, group a tileset (I believe this one is the most universalized pig). What's most interesting is that the palette swapping affect mostly the "main" or "themed" textures, for example the alien2 textures look horrible on alien1.pig, but decent on all other pigs. What was the point of having separate pigs instead of making all the textures look their best in a single one?
Descent 1,5: Level layouts done: 52/54 Secret level layouts done: 1/6
User avatar
Krom
DBB Database Master
DBB Database Master
Posts: 16039
Joined: Sun Nov 29, 1998 3:01 am
Location: Camping the energy center. BTW, did you know you can have up to 100 characters in this location box?
Contact:

Re: Were all those separate PIGs in D2 even necessary?

Post by Krom »

It was probably a hard limit in the engine such as not being able to load ALL the textures at once or some attempt to control memory usage at the time. So they split them up into smaller more manageable chunks and used them to put a theme on each world.
User avatar
Xfing
DBB Fleet Admiral
DBB Fleet Admiral
Posts: 2021
Joined: Mon Jun 15, 2009 3:03 am
Location: Ringing Satan's Doorbell

Re: Were all those separate PIGs in D2 even necessary?

Post by Xfing »

Well, dle-xp states the limit of textures in any single mine as over 900, and that's more than there are - both D1 and D2 exclusive, as well as the mutual ones. But yeah, I prolly see your point.
Descent 1,5: Level layouts done: 52/54 Secret level layouts done: 1/6
User avatar
Xfing
DBB Fleet Admiral
DBB Fleet Admiral
Posts: 2021
Joined: Mon Jun 15, 2009 3:03 am
Location: Ringing Satan's Doorbell

Re: Were all those separate PIGs in D2 even necessary?

Post by Xfing »

The biggest problem is that certain themes such as alien1, alien2 and ice throw a hue on the transparent layer, in case of both alien levels it's light brown, and in the ice levels it's blueish. The problem is that custom textures imported into the pog normally use white as their background, and therefore the editor fails to recognize it as transparent :(

What I need to do is to painstakingly edit the texture in the tedious built-in editor using the color it now considers as "transparent". And this has to be done every time, I tested it and simply copying the color in a graphics program is not enough - it will get slightly distorted and the textures you apply it to will still not be recognized as transparent where they should be (even though they look identical on the selection screen) and you'll have to replace the color pixel by pixel again. I wonder if there's an easier solution to that problem, since this turns editing custom textures in those 3 theme sets into a nightmare.
Descent 1,5: Level layouts done: 52/54 Secret level layouts done: 1/6
User avatar
Sirius
DBB Master
DBB Master
Posts: 5616
Joined: Fri May 28, 1999 2:01 am
Location: Bellevue, WA
Contact:

Re: Were all those separate PIGs in D2 even necessary?

Post by Sirius »

I managed to get GIMP to load and save the palette from one of the textures from ice.pig (same principle would apply to the others); I then removed the transparent and see-through indexes from the palette, and forcing custom textures into that palette proved simple enough. Unfortunately dithering actually looks horrible for game textures, so I didn't use that; it often required some color adjustment to get sufficient variety in textures though (a 4-color texture is not pretty). As you said, the custom palettes are a pain in the ass at textures they're not good at. In my case that was mostly browns; ice has very little coverage of that range.

BUT: I didn't have to work pixel-by-pixel.
User avatar
Xfing
DBB Fleet Admiral
DBB Fleet Admiral
Posts: 2021
Joined: Mon Jun 15, 2009 3:03 am
Location: Ringing Satan's Doorbell

Re: Were all those separate PIGs in D2 even necessary?

Post by Xfing »

Well I did, because I only tried to do it in the built-in texture editor (apart from the graphic program which definitely wasn't GIMP. I'll try your method). As for the custom textures, most of the ones I use aren't really "custom" in the strictest sense of the word, since I only import them from Descent 1. Some really amazing textures didn't carry over to D2, like the prison door texture used in like all hostage prisons in 1. Also, the door lights didn't carry over and they had a unique charm (though the D2 ones can be objectively judged as better). When inserting textures like these, or the D1-specific monitors, one has to alter the "transparent" layer if Ice or Alien 1/2.pig are used.

As for the titular question of this thread - I answered it to myself after a bit of investigation - the separate .pigs simply contain different color palettes, 256 colors each. Pig files like Descent 1's pig and groupa.pig are the best all-around for making multi-themed levels since their palettes are balanced and don't distort any texture significantly (groupa more so, D1's pig lacks some more widespread D2 colors - not many though). Ice.pig contains like 80 shades of blue alone, that's why the ice-themed textures generally look the best in that palette - the colors used in this palette that the other ones lack will be replaced by the most approximate color of the other palette. Alien2.pig is very poor in blues for example, so the water looks purplish in it.

Now the best solution would be a palette with ALL the colors in it so that ALL the textures are at their absolute finest look. Would that be feasible somehow? Or is the 256 color limit set in stone?
Descent 1,5: Level layouts done: 52/54 Secret level layouts done: 1/6
User avatar
Sirius
DBB Master
DBB Master
Posts: 5616
Joined: Fri May 28, 1999 2:01 am
Location: Bellevue, WA
Contact:

Re: Were all those separate PIGs in D2 even necessary?

Post by Sirius »

In regular Descent 2, yes, because the video mode it uses is 8-bit and palette-based. The only real way to go beyond it is to use different texture formats, e.g. the 32-bit TGAs D2X-XL supports. While I don't think Rebirth renders in 256 color anymore, it still uses the original texture format exclusively so is subject to the same constraints.

P.S. Addendum to what I said - while D2 doesn't support more than 256 colors at a time, it can still swap palettes, which is what it's doing with all the different .PIGs; it changes to whichever palette makes a given level look best. Back in 1996 that actually caused it to eat a lot of hard disk space, though, and funny enough it's hard to say whether it was worth it! I guess there was always the minimal install... it was something like 8 MB so likely would have read in the textures from CD-ROM.
Post Reply