| Author |
Message |
Burning Gundam Kell Dragon
Joined: 28 Sep 2003
|
Posted: Feb 26, 2004 04:19 Post subject: Creating Palettes |
|
|
I was curious if it was possible to create palette files on a mac. I have photoshop, so is there a way to create one? If not, may I send an ACT file of swatches and have someone convert them for me?
_________________ I don't think outside the box... I customize it. |
|
Matt H Dark Trooper Phase 1
Joined: 24 Sep 2003
|
Posted: Feb 26, 2004 04:31 Post subject: |
|
|
All the ways I know how to manipulate palettes involve PCs (or programs on PCs) somehow... unless you learn the specs of .pal files and ResEdit them or something.
|
|
The MAZZTer Death Star

Joined: 25 Sep 2003
|
Posted: Feb 26, 2004 13:21 Post subject: |
|
|
Palette files are one of the simplest binary files... (no header)
File format:
pal {
color[256]
}
color {
char r
char g
char b
}
Basically, what that says is every three bytes is an RGB color. Total of 768 bytes. Try saving your palette as a Photoshop pal, if the size is 768 bytes, it'll work with DF, I'm pretty sure.
_________________ http://www.mzzt.net/ | I am a respectable admin with a respectable sig. |
|
Burning Gundam Kell Dragon
Joined: 28 Sep 2003
|
Posted: Feb 26, 2004 23:22 Post subject: |
|
|
Thanks, I'll give that a try.
Also, I may need someone to edit the CMP file for SECBASE so it gives that kind of underwater fade kind of effect. It doesn't have to be perfect, but it would help with one of my levels.
_________________ I don't think outside the box... I customize it. |
|
Nottheking Kell Dragon
Joined: 29 Sep 2003
|
Posted: Feb 27, 2004 18:30 Post subject: |
|
|
Ask Matt H. He's definitely the lord of CMP... and desaturization seems to be his game...
_________________ Wake up, George Lucas... The Matrix has you.. |
|
Matt H Dark Trooper Phase 1
Joined: 24 Sep 2003
|
Posted: Feb 28, 2004 21:12 Post subject: |
|
|
The_Mega_ZZTer wrote:
Basically, what that says is every three bytes is an RGB color. Total of 768 bytes. Try saving your palette as a Photoshop pal, if the size is 768 bytes, it'll work with DF, I'm pretty sure.
It is true, a Photoshop ACT file is 768 bytes long, as a series of 256x3 bytes, like a DF PAL file. But there is one big difference - For the DF PAL file, the intensities range from 0 to 63 (limit of VGA mode 0x13). Photoshop ACT files, on the other hand, the intensities can range from 0 to 255. So a straight conversion probably won't work.
However....
You might try this trick: When you're in Photoshop, take some indexed color image and load in your finished, new color palette. Go to Image -> Adjust -> Levels. Towards the bottom of the window, it should say "Output levels: 0 255" with the two numbers as input fields you can change. Change the "255" to "63".
What this will do is seemingly darken the whole palette, as what was the brightest color, 255, is now lowered to 63. All the colors will be reduced accordingly. What was on a 0-255 scale is evenly reduced to a 0-63 scale. So all of the colors in the palette will have intensities ranging from 0-63, conforming with the DF standard. If you save this as an ACT file, it should be able to work as a PAL file, like The_Mega_ZZTer stated.
A few comments: The reduction of 255 to 63 is based on the idea that your brightest white is RGB value 255 255 255. If you are editing a pre-existing DF palette in Photoshop, the brightest white is 252 252 252. (This is because in converting the 0-63 to 0-255, the numbers are all multiplied by 4, and 63*4 = 252.) So keep this in mind. If you have a 252 in a 0-255 scale, when it's reduced to 0-63, the 252 will round to 62, not 63. (If your highest value in your palette is 252, not 255, consider changing the Output level down to 64 instead of 63.)
Also, on the PC, files are associated by their extensions. I can stick my Photoshop ACT file into DF simply by changing the .act to .pal. That might not be so easy on the Mac, as they use resource forks and such. So, once you have this binary palette file that should work in DF, you might have to further manipulate it into working, like by stripping the resource fork or running MacGober on it or something.
|
|
Burning Gundam Kell Dragon
Joined: 28 Sep 2003
|
Posted: Feb 28, 2004 23:17 Post subject: |
|
|
Ah, I did notice that the palette was darker when I loaded the DF PAL file (After switching the last 3 letters to ACT). That would explain a lot of things. Thanks.
_________________ I don't think outside the box... I customize it. |
|
Matt H Dark Trooper Phase 1
Joined: 24 Sep 2003
|
Posted: Feb 29, 2004 01:13 Post subject: |
|
|
And THAT can be fixed in the same way... by going into Levels and changing the Input levels to 0 1.00 63 (instead of 255) and changing the Output Levels to 0 252 (instead of 255).
|
|
|