• jan@cosmigo.com

Indexed Layer Blend Modes


#1

Support direct blending of palette indices rather than only performing blending in RGB.
The result of the blending will remain indexed with the same palette.
Only useful indexed blend modes I can think of are add and multiply (maybe modulo?), but someone with a better imagination than me could probably come up with others.
Would be useful for emulating subpalettes for systems like NES, GBC, SMS, MD.
eg. Have a layer on top with indexed add blending, draw with base colour of subpalette to offset indices of lower layer to that sub palette.


#2

YES TO THIS.

Been meaning to post exactly this for a few months. Didn’t know it was already posted.
As for useful blend modes - I can easily see myself using at least half of the RGB blend modes already offered by PMNG as layer blend modes, because I like working with large palettes. Basically, what I’m usually after is creating some kind of a lighting effect (darkening or lightening a layer in certain spots) or changing something’s color/hue.
Non-destructive indexed layer blend modes would allow me to quickly and easily preview making useful edits to large areas of existing layers with no commitment or worry of needing undo if the result is bad. In practice, I would either delete the layer being used for a quick art change attempt or merge it down into the blend target layer and carry on if the blend result is good.

I imagine this working just like the brush modes work when you draw with the Paint Tool directly onto a layer.
But with an indexed layer blend mode the result of the layer blend operation would be snapped to the palette index nearest of the actual RGB blend operation - results depending on what colors are available in your palette.

As for ui, I think this may just constitute yet another toggle setting per layer, possibly adding a fifth status icon to the existing four on the right side:

But this is suggesting consuming even more precious ui space.

An alternative method to displaying these little status icons is demonstrated by Photoshop:

^ They’re only present, consuming space, if they’re ON. If not present, you know they’re OFF.
But Photoshop’s layer panel is different - it allows you to select multiple layers at once and change multiple layers’ settings at the same time. PMNG does not. As a result, hiding the lock icon from layers that aren’t locked is probably a bad idea - it’s always handy to have it visible whether on or off, imo.


Indexed layer blend modes would probably also affect alpha blending. A new indexed layer blending toggle may have a sub setting - whether it applies to alpha or not.


#3

The function @surt requested is already there. Please see the layer effect “Re-apply Color Palette”. Hit F1 to open the docs and try to understand my weird German-English explanations on that thing :smiley:
I’m not sure if it’s what you want but it’s basically what was requested, I think.
But… it’s working with “multiplication” it works by just adding indices. It’s not a normal blend mode limiting to the palette which is what you look for. (?)


#4

Dang that’s interesting. I’ve been messing around with the Re-Apply Palette effect.
Docs here - https://www.cosmigo.com/promotion/docs/onlinehelp/LayerEffectSettingsDlg.htm
The sample project linked in the docs is helpful, but very limited.


I’m still confused, tbh.

Re-Apply Color Palette is powerful but only seems to work for me if given the right “Add Indices” settings for the right job.
I’m not sure.

Let me describe what I’m actually trying to get PMNG to do for me -

It’s essentially very simple, and done in graphics workflows all the time - I just want to non-destructively alter the color(hue) of pixels while leaving their lightness alone as much as possible. So I can quickly and easily see differently colored versions of the same artwork, while not caring about how many similar colors I have to work with. If some shades don’t survive the blend operation, that’s fine.

BUT since I’m working in Pro Motion, I need the results to use only colors already found in my palette.

I might draw something in greyscale first then add color later.
Or I might have drawn something in full color, but then need to recolor it after the fact. I might lose some shades when I dynamically recolor the base pixels but that’s ok. That’s expected.
Once I get the results I’m after, I’ll merge the two layers together and clean up and finish it manually.
The fast blend operation saved me a ton of time, by letting me try any colors I wanted until I got the right result.


Check this out:

Pretend the “grey junk” layer is some random pixel art graphics.
“color junk” layer is where I want to paint various solid colors in order to dynamically recolor what’s underneath.

So I do that:

Then I change the layer blend mode of “color junk” to “Color”:

Cool. Looks just like Photoshop. It’s performing a standard RGB blending operation. Alright.
(When I was learning Pro Motion I actually assumed the blending result of layer blend modes would only result in colors found in my palette, given the indexed color-only nature of PMNG.)

No, now I want to limit the blending result colors to ONLY colors in my carefully crafted palette, which I intend to use for my entire project.
But I can’t. Not with layer blend modes.

This is my palette:

^ Plenty of shades similar to the colors I painted with in the “color junk” layer.

I’ve tried using the Re-Apply Color Palette layer effect instead but am getting unexpected results. Possibly because I don’t fully understand it yet.

One more image. This is what it looks like if I simply paint directly onto a copy of the big grey ramp using Tint mode with the Brush Tool:

^ This is exactly what I’m after. The underlying pixels have been altered to the nearest color in my palette, by combining the hue of what im painting with and the blend target pixels’ lightness/darkness (value).

Buuuut it’s destructive and I either need to ctrl+z or delete it and start all over again.

I’m trying to get PMNG to do this with layers, non-destructively.
Is Re-Apply Color Palette the answer?