Feature request: to use two or more colors at the same time at the same brush tip

EDIT: This was originally posted on the request feature thread Use alpha channel in brush tips, or add an overlay tip and as such the phrasing in it may make more sense in that context.

Thanks for all the work done on this feature @Voronwe13 and @dkazakov !

This last feture @Voronwe13 put forward about the brush using two different colors can become very useful! I’ve just made a similar post on the last update to the Krita YouTube channel but I think here is the best place for it.

PS: Everything that I’m suggesting here might have already been implemented and I just don’t understand it. If that is the case, I’m sorry.

Feature request: to use two or more colors at the same time at the same brush tip.

Why: Traditional media painters normally mix two or more paints to get the color they want. But they don’t always bother to mix them perfectly (specially contemporary oil and acrylic painters) so to simulate that effect of imperfectly mixed paints this feature could be useful.

EDIT:: Why 1.5 : when using thinned down paint a similar effect happens, that I believe could be well represented by this function.

Traditional example: a painter mixes red and yellow to form orange, but doesn’t bother to do a good job at it so when the brush is applied to the canvas parts of the brush will be loaded with more yellow and parts of the same brush will be loaded with more red. When the stroke is pulled it leaves streaks of yellowish orange in some parts and redish orange in others.

Why 2: Because as I see the examples [edit: in the original thread] right now they simulate only the impasto effect of the light making things more white in the parts it hits directly and more black in the parts it puts in shadow. The thing is that light doesn’t really works that intuitively with colors it normaly also represents a change in hue and not only in value. For example:

So even if they are representing the light hitting the paint streek hue should also be changed and not only value.

Guesswork:
How I (a complete noob) think this may be implemented (and I could be far of base here - if so sorry :sweat_smile:) [take in consideration that I don’t really understand how it works under the hood so I’m reaching here]:

  1. Create a new option similar to how we can have control over the Color part on the brush engine (darken, mix, hue, saturation, value etc.) for the color to be controled not only by the pen pressure but relatively to the lightness of it too. For example I use some brushes with 5%
    “S” curve for hue variation on fuzzy dab or fuzzy stroke deppending on the brush to give the painting a more traditional feel. If the same idea could be applied not only to the pen settings but for the different lightness regions of the brush (my idea would be a gradient or a curve to control how much variation we could get in the lightness aspect of it.)

  2. Since it’s apparently going to use “Grayscale AND the alpha channel” to paint maybe this effect could be generated with mixing the two colors that are always selected for the brush (foreground and background) [That is why I think this may fit here -edit: previous thread - and not a completely new request thread since you have just used something similar on the way you’ve dealt with texture brushes.]

  3. Create a new option on the brush engine settings under Color>Source to use a internal gradient map, but that would need to be realtive to the colors selected in the foreground since painters are not normaly trying to make strange efects but just add some flair to one particular color they are trying to represent.
    Advantages: Customizable. This would have the benefit of loading multiple colors in the brush at the same time maping them to a complex gradient.
    Disadvantages: Too Customizable. Difficult to create brushes for. Maybe too resource intensive. This would need a partucular gradient maped for each brush and that gradient would take advantage of the many ways it can be customised but would need to make the changes relative to the selected colors because if the user had to remake te gradient map every time they changed color that would be impractical.

PS: Going only by the name of the function that Rámon Miranda @RamonM has put on YouTube [RGBA brushes] would it - theroretically - be possible to map 4 diferent colors to the brush tip? One to be translated for each of the 4 channels. (I don’t think that would be awfully useful to the end user but that could open the door for some cool features in the future.)

1 Like

I’ll have to think on it more, but I think it’s doable. I think I have access to the currently selected gradient when the brushtip is created, so I could use the brushtip as a map to the gradient instead of as a lightness map. This is the same thing I’m already planning to try with the texturing, so I already have an idea how to do it. This would satisfy #2, and I think #1 as well, if I understand you correctly (since you can use a custom gradient, or the FG/BG gradient).

#3 looks like it would be applied in the smudge brush engine, where the brushtip values could be treated as different smudge parameters instead of alpha. I just started looking into the smudge brush to try to get the Lightness option working there anyway, so I may play around with some ideas once I have a handle on how the smudge brush works (it’s pretty complicated at first glance, and I haven’t gotten past that first glance yet!).

