Back to the Vavoom Forum Archives


Forum

[How-To] Palette Editing Tutorial (Finished)

Sun, 18 Jan 2009 05:28:02

Karnizero

As I told here, i will explain how to create or modify a Doom Palette (this also works for Hexen, Heretic and Strife games). Some modern Source Port users (for example an ugly guy called F*rebrand <!-- s8) --><img src="{SMILIES_PATH}/icon_cool.gif" alt="8)" title="Cool" /><!-- s8) --> ) think that this is not useful, since the modern Source Ports can handle true color graphics without the need of a color palette. Well, they are correct, modern SPs are "palette-indepedents", but also, knowing how to change/create a palette, will allow us new effects, in a couple steps, without coding, and keeping lot of time, for example: -> Changing all original textures and sprites colors, without having to edit each of them. -> Making special effects without scripting/coding, for example fog effect -> Making certain game colors to be more bright/dimmer/reddish/blueish, etc... -> Change the fade effects when player dies, picks up an item, receives damage, uses radiation suit, etc.., without coding. If you want to keep a lot of time, and dont want to code for all those effects, the the Palette Editing is your friend. Lets start. [color=#FF8111:s90qavzk][size=150:s90qavzk]Basics on Editing a Palette[/size:s90qavzk][/color:s90qavzk] [u:s90qavzk]1.- Materials: you will need the next programs:[/u:s90qavzk] a) Duum. Yes, only Doom. You dont need a source port. You can even use Doom on DosBox. You will get the same results. Buy it on the nearest shop. b) A Lump editor, such as Slumped, XWE, Wintex, or any other. Im using Slumped. The lump editor is not for Palette editing, just for WAD manipulation. c) Inkworks. This is an important program. I will explain what this is for. You can download it here: [url:s90qavzk]http://www.doomworld.com/idgames/index.php?id=4890. Thats only a couple KBs. Download and uncompress it to any directory. d) The Gimp. This is a powerfull graphic editing program. This allows to change the colors from a palette. You can do much more things, but thats not important right now. You can download it from [url:s90qavzk]http://www.gimp.org.es/modules/mydownloads Well, thats all. Once you have all programs installed, you can continue. [u:s90qavzk]2.- Editing a palette with GIMP:[/u:s90qavzk] It's suposed you have already installed The Gimp. A palette, for Gimp, is a list of colors, defined as RGB colors. Each list element defines the amount of Red, Green and Blue ink, of that color. For example, the color RGB(255, 255, 0) is Yellow. The RGB(0,255, 255) is Cyan. And so on, to a total of 256 colors. 256 colors is the number of colors on Doom Palette. Other games can use more or less amount of colors. That depends on the engine. Now, we go to the path "C:\Documents and Settings\<user>\.gimp-2.6" (or the gimp version you have download). You will see a lot of folders. We are interested in a folder called "Palettes". Create on that directory a new simple text document. Edit it with notepad, and call it as "Doom.txt". Now copy into it this whole text:
GIMP Palette
Name: Doom
Columns: 16
#
  0   0   0	Untitled
 31  23  11	Untitled
 23  15   7	Untitled
 75  75  75	Untitled
255 255 255	Untitled
 27  27  27	Untitled
 19  19  19	Untitled
 11  11  11	Untitled
  7   7   7	Untitled
 47  55  31	Untitled
 35  43  15	Untitled
 23  31   7	Untitled
 15  23   0	Untitled
 79  59  43	Untitled
 71  51  35	Untitled
 63  43  27	Untitled
255 183 183	Untitled
247 171 171	Untitled
243 163 163	Untitled
235 151 151	Untitled
231 143 143	Untitled
223 135 135	Untitled
219 123 123	Untitled
211 115 115	Untitled
203 107 107	Untitled
199  99  99	Untitled
191  91  91	Untitled
187  87  87	Untitled
179  79  79	Untitled
175  71  71	Untitled
167  63  63	Untitled
163  59  59	Untitled
155  51  51	Untitled
151  47  47	Untitled
143  43  43	Untitled
139  35  35	Untitled
131  31  31	Untitled
127  27  27	Untitled
119  23  23	Untitled
115  19  19	Untitled
107  15  15	Untitled
103  11  11	Untitled
 95   7   7	Untitled
 91   7   7	Untitled
 83   7   7	Untitled
 79   0   0	Untitled
 71   0   0	Untitled
 67   0   0	Untitled
255 235 223	Untitled
255 227 211	Untitled
255 219 199	Untitled
255 211 187	Untitled
255 207 179	Untitled
255 199 167	Untitled
255 191 155	Untitled
255 187 147	Untitled
255 179 131	Untitled
247 171 123	Untitled
239 163 115	Untitled
231 155 107	Untitled
223 147  99	Untitled
215 139  91	Untitled
207 131  83	Untitled
203 127  79	Untitled
191 123  75	Untitled
179 115  71	Untitled
171 111  67	Untitled
163 107  63	Untitled
155  99  59	Untitled
143  95  55	Untitled
135  87  51	Untitled
127  83  47	Untitled
119  79  43	Untitled
107  71  39	Untitled
 95  67  35	Untitled
 83  63  31	Untitled
 75  55  27	Untitled
 63  47  23	Untitled
 51  43  19	Untitled
 43  35  15	Untitled
239 239 239	Untitled
231 231 231	Untitled
223 223 223	Untitled
219 219 219	Untitled
211 211 211	Untitled
203 203 203	Untitled
199 199 199	Untitled
191 191 191	Untitled
183 183 183	Untitled
179 179 179	Untitled
171 171 171	Untitled
167 167 167	Untitled
159 159 159	Untitled
151 151 151	Untitled
147 147 147	Untitled
139 139 139	Untitled
131 131 131	Untitled
127 127 127	Untitled
119 119 119	Untitled
111 111 111	Untitled
107 107 107	Untitled
 99  99  99	Untitled
 91  91  91	Untitled
 87  87  87	Untitled
 79  79  79	Untitled
 71  71  71	Untitled
 67  67  67	Untitled
 59  59  59	Untitled
 55  55  55	Untitled
 47  47  47	Untitled
 39  39  39	Untitled
 35  35  35	Untitled
119 255 111	Untitled
111 239 103	Untitled
103 223  95	Untitled
 95 207  87	Untitled
 91 191  79	Untitled
 83 175  71	Untitled
 75 159  63	Untitled
 67 147  55	Untitled
 63 131  47	Untitled
 55 115  43	Untitled
 47  99  35	Untitled
 39  83  27	Untitled
 31  67  23	Untitled
 23  51  15	Untitled
 19  35  11	Untitled
 11  23   7	Untitled
191 167 143	Untitled
183 159 135	Untitled
175 151 127	Untitled
167 143 119	Untitled
159 135 111	Untitled
155 127 107	Untitled
147 123  99	Untitled
139 115  91	Untitled
131 107  87	Untitled
123  99  79	Untitled
119  95  75	Untitled
111  87  67	Untitled
103  83  63	Untitled
 95  75  55	Untitled
 87  67  51	Untitled
 83  63  47	Untitled
159 131  99	Untitled
143 119  83	Untitled
131 107  75	Untitled
119  95  63	Untitled
103  83  51	Untitled
 91  71  43	Untitled
 79  59  35	Untitled
 67  51  27	Untitled
123 127  99	Untitled
111 115  87	Untitled
103 107  79	Untitled
 91  99  71	Untitled
 83  87  59	Untitled
 71  79  51	Untitled
 63  71  43	Untitled
 55  63  39	Untitled
255 255 115	Untitled
235 219  87	Untitled
215 187  67	Untitled
195 155  47	Untitled
175 123  31	Untitled
155  91  19	Untitled
135  67   7	Untitled
115  43   0	Untitled
255 255 255	Untitled
255 219 219	Untitled
255 187 187	Untitled
255 155 155	Untitled
255 123 123	Untitled
255  95  95	Untitled
255  63  63	Untitled
255  31  31	Untitled
255   0   0	Untitled
239   0   0	Untitled
227   0   0	Untitled
215   0   0	Untitled
203   0   0	Untitled
191   0   0	Untitled
179   0   0	Untitled
167   0   0	Untitled
155   0   0	Untitled
139   0   0	Untitled
127   0   0	Untitled
115   0   0	Untitled
103   0   0	Untitled
 91   0   0	Untitled
 79   0   0	Untitled
 67   0   0	Untitled
231 231 255	Untitled
199 199 255	Untitled
171 171 255	Untitled
143 143 255	Untitled
115 115 255	Untitled
 83  83 255	Untitled
 55  55 255	Untitled
 27  27 255	Untitled
  0   0 255	Untitled
  0   0 227	Untitled
  0   0 203	Untitled
  0   0 179	Untitled
  0   0 155	Untitled
  0   0 131	Untitled
  0   0 107	Untitled
  0   0  83	Untitled
255 255 255	Untitled
255 235 219	Untitled
255 215 187	Untitled
255 199 155	Untitled
255 179 123	Untitled
255 163  91	Untitled
255 143  59	Untitled
255 127  27	Untitled
243 115  23	Untitled
235 111  15	Untitled
223 103  15	Untitled
215  95  11	Untitled
203  87   7	Untitled
195  79   0	Untitled
183  71   0	Untitled
175  67   0	Untitled
255 255 255	Untitled
255 255 215	Untitled
255 255 179	Untitled
255 255 143	Untitled
255 255 107	Untitled
255 255  71	Untitled
255 255  35	Untitled
255 255   0	Untitled
167  63   0	Untitled
159  55   0	Untitled
147  47   0	Untitled
135  35   0	Untitled
 79  59  39	Untitled
 67  47  27	Untitled
 55  35  19	Untitled
 47  27  11	Untitled
  0   0  83	Untitled
  0   0  71	Untitled
  0   0  59	Untitled
  0   0  47	Untitled
  0   0  35	Untitled
  0   0  23	Untitled
  0   0  11	Untitled
  0 255 255	Untitled
255 159  67	Untitled
255 231  75	Untitled
255 123 255	Untitled
255   0 255	Untitled
207   0 207	Untitled
159   0 155	Untitled
111   0 107	Untitled
167 107 107	Untitled
Save and close the text file. Now rename it to "Doom.gpl". Your Gimp Doom Palette is finished, and ready to be used and modified. Now open The Gimp. Dont start a new image. We dont need to do that now. No, from the menus, go to "Windows > Dialogs > Palettes". That will open the Palettes Dialog. Select the "Doom" item from the list, and double click over the small image. Now you can edit each color from the palette. Use double click to edit an item. When you finish the modifications, save the palette before close it. Now create a new image ("File > New"). Create any size image. Thats not important. Now draw a couple of lines on the blank canvas. Then, go to "Image > Mode > Indexed". On the new window you will have to choose the palette. Choose "Custom Palette" and select the Doom palette you have just modified. Now, uncheck the checkbox with the text "Delete unused colors from the final palette". This is important. If you dont do this, your palette will not work. Finaly, save and close that image as a BMP image. Next, we will create the palette for Doom itself, and we can preview it. Execute Inkworks program. Dont get scared for all those letters and MsDos like window. We are not going to use them all now. On the menu (you can use mouse), go to "File > Import Base Palette". You will get a dialog. On that dialog, find the BMP draw you created with The Gimp. The, press OK button. If all is ok, then your palette should be loaded onto Inkworks. You can preview it before importing to Doom. You can click on any "Preview" button. Press Scape to exit preview. If you like how your custom palette looks, then you can export it to a WAD. Before exporting, you have to create a PWAD, so you can save it. Dont export the palette to an IWAD, or you will overwrite the original Doom palette. To create a PWAD, you can use any Lump editor. You dont have to create a lump. A PWAD with a only Colormap and Palette, is valid. Now return to Inkworks, and go menu "File > Export to Wad". On the new dialog, select the recently created PWAD. Close Inkworks, and open the PWAD. You will see there two files: "Colormap" and "Playpal". To test the palette in-game, simply add the PWAD to the command line parameters. Here goes a sample on a modified palette. I made all palette colors to look brownish, the blue colors as red, and gave a bit more brightness to the original red colors, making blood and red eyes to look a bit more terrifying: [img:s90qavzk]http://xs435.xs.to/xs435/09036/playpal432.png.xs.jpg[/img:s90qavzk] [color=#40FFFF:s90qavzk][Next Day: Modifying the fading effects][/color:s90qavzk]
Sun, 18 Jan 2009 14:46:41

Karnizero

[color=#FF8111:xqgec74m][size=150:xqgec74m]Modifying the Fade Effects[/size:xqgec74m][/color:xqgec74m] [u:xqgec74m]1.- Materials:[/u:xqgec74m] you will need the same programs as before: The Gimp, Inkworks, a Lump editor and Doom. [u:xqgec74m]2.- Changing the Fade Effects:[/u:xqgec74m] With this second Palette tutorial, we can change the game effects when we die, pick up an item, or use Invul/rad. suit. We dont need to edit the palette with Gimp, so that is an optional step. If you want a general custom palette, then you have to use The Gimp, and then import the palette into Inkworks, as we learn before. Now lets open Inkworks. In this second tutorial, we will use this program to modify the palette, but not the colors, just some palette definitions, such as fading effects. Once you open the Inkwork, you will get a MsDoS window like this next. You can see different elements. We will learn how to use some of them: [img:xqgec74m]http://img167.imageshack.us/img167/2619/inkworksmainiy6.jpg[/img:xqgec74m] Lets start modifying the "damage fading" effect. Actually, you cannot change the color the screen flashes when you take damage or die, by usin Inkworks. You have to edit the palette itself with The Gimp. As you see, there is a section called "Damage Fade". There you can change the feel of the screen flash when you take damage or die. You can click on the desired effect, and then on "Preview". Press ENTER on the preview screen to test your fade effect. Now lets change the color of the screen when you pick up the Invul. Artifact. On the section "Invulnerability Colour Range", you can set the color range of the screen when you take this object. You can think the Range is a list of color who will tint the screen, using those both colors and the intermediate colors brightness. For example, if you pick up the colors Red and Green, your screen will change to red and green colours, with different brigt values, but not the mix of bot colors (would be yellow on this case). An example for this: if you want the screen to feel like gold, you have to set a range of Yellow and Brown colours, going to Black. Finally, click on "Build Range and then on "Preview" to test your first screen effect. Press SPACEBAR to activate and deactivate the Invulnerability effect. Dont forget to build the range, or you wont see your changes applied. We will change the Radiation Suit screen effect, and the PickUp screen effect color now. This is easier than the Invulnerability effect. On the section "Miscelaneous" you have the "Radiation Suit and "Item Pick-up Colour" options. Click on the colors and choose your desired color. As you probably noticed, both effects are not a color range. This is because the whole screen will tint all textures and sprites with the choosen colour. You can also click on "Preview" to test those both effects. Well, i think it's enough for today. To test your new palette effect on the game itself, go to "File > Export to WAD". Select the PWAD you want to store your palette. Dont forget to create a PWAD with your favourite lump editor. And finally, run the game (you dont need a source port) and admire your work. [color=#40FFFF:xqgec74m][Next Day (will be next weekend): Fog, Underwater Feeling, Hell Ambience, Dust Fog][/color:xqgec74m]
Sun, 18 Jan 2009 14:47:46

Karnizero

[color=#FF8111:2cqw462v][size=150:2cqw462v]Fog, Underwater Effect, Hell Ambience, etc...[/size:2cqw462v][/color:2cqw462v] This is the last tutorial's chapter, and here we will learn how to make some nice effects, allowing us to change drastically the game feeling. [u:2cqw462v]1.- Materials:[/u:2cqw462v] although the title of this last chapter sounds pretty hard, those effects are quite simple, and your maps will look impressive. We will need only Inkworks and a Lump Editor. [u:2cqw462v]2.- Creating any king of fog effect:[/u:2cqw462v] First, execute Inkworks. Nearly in the top of the window, you will see a "sub-window" called "Distance Fade". This is what we will use right now. This is where we can change the color the game will fade to when the player is looking to the distance in a bright sector/s. Note that this effect is only viewable when the player is looking AT bright sectors, and not when the player is AT bright/dark sectors. This is, the efect is independant of the player's position in the map. Does not matter if the player is in a dark or bright sector, because the effect will be only viewable if he is looking directly to the bright sector from the darker one. Here is a screen showing the "Distance Fade" sub-window atop the main window: [img:2cqw462v]http://img167.imageshack.us/img167/2619/inkworksmainiy6.jpg[/img:2cqw462v] Choose a "weak" color, not a strong one, or the player field of view will be reduced drastically. An amount higher than 125 or 130 will make the game visualization a bit harder for medium - far distances. Some sample of a map with different Distance Fade values: [size=85:2cqw462v](click images to enlarge. Arround 200 Kb per image)[/size:2cqw462v] Original Doom Palette: [img:2cqw462v]http://xs435.xs.to/xs435/09045/nofog340.jpg.xs.jpg[/img:2cqw462v] Underwater feeling [RGB(10, 10, 80)] [img:2cqw462v]http://xs435.xs.to/xs435/09045/fog01764.jpg.xs.jpg[/img:2cqw462v] Hell Ambience [RGB(80, 10, 10)] [img:2cqw462v]http://xs435.xs.to/xs435/09045/fog02347.jpg.xs.jpg[/img:2cqw462v] Sandstorm [RGB(100, 80, 60)] [img:2cqw462v]http://xs435.xs.to/xs435/09045/fog03958.jpg.xs.jpg[/img:2cqw462v] For general reference, the sector illumination for the map in the image was 145 Doom light units. Thats all. I hope you enjoy those effects much. Cya next How-To. <!-- s:-D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":-D" title="Very Happy" /><!-- s:-D --> Note: if i have time this weekend, i will write this to the Vavoom Wikia. If not, the next weekend will be.

Back to the Vavoom Forum Archives