Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Brewtal_Legend

Changing sprite colors without pixel-by-pixel changing?

Recommended Posts

I was wondering. Is there a way to change sprite colors without editing each single pixel?

Specifically, doomguy's gloves. I really like the black gloves that some people have done for the vanilla and smooth weapon sprites. But there are a couple of other mods that have cool weapon alterations/new weapons that I would like to compile for myself with black gloves instead of the standard brown.

I was wondering if there was a quicker/easier way to change the glove color besides trying to translate and change every single sprite?

Any good (preferably free or maybe cheap) programs that could do this?

It's just something I would like to do but rarely have the time to sit down and do such a thing pixel-by-pixel unless I spent months on a little thing as such.

Just curious and thanks to anyone who has some good advise/solutions.

Share this post


Link to post

Almost any halfway decent paint program has a colour fill tool, that replaces all pixels of a specific colour to the one you want.

Share this post


Link to post

The problem with remapping the brown to black is that some colors are shared by the skin and the glove, to say nothing of weapons (like the shotgun's wooden stock). So you will need to do some manual editing with Gimp or Photoshop, it's not as simple as translating a color range to another.

Here's an illustration:


Notice how some of the gloves' pixels remain light brown, while some of the hand's pixels have turned gray, and most of the shotgun's stock has turned gray too.

Share this post


Link to post

would be cool if you could select just the area of the picture you want to remap

Share this post


Link to post
Mordeth said:

Almost any halfway decent paint program has a colour fill tool, that replaces all pixels of a specific colour to the one you want.

But usually, you want shading and highlights so a literal solid color fill won't cut it. Of course, most image editors will also allow you to tweak the saturation, brightness, contrast and hue of selections, so I'd recommend that approach instead if not using translation.

Gez said:

So you will need to do some manual editing with Gimp or Photoshop, it's not as simple as translating a color range to another.

It's not difficult at all, my method is usually to make multiple translations (for as many color ranges as I need) of a single image, manually draw a mask and then copy-paste stuff between the versions using those masks for shape and alignment purposes. Paint.NET is nice in that it preserves coordinates when copy-pasting between identically sized images.

Share this post


Link to post
Memfis said:

would be cool if you could select just the area of the picture you want to remap

+1. I've been doing many recolors, but always was limited to color ranges that weren't shared on multiple parts of the graphic. Otherwise I had to use GIMP to "split" a part of the graphic and only recolor that one, then merge with the Doom graphic again (50x more time spent on a single graphic). This "select area" feature would come in handy if it was available in SLADE3 directly.

Share this post


Link to post
scifista42 said:

+1. I've been doing many recolors, but always was limited to color ranges that weren't shared on multiple parts of the graphic. Otherwise I had to use GIMP to "split" a part of the graphic and only recolor that one, then merge with the Doom graphic again (50x more time spent on a single graphic). This "select area" feature would come in handy if it was available in SLADE3 directly.

I plan on adding some basic 'paint' features at some point, and this is definitely something that could be done with that.

Share this post


Link to post

Is there an easy to understand "for dummies" guide somewhere for color remapping with slade3?

Specifically, I want to change SHTA0, SHT2I0, and SHT2J0 from the psx final doom ssg to use the same cobalt blue kinda color from the smooth doom version of the n64 ssg.

Most of the time, whenever I even try to use color remap, There are no colors being displayed in the ranges. Everything is black, white, and grey.

Share this post


Link to post
Brewtal_Legend said:

Most of the time, whenever I even try to use color remap, There are no colors being displayed in the ranges. Everything is black, white, and grey.

Go to "Edit -> Set Base Resource Archive" and select path to your Doom 2 IWAD. Then everything should work correctly for you.

Also make sure that the sprites you're trying to remap aren't PNGs. They should be in a palettized format, commonly it's "Graphic (Doom)".

Share this post


Link to post
scifista42 said:

Go to "Edit -> Set Base Resource Archive" and select path to your Doom 2 IWAD. Then everything should work correctly for you.

Also make sure that the sprites you're trying to remap aren't PNGs. They should be in a palettized format, commonly it's "Graphic (Doom)".


Thanks. That did get the issue with everything being black and white fixed. I tried converting the pings to doom format, but unfortunately the d64 ones lost that cobalt blue look and just turned black.

I'm guessing there is no way to use those colors in the vanilla doom pallet?

Share this post


Link to post

This is the default Doom palette, you can find it as the first lump (PLAYPAL) inside each Doom IWAD. Software renderer will only be able to handle colours defined in PLAYPAL. OpenGL renderer can work with truecolor graphics in PNG format and actually display them in truecolor. So using a sourceport with OpenGL renderer might be a solution.

You can also make a custom palette (using a program like DOS Inkworks or better a new development version of SLADE3) and import it as PLAYPAL+COLORMAP into your wad. The number of colours is always limited to 256, though, so you'd have to sacrifice and remap some of Doom's default colours.

Share this post


Link to post

Doom 64 uses a different palette for each sprite! The shotgun has a full 256 colors to play with. Normal PC Doom has 256 colors for all sprites and textures. That means that a weapon sprite will not be able to use 256 different colors without looking extremely messy, since the colors will have to cover the whole spectrum of the entire game.

Like to make it short and oversimplify a bit, the Doom shotgun uses two long ranges of 32 colors, the metallic grays and wooden browns. That gives it 64 nuances of colors to play with; the other 192 colors of the palette are reserved to other things like cacodemons, pinkies, and marines. The Doom 64 shotgun has four times as many nuances of colors, and doesn't need to leave some palette slots to other things.

The result is that it's not possible to convert a Doom 64 weapon to PC Doom palette without losing a lot of color quality, since the color count will be divided by at least four.

So for Doom-64-ifying the Doom weapons, you'll need a different approach than palette remapping.

Share this post


Link to post

Thanks for the info guys.

btw, I have been trying with the color remaps. how exactly does saving them and loading them work? It wants me to save them as a translation but doesn't seem to show any difference in the editor. Will the translations work with vanilla?

Share this post


Link to post
Brewtal_Legend said:

Thanks for the info guys.

btw, I have been trying with the color remaps. how exactly does saving them and loading them work? It wants me to save them as a translation but doesn't seem to show any difference in the editor. Will the translations work with vanilla?

Put some sprites in your wad and then put an empty S_END marker after them. Now select a sprite and recolor it. As soon as you click OK, it should be recolored. Then select another sprite, and it will ask you if you wanted to save changes to the previously recolored sprite. Confirm. Them save the whole wad again. You can, of course, block-select multiple sprites and apply the recoloration to all of them. Then you'll have your recolored sprites inside your wad as you wanted.

Vanilla engine itself can't handle custom sprites if only some of the stock ones (=not all) are replaced. There are workarounds, but that's a complicated topic. When launching the wad in Chocolate Doom, just use -merge command instead of -file and the sprites will load properly. Advanced ports shouldn't have problems with custom sprites at all.

Share this post


Link to post
Brewtal_Legend said:

Thanks for the info guys.

btw, I have been trying with the color remaps. how exactly does saving them and loading them work? It wants me to save them as a translation but doesn't seem to show any difference in the editor. Will the translations work with vanilla?


Saving and loading the translations as text files is a handy way not to have to redo complex color remaps by hand all the time. Getting the translation strings can be useful for advanced port modding (primarily aimed at ZDoom, but it's partially compatible with Eternity too) since you can copy/paste them in ACS or DECORATE.

Translations don't work with vanilla of course. If you want to make changes that'll work with vanilla, you have to apply the translation in the editor and save the images. You can do batch remapping too, so it shouldn't be too much of a problem.

Share this post


Link to post

@ scifista42:

Thanks for the info about using the markers.

Bot sure what you mean by, "Vanilla engine itself can't handle custom sprites if only some of the stock ones (=not all) are replaced."

@ Gez
"Translations don't work with vanilla of course. If you want to make changes that'll work with vanilla, you have to apply the translation in the editor and save the images. You can do batch remapping too, so it shouldn't be too much of a problem."

you mean, do the translation, export it as an image, then import it back in? I'm not familiar with batch remapping or even what it is.

I'm very new (again) to Doom editing. I got into it little over a year ago, but have since dealt with a lack of free time, an HD crash, and interest in Quake Modding, which left me a bit stale on the concepts I had already learned a while ago and trying to re-learn. Plus now I have more of an interest in Vanilla editing rather than zdoom which is what I was doing before. I'm targeting Doom Retro at the moment.

Thanks again for all the help guys.

Share this post


Link to post

You don't need to export and reimport. You just need to click on "OK" rather than "Cancel".

Share this post


Link to post
Brewtal_Legend said:

Bot sure what you mean by, "Vanilla engine itself can't handle custom sprites if only some of the stock ones (=not all) are replaced."

If you select ALL sprites in Doom2.wad and copy them into your wad between S_START and S_END markers (and possibly recolor or replace them, it doesn't matter as long as you keep exact names), vanilla will run the wad without problems. But if you didn't reinclude ALL, but only SOME sprites, then vanilla will crash. Strange behaviour. As I said, you don't really need to worry about it, as long as you use at least Chocolate Doom (just don't forget to -merge the wad file).

Share this post


Link to post

I got the color remapping to work. So far I'm getting some things to look pretty decent.

What does colorize do exactly?

btw, anyone know if there are sprite sheet with parts of the weapons separated for easier editing? such as barrels, stocks, grips, hands, etc all separated?

Share this post


Link to post
Brewtal_Legend said:

What does colorize do exactly?

Changes the hue of everything to the color you pick. Basically, it turns everything to grayscale, and then multiplies the RGB values of the color you chose by the luminosity. Then if the image isn't truecolor, it gets colormatched to the palette, so the result can be very destructive especially if you pick a color that's not in the palette at all, like cyan for the Doom palette.

There's also tint. This one is more subtle, since it depends on a color and an amount. What it does is that it makes the weighted sum of the pixel color and the tint color, according to the value you chose. For example with 25% tint, the resulting color value is 75% source color + 25% tint color. You can see if you set it to 100%, it becomes a solid block of the tint color. And again, paletted images get color matched to the palette.

Share this post


Link to post

When I do color remaps, it keeps the same color remap for each sprite I select for some reason. How do I deselect the remap range translation?

Edit: NM. I figured that one out.

Share this post


Link to post

Change or remove the translation ranges that you're not using anymore.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×