Definitely some ideas to play around with, though I can’t make any promises that any of them will be ready by the next version. I’ll keep updating here with my progress!

1 Like

@Tim @Voronwe13 I have moved this to a new thread please continue the discussion here

If anyone is familiar with the one stroke painting by Donna Dewberry, this feature would be very useful in replicating her techniques.
https://www.youtube.com/watch?v=EGf7NlqwRJs

The other thing that would allow what you want (and much much more) is something I mentioned in the previous thread, which would be to add the option of a second brushtip that overlays the first, with the same full options of the main brushtip. This will be complicated to implement, and might have some serious performance issues, but once I have these lower-hanging fruit implemented, I’ll look at that.

One way of enabling this feature could be to make it possible set the brush color to a gradient and then set the gradient axis to change based on pen rotation, tilt direction, or stroke direction. The main issue would be preventing the gradient from transitioning too smoothly. I am aware that Corel Painter overcomes this issue by blending color on a mixer palette and then using a specialized color picker to select a color gradient from two adjacent blended colors. In the following video, the narrator explains this feature at the 5:25 minute mark:
https://www.youtube.com/watch?v=_b97dKCCG8A
Implementing this feature might require adding a CMYK/ subtractive pigment color blending mode, but I don’t believe that all digital painting programs with a color mixer palette feature include a subtractive/CMYK color blending mode (e.g. Paintstorm Studio, Artrage, Corel Painter).
I’m wondering if there is another way to include gradient color selection without having to add a mixer palette. I believe Krita used to have a mixer palette, but the feature was removed in later versions due to the issue of color blending modes on a computer screen.

I don’t know if this video adds more to the discussion than the video of Donna Dewberry, but here is another video of an artist demonstrating gradient painting with acrylic paints:
https://www.youtube.com/watch?v=CZ5vpGni7xA

@raghukamath Thanks

[quote=“Rigognos, post:4, topic:5543, full:true”]
If anyone is familiar with the one stroke painting by Donna Dewberry, this feature would be very useful in replicating her techniques.[/quote]

Thanks for the imput, that is the basic Idea even though this is not the effect I was thinking of.

I don’t really think that would be the best place to put you efforts in. It could all be too resource intensive and not pay off in the slighest.

I suggested it in the other thread because I think it’s an extension - a possibly time consuming one - of the concept of the RGBA brush implementation.

Here is the look I what thinking of:


[30 minute study by James Gurney]

You can see in the backgound paint that was problably mixed on the canvas - wet on wet - but on the face - specially on the cheek - it’s possible to see places where the paint was applied not being very well - and you can see it doesn’t need to be - some parts of the same stroke carring more red, some others more yellow. And that convays a style.

I also think this technology could be used to represent the way thinned down paint looks like when applied to canvas. A round brush can more or less scrape the center of the stroke if the pressure of the brush is too strong (1) or naturally if the paint is thinned down (2) while leaving somewhat thick deposits of paint in the borders of the stroke:

Saying like that it could even be a good alternative for watercolor brushes because the way it’s beeing handled under the hood in the brush engine right now id pretty similar but very resource intensive, but that is something to be seen in the future.

Why do I think this is an extension of the RGBA brushes and may be a problem if not implemented (I may be completely off base here): Offering other ways to interact with the alpha channel besides value but also hue, saturation etc just like the pen could prove very beneficial. And if @acc4 is reporting correctly and the mixing isn’t working very well that may be because the natural process is to be color picking mid tones betwen the colors to blend and if black is being contatly introduced to affect value all color mixing like this will tend to black:

Sleeping on it my three original suggestions I was tripping. now I think that it’s possibly more simple (for me as and end user at least) to put a new option to interect with either only the alpha channel or even all the 4 channels. [For example if the objective is to create thinned down paint effect it could be activated for the opacity, if to create un evenly mixed paint than the hue, saturation or value would come into play, etc.]

Here is a rough mock up (change options for settings for consistency):

I “undertand” - not as a coder - that it makes sense to put the options under the brush tip, but allowing these parameters to be linked or not, by choosing, to all or none of the already very structured brush propeties would make the users understand, deal and create new brushes much more easily.

The dream implementation would be to have all the paramenters be relational to the foreground color als long as that color is the one that krita opens with (white or alpha, no really sure), but when a backgroung color is picked it would treat each one of the colors as the diffent ends of the spectrum [maybe clipping the color space to the space between the two piced colors] to make intentional gradient making as the videos @Rigognos has posted that much easy - or probably not.

