Is it possible to multiply and/or overlap Layers?

First of all thanks to everyone who’s helped me so far with this software. Coming from non node-based programming, it has been a challenge but is also very rewarding.

I’m wondering if there is a way to multiply Layers (preferably, Images could work too) so that they affect each others’ color? I.e. overlaying one Layer with another would give some combination of the colors present, like a transparency. For example, there could be a “background” Layer of a black and white image, with another Layer of red squares on “top”, such that the underlying image is colored red where the squares are present.

I’ve been driving myself crazy trying to find this functionality, but to no avail. For example, in the OpenCV library, there is a Multiply node (I’m still not exactly sure what the “scale” value is doing on this one). Any help would be appreciated! Thanks!

I see, so this is not currently possible? And the 2021.4 update is referring to Stride, right? So far I’ve only worked with Skia.

Skia has it own image blends but based on skia stuff, It should have an example in help browser, check for blending or blend…

1 Like

I recommend to switch to Stride for that kind of functionality. You can use a SkiaTexture, if you want to keep drawing in Skia, but apply TextureFX to the final image. However, in this case you have to take care of the aspect ratio of the final image on your own.

1 Like

Well this would create two internal renderers under the hood, so would not be recommended for performance hit… It’s always recommended to stay in the same framework until the presentation stage… e.g if you use SkiaTexture, use only one…

contrary to previous suggestions, i’d actually recommend you to stick to skia for a start. here is a solution for your initial question:

CombiningLayers.vl (8.6 KB)

1 Like

Hey all, thanks for the advice! I will definitely look more into Stride in the future, since it seems it has some added functionality even for 2D scenes.

Thank you for this patch @joreg. It is just what I was looking for. I guess the “SetBlendMode” node is the one that was eluding me.


This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.