Getting Multiply Layer Mode to Respect Alpha

Currently using two layers in an Aseprite project. Bottom Layer = sprite color, Top Layer = shading (greyscale layer set to multiply).

However, when parts of the bottom layer have transparency, if anything is present on the top layer, it completely overwrites the alpha to fully opaque.

Is there any way to make the multiply layer actually multiply alpha? So that 255 alpha on top layer * 0 alpha on bottom layer = 0 alpha instead of 255?

Thanks!

hi, Strejl!
sadly, no. that’s how blending modes generally work. you’ll get same results in photoshop. for instance, if you apply “multiply” to white layer, the transparent parts of the layer below it will turn white as well.

what you’d need are masks, clipping masks (which i personally hate) or “stencil” and “silhoutte” blending modes from compositing softwares. but neither of those are available in aseprite.

so, all you can do for now is to ctrl+click on the bottom layer, hit ctrl+shift+i to invert selection, and delete the overlapping pixels from the top layer.
you can also preselect your bottom layer, hide the selection border with ctrl+h and work only in that area.

The parts that need to be transparent are all on the same layer, so in reality, it’s

L1 - Shading Layer (Set to Multiply)
L2 - Color Layer with 254 Transparency (I’m using transparency to encode data for a unity shader)
L3 - Color Layer without transparency

In theory, I could:

  1. duplicate the shading layer into an L1
  2. delete the L2 selection from L1
  3. delete the L3 selection from L0
  4. merge L2 with L0, so that only the shading for L2 pixels applies
  5. set the layer opacity for the merged L0-L2 layer to 254 for encoding.

But i’m unaware of a methodology I can use to operate like this on entire layers at once, since i have 100+ frames. Any ideas?

Thanks!