I been having a lot of fun testing equation on Pegtop Blending Modes demo program, but I would like to know how to convert equation into something G’MIC can read.
For example - (sin(a/255)*b)*2
That’s a slight modified version of the equation that was already in the demostration program. How would I convert that to something G’MIC can read? Would it be nice if this was it own filter with opacity and blending mode options?
A means RGB of channel of every layer combined below the current layer, and B means the RGB channel of current layer. That applies to everything in the Peptop blending modes link.
I am reading the document, but the issue is that I find it a little long to read, but Peptop demo software certainly makes me really interested into making my own blending modes for Krita, and I start to understand how the coding works now and the syntax in Krita (I was looking at hard mix change commit for Krita, and I actually finally understand how to create new blending modes for Krita). There is the issue of building Krita that never works out for me under Windows, so I can’t create anything for it. I’ll build under Linux VM myself.
What does it mean to have a represent all layers below current layer? Is it an average blend?
If we had to 2 image layers only, the command would be as follows:
gmic sample tiger +blur 5 mirror. x ^
+fill. (sin(i#0/255)*i#1)*2 cut 0,255 append y
– this time I added a blur (copy)
– horizontally flipped that copy
– “^” means new line in CMD.exe
– “#” denotes the image it is acting on
– other commands as described in previous post
There is a quite simple way to create a new custom blending mode in G’MIC.
Let me explain it briefly.
There is a command blend in G’MIC that takes a blending mode bmode as a parameter, and then internally do a call to a command _blend_bmode, which can be actually defined or redefined by the user if necessary (to create new blending modes or modify the behavior of existing ones).
What you have to know is that in a _blend_bmode command, you’ll always have only two images selected, the first one being the base layer (so layer a with Pegtop’s convention), and the second one, the blend layer (so layer b). G’MIC expects you only modify the second image, with the result of the blending at 100% opacity, so in your case, implementing your new blending mode is as simple as adding :
This actually makes me think that a defining a Custom blending mode like this directly in the G’MIC filter Blend [standard] would be great. I’ll add this option hopefully in a few minutes
Here it is, new blending mode custom formula in the plug-in, to allow you to enter directly the Pegtop expressions to create your custom blending modes:
I have a question for the new blending mode custom formula. What if a becomes the destination layer/blend layer, and b, and c are the following layers below the destination layer? Or can you do multiple layer i.e with i#0? I find it easier to understand a,b,c… than i#0, i#1, i#2… Does this sound more efficient?