-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Some Context
In most srgb painting apps (besides the ever awesome kirta), if the app even supports index colour images, changing the colourspace to indexed colour will stop most of the apps functions. For example in photoshop, you can no longer use layers, and most of filters and adjustment tools. This means for many GFX developers they have to go through a painful prcess of conversion, mid paint to get an idea of what it will look like, or paint in the index colour palette, which has its own set of issues.
There is a way for most gfx apps, even those without any index colour sport to paint in full srgb, with layers and access to all filters and see a realtime conversion of the entire document into your indexed colours, using any pal0 you wish.
This technique came to my attention via a old youtube video I found : Use indexed color with layers in Photoshop by ukiro : uTube
For my own needs I use imagemagic and a batfile to automate all this... the commands are...
- Create a 512k HALD image
- Index the HALD image to a paletted image (in this case a 1x256 or 16x16(8 virtual pixel) slade palette export)
- convert the indexed HALD back to sRGB 16bit
- convert the Indexed HALD to a CUBE file.
Image Magic Commands
- magick hald:8 -depth 16 -colorspace sRGB doom_hald.png
- magick doom_hald.png -dither None -remap pal0_slade.png doom_hald_indexed.png
- magick doom_hald_indexed.png -colorspace sRGB -depth 16 doom_hald_rgb16.png
- py png2cube.py doom_hald_rgb16.png name.cube --title "Title Seen in GFX App when loaded"
Once you have the .cube file, you can load the cube into a LUT Adjustment Layer (also known as a Colour Lookup Layer in Photoshop) and place it as the top layer of your document.. and now even though you are in sRGB, and have access to layers and all the power of your filters an wot not.. you can see a realtime version of your exact colours as they will look in doom once converted to the palette.
You can get a "better" updated version of the convert to cube python script, than you can find form the link in the original youtube video here (as well as a windows exe version) : PNG2Cube Converter for Linux and Windows
Anyway, I have this in a bat file so I can just type "doomcube palette.png" and outout a cube..... but I think it would make a cool tool for DT.
Actual Suggestion
I think as part of DImgConv, or maybe even as its own tool, a way to quickly turn custom palettes into .cube files would be a super useful tool to add to doomtools. It is something that most people do not even know is possible but makes making custom GFX so much easier to create for paletted wads. This is the type of thing that can take a esoteric "trick" and make it available to everyone by removing the need to install apps, know cli commands, run python or reproduce the steps in their gfx app of choice (assuming their GFX app can even do all that stuff).
For your consideration