PS: I’m sory for being caried away by my own dreams and wishes for krita and possibly making the life of coders much more difficult. It’s just fun to dream about the possibilities.

2 Likes

If you objective is only to get that effect you could use a clone brush. It would acctually work very similarly even, in workflow, to the examples you presented.

If its just one task of whole the painting like painting the sky gradient the trouble to set it up woudln’t be that big, but to create a brush that looks like thin oils that could be repourposed and shared with other users that would be another story.

Haha, wow, a lot of information to unpack here :slight_smile: Not going to respond to everything, but I’ll use it all as reference as I work on these features. Thanks!

Currently I’m working on making the initial lightness option work in the smudge brush, and if I get that working, that may already achieve some of the effects you want. I’m hoping to have that ready in time to go into the next version.

After that, I think I’m going to implement a gradient map mode, where the brush tip value (in grayscale) maps to the currently selected gradient. Basically, the brushtip in grayscale is just a bunch of values between 0 and 1, and the gradient is just a mapping of color from 0 (left side of the gradient) to 1 (right side), so it’s pretty easy to see how it works. You could then make a tip that’s darker on the left, and gets lighter to the right, to paint in a gradient. Interestingly, you could actually re-implement the lightness mode and the original mask mode, just by creating the right gradients. There’s a lot of cool stuff you could do with it.

However, one thing that would be necessary to make that work well would be to increase the options for making custom gradients. Currently you can only make gradients with set colors. You can’t designate parts of the gradient to be the selected Foreground or Background colors. The current gradients that include those are hardcoded in.

Anyway, keep making related suggestions or refining the current ones here. I’ll keep checking here as I work on these things to see what makes sense to include in my efforts. Thanks!

2 Likes

Photoshop’s mixer brush can “sample” an area on the canvas and paint with that pattern. I’m not saying we should squarely copy this feature, but it’s indeed a way to paint multiple colors at the same time, and we should at least discuss its pros and cons.

Thanks for the input. What are the features of PS mixer brush that are not covered by the clone brush engine and the color smudge brush engine that you would like to see implemented in krita?

What I want is kinda like a clone brush that smudges colors, if that makes sense. But after re-reading the reply @Tim posted above I think he pretty much put it very thoroughly.

I’ve never used the mixer brush in PS but have tried to replicate its behaviour in Krita (not very successfully).

I see it used frequently and very effectively in artwork on artstation, so I would be happy to see something similar implemented.

If anyone has a Wacom art pen or similar digitizer with pen rotation detection, I’d like to see a demonstration of using this method to paint a flower like Donna Dewberry.
https://m.youtube.com/watch?v=XW57DQecAig

I have a Huion Q11k v2. It isn’t a wacom art pen but since it detects tilt it can offer the possibility of directional strokes.

So I dont have time to do a complete painting right now but it pretty much involves the process of setting up a gradient or swatch in another layer sample it with a clone brush and paining in a different layer.

I hope this example demonstrates the possibility:

It was done roughly for the changes in direction to be clear.

2 Likes

It looks like the clone brush is selecting from multiple areas of the gradient and not just one dab. This is a slightly different effect than I had in mind, but it could work for some effects, just not for painting flower petals exactly like Donna Dewberry. I’m sure there are ways around that though.

Just posting here in case people are following this but not the original thread it came from… I just submitted a merge request that includes the ability to use RGBA brushtips (like the DA_OilRGBA brushes) as gradient maps instead of lightness maps, so you can make brushes that can paint two or more colors at once. I also added support in the gradient editor to use foreground and background colors in custom gradients, so you can make gradients that adjust to your selected colors (other than the current built in Foreground to Background gradient). This should let you do everything you asked for above. When I get around to it, I’ll make some more brushes that show off this ability, but for now, here’s a simple gradient brush that’s good to show how it works:
GradientBrush2

You’ll have to build my branch voronwe/gradient4.3 to test it out, unless someone like @dkazakov wants to post a testable build here. I don’t seem to have the right scripts to build it at a reasonable size for sharing.

2 Likes

That is awesome!!!

Hi! Have you discuss something like “dirty mode” here? Watch video — https://youtu.be/SggZZmJ6hVw

1 Like