Smudge Brush Question(s) for artists

I’m currently working on updating the smudge brush engine to use the RGBA brush tips to create an impasto (thick paint) effect in it, and because of some of the changes I have to make to make it work correctly, I’ve thought about other possible features that would be easy to add, and would like some input from artists who might use this.

One option that I was wondering about is a color length option… The idea behind it is to simulate a limited amount of paint in a brush. It would work by drawing color at the color rate for a while, then fade out the color rate until it’s just smearing or dulling (blending) without adding any new color. You reload the brush simply by picking it up and drawing a new stroke. It could be controlled by the pen sensor options like pressure or tilt. Because of changes I made to get impasto effect working, I’m already keeping track of how long the stroke has been going, so it would be easy to implement. The question I have is: would anyone find this useful? And if so, would you want it in the regular brush engine too? Please let me know!

I think there were some other options I had thought of, but can’t remember now. I’ll post them here if I think of them. Of course, if anyone else has suggestions for the smudge brush, feel free to post them here. I can’t promise what I’ll get to, but it will be nice to have all the requests for it in one place. Thanks!

6 Likes

Is that different to the current functionality? - I normally produce that effect using colour rate set to time or distance (with repeat switched off).

I definitely wouldn’t want that as an inherent quality if that’s what your asking? :wink:

The only feature I really miss is an option to pick the color from the canvas where I put the brush and have the brush stay dirty for a while until the temporarily picked up color is “empty” and returned to the brush’s base color or no color at all. Preferably with an option for how many percent of the canvas color is picked up, the rate the brush loses color and to automatically clean the brush after every stroke or not.

I use smudge brushes a lot and currently work around this by picking the color before every stroke manually by pressing ctrl to switch to the color picker, pick the color at the position where I plan to start my next stroke, do the stroke and repeat. Having a “autopick” function would be a real time saver when trying to simulate the wet paint on the canvas sticking to your brush.

Edit: While this can be achieved in part by playing around with smudge and color rate options, you can not take your mixed color on your “dirty” brush to somewhere else on the canvas without using the color picker again. And preset options like hue, value and saturation have no effect on the smudged portion of the color, only on the foreground color of the brush that is actually painted.

4 Likes

Hi Peter,
First, I want to say thank you to you and the Krita developers for the effort you all are putting into the RGBA brush.
Regarding the color length feature, if I understand you correctly I believe that feature already exists as @Mythmaker points out. @RamonM has at least one brush in the Digital Atelier pack that uses it, it is called DA Oil 12 Color Fade and fades color based on time and resets when you lift it.

1 Like

Some digital art programs have a “dirty brush” option or “auto clean” option for oil brush presets. The auto-clean option means the brush retains its original color with every stroke. The dirty brush feature makes the brush pick up color from the end of the last stroke and use it in the next. I have seen this feature in Artrage, Corel Painter, Paintstorm Studio, and Rebelle 3. Since I can’t find a demonstration video, I might have to create my own video to demonstrate if this feature is not quite clear to everyone.

4 Likes

Photoshop apparently has this as a separate tool called the mixer brush.

We already discussed this in another topic here, also with video:

Would be cool to have something like this in Krita for us who love to work with “wet paint”.

2 Likes

Ah, you learn something new every day… I hadn’t noticed those options before! That does exactly what I was thinking of, so no need to add it separately. Thanks for pointing it out to me!

I see several people mentioning the option of a “dirty” brush. An easy way to implement it would be to change the selected color to the dirty color when the brush is lifted, but I’m not sure that’s a good way to do it. That could fill up the “recently used” color palette pretty quickly, which might be annoying… Is that something you would want? And if it’s done that way, the color would carry over to a new brush when you change brushes… which might be a good thing. Or would you rather it be kept dirty without changing the selected color, which would keep the “recently used” palette from getting cluttered, but would probably clear when you switched brushes…

Now that I know about the time and distance controls for the options, I think a mixer brush can be made using the existing tools. Basically, set color rate to 50% or lower, and set the distance option to something like 100px (adjust to taste) with repeat turned off. Dulling mode seems the most appropriate (with smudge radius turned on), but I tried both, and smearing mode looks closer to how PS does it (in the video you linked… I don’t have PS to test). It looks like the only thing missing is the dirty brush option.

Anyway, I’ll look into making a dirty brush. I don’t think it will be too difficult to implement, the main question is how do we want to make it work from an interface standpoint. Thinking about it more, I think I like just changing the selected primary color at the end of a stroke. This also allows you to manually clean the brush by just selecting a color manually.

1 Like

I finally found a demonstration of the “Dirty Brush” feature for Corel Painter. This feature works similarly in Artrage except the interface in Artrage has a water glass icon for the user to click in order to manually clean the brush when dirty brush mode is used. Until a “dirty brush” feature can be implemented for the smudge brush engine, the next best alternative is to set Color Rate to 0% in the brush settings when blending color.
https://www.youtube.com/watch?v=A0JV2_n_sH8

1 Like

I don’t think the mixer brush can be replicated with the currently available tools - I’ve tried several times, but (not having used the real thing) it seems like it’s a kind of clone brush; like it’s grabbing the point of contact and replicating it as a stroke (possibly with a form of smudge). I’ve tried various methods, but if it is a clone then Krita’s clone engine doesn’t seem flexible enough to replicate it.

I too was thinking yesterday it would be cool to have a dirty brush function! To replicate natural media it would need to have variable colour across the brush tip (so - kind of like the mixer brush!). It would be even cooler if you could maybe use a palette to mix colours then grab some paint from it and apply the variable dab to the canvas.

I’m pretty sure I’ve seen that exact thing in a program before (probably painter but I can’t remember - it’s too long since I used it!). :thinking:

1 Like

While this looks like a decent workaround it unfortunately basically disables preset options like Hue, Value and Saturation because they only work on the actual painted color, not what is smudged or dulled. For them to have an effect it is crucial to have the brush to actually apply the foreground color to the canvas.

Picking the color at the beginning or end of a stroke and overwriting the currently selected foreground color sounds like a simple solution at first, however that also means that your brush can’t lose color over time and return back to its original color (because it is lost). Not only would this also mean that your color history gets cluttered it also would require you to save all your colors to a palete or something so you can “claen” the brush by selecting the color from the palette again, and now imagine doing this after every stroke.

I was thinking about this for some time because at first I thought I could quickly hack this into Krita myself, but it isn’t that trivial. I think we can make this work in an intuitive way is by adding an additional color that is different from foreground and background color, an additional square in the interface too, that shows the current “dirty” color of the brush. And of course the dirty color gets used untill it runs out (depending on the rate that was configured) and then it’s the selected foreground color gets used again.

1 Like

Also - I was messing around in Painter (other painter on iOS) and noticed its impasto effect looks similar to what you’re replicating with the RGBA brushes, but it diminishes as the stroke gets longer - this struck me a quite natural because you’d lose thickness as the paint on the brush diminishes, and also allows for spreading the paint around in a natural way.

So - just clarify; the impasto starts off thick, but thins as the stroke gets longer. If you sweep the stroke back across itself you smooth out the thicker paint.

I haven’t tried the RGBA brushes yet (apart from the early ones Ramon made), so not sure if there are fade options already that could do this?

I’m so glad I’m not a coder - trying to filter out a coherent vision from everyone’s differing ideas about the same function must be a nightmare! :grin:

I quickly made this naive mockup of how I would image the interface to look like.
Please excuse my Terible handwriting.

Of course the feature in Phtoshop for example works a bit different. As far as I can tell, it can also build up the mixed color over time instead of just picking it at the beginning of the stroke. I didn’t account for that in my mockup.

When painting I would expect the brush to pick the color from the canvas, mixing it with the currently selected foreground color and setting this as the temporary dirty color. While painting the dirty color gets used at the configured rate until it runs out and the selected foreground color is used again.

This would be already enough for me, but as I mentioned, the Photoshop brush does a bit more. From what I can see in the video it constantly picks new color from the canvas and mixes it in the current dirty brush.

I like the mockup! That definitely helps for envisioning how to implement your ideas.

From your description, it sounds like Photoshop’s mixing mode does what “dulling” mode for the smudge brush does. That mode constantly picks part of the color already on the canvas, and mixes it with the foreground color based on the Color Rate and the Smudge Length. The actual formula for dulling mode, as I understand it from reading the code, and as best as I can translate code into general terms, is:

Final color = x% foreground color + (100 - x)% canvas color
where x = color rate % * y
where y = the greater of 20% or (100% - smudge length%)

*note: final color is painted on the canvas at opacity = smudge length% * opacity setting%

So for example, if smudge length is 100% and color rate is 100%, and your selected color is green, and the canvas color is blue, your final color for a single dab would be 20% green and 80% blue. But, because most brushes have very close spacing, a single short stroke can have hundreds of dabs, and since the 20% green keeps getting added, but the 80% canvas color keeps changing to have more green in it, the 100% color rate of green quickly turns the stroke to 100% green.

Without smudge radius on, the canvas color is picked from the very center pixel of the brush (which is why there’s a warning when you use a “pierced brush” with dulling mode). Smudge radius is based on the size of the brush, and basically averages out the colors on the canvas within the radius, when it selects the color.

Smearing mode works similarly, except instead of applying the selected color from the middle pixel (or the smudge radius) to the whole brush, it basically just copies the entire image (just the current layer, unless Overlay mode is selected) under the brush into the new dab, and then adds the foreground color on top of that, using the same formula as above.

So it’s not completely straightforward, but the mixing mode (or “wet mode” as you call it in the mockup) can be replicated, as it’s basically just the inverse of Color Rate, but also affected by smudge length. The main complication is that smudge length is factored in twice, first when calculating the color % for color rate, then at the end for the final opacity. Anyway, play around with low color rates and different smudge lengths, and I think you’ll get something that comes pretty close.

The only thing completely missing right now, that I can see, is the ability to automatically keep the last color drawn between strokes. I might try saving the whole dab, instead of just the color, so it works both with dulling and smearing mode. Also, it could then do some of the things I’ve seen requested elsewhere in this forum, like painting two colors at once.

1 Like

In another series of threads, I pointed out a potential bug in how the smudge brush handles Smudge Length when Color Rate is set to greater than 0%. Fixing this bug may interfere with a few default presets though.

What you mention there is a product of that final calculation where the opacity of the dab is set to the smudge length * opacity setting. I’ll see if I can move that calculation to before the color rate is added, so color rate is not tied to smudge length, without adversely affecting other options… I don’t know if that will break expectations for how existing brushes work, though.

1 Like

Thank you for taking the time to create a thread dedicated to the smudge engine.
We had a discussion in another thread about banding that sometimes occurs in certain brushes, mainly brush with thin dabs and textures enabled.

I was wondering why the banding can occur in Krita and not in Photoshop or Clip Studio Paint. I tried doing some comparison test between the softwares but it’s still hard to figure out the reason for the banding, maybe it’s because I’m not familiar with the formulas,haha. Does it have something to do with the way each of the software handles sampling? Do you have insight regarding this behaviour?
I can provide some screenshots to show the comparison if you want.

1 Like

When you have a branch ready for testing, tell us. I cant wait to give it a try :D.

Just re-read that and thought I should clarify - I meant the flexibility with the settings available in the stable; not the underlying engine! :wink:

After my earlier post I started to doubt myself - so I had another play with the clone engine as it’s a while since I last tried. I did get some interesting effects with it - including a variable-colour smudge effect (sampling from a static point).

I got excited when I went into colour>painting mode as there’s an option labelled ‘source point reset before a new stroke’ which I thought might set the clone source at the point of contact (the start of each stroke). Alas it only resets the point to where you ctrl-clicked when you’re using the follow setting (source point move). That particular setting is what I’ve used before to create a smear-like effect by setting the source just behind the stroke (during my attempts to recreate the mixer brush).

Anyway - following that, I thought it might be a good idea to do some research into the mixer brush rather than keep guessing at it’s behaviour! :thinking:

Reading the description on Adobe I thought I’d got it completely wrong; but then I watched some videos (bit of a minefield as most of them seem to be about how to fake oil strokes on a photo!). From what I’ve seen I think the mixer brush is a combination of a smear brush with a clone tool, and the ability to set a ratio between the two.

This is what I noted at the time with Krita in mind:

‘Smear brush with variable colour rate length, combined with the ability to sample an area on the canvas like a clone brush. The selected colour can be combined with the clone; using a slider to determine the ratio of the mix.’

It doesn’t sound too complex, but I don’t know if the Krita code would allow for combining the colour smudge with the clone tool easily?

:nerd_face: