Smudge Brush Question(s) for artists

I haven’t actually checked out the clone brush engine yet, but I may look at it for ideas on how to implement a dirty brush. That being said, the smudge brush uses a temporary painting device to build the composite smudge, so I think it may just be a matter of holding on to that between strokes, and only clearing it if the user hits the “clean brush” button. That will be my first avenue of approach in implementing this, anyway.

I spent this weekend working on fixing the issue with smudge length affecting the color rate, because the more I think about it, the more I feel like that is unintended and/or unintuitive. I finally got it working tonight, and the solution was much easier than I thought. Instead of moving the smudge length check earlier, I have to keep it where it is, but then set the final opacity to whichever is higher: smudge length or color rate. I do need to do some more testing, to make sure everything still works the way it should otherwise, but so far everything seems to be working correctly.

The version that’s available right now in the nightlies can’t do that, but I added the option as part of adding it to the smudge engine, so I’m about to go in and make sure it works with the pixel engine as well. Basically, I added a pen pressure option for lightness strength, so you can set it to decrease with time or distance, or with pen pressure or tilt. Hopefully this should allow for making much more realistic impasto effect.

I know, I keep talking about all these new things, and haven’t submitted them yet. Hopefully really soon! I just need to do a bit of my own testing, and cleaning up the code a bit so I don’t annoy the main coders :slight_smile: but I think I have every feature regarding Lightness overlays/impasto effect that I planned on implementing working the way I want now, so pretty soon I should have it submitted to a branch others can test! :slight_smile:

2 Likes

Since it seems that you plan on implementing code from the clone brush to create a “dirty brush” feature, I thought it appropriate to bring up another thread where I mention a feature that might work well using code from the clone brush engine:


The idea for the feature mentioned in this thread is to be able to load a brush with a gradient of two or more colors on a brush to make shading easier and to enable certain painting techniques used to in natural media. Although @Rami demonstrates a method of painting gradients using the clone brush, it doesn’t quite achieve the affect I’m aiming for since the clone brush still shifts its area of selection constantly while painting.

What do you mean and have you checked the Clone Brush options? Because some of the new options I implemented recently, which aren’t switched on in the default preset, could be helpful.

1 Like

I’m not sure specifically what he means, but I do know that the sample area rotates with the brush (e.g. set to drawing angle). The end result is the gradient always remains oriented as the sample i.e. the shadow side remains on the same side instead of moving around to the opposite side as you sweep the brush tip around.

So if trying to recreate the leaf painting example he posted, the gradient wouldn’t be mirrored when you turn the brush to paint the other side of the leaf. I tried many different settings, but couldn’t find a way to do it.

I hope that makes some kind of sense - I’ve re-worded it several times, but it’s hard to explain! :upside_down_face:

Apart from that issue - I’d argue it’s not possible to emulate the technique properly as it necessitates a complex physical manipulation of the brush tip (you might be able to approximate the end result though).

2 Likes

I just looked through the code for the clone brush (after testing to confirm that the brush won’t paint rotated), and it just copies the data as is. The rotation only affects the shape (or outline) of the area that gets copied. Since that is a very non-intuitive interpretation of what a “Rotation” option does, I’ll see if I can set it to actually rotate the data that gets copied before it paints it. Once it does that, it might be able to do what you want. Either way, I think it makes the behavior of that option to be what a user would reasonably expect, which the current behavior is not.

Once I have it working, I’ll propose it as the following change: “Source point move” option will become three options: “Source point moves with brush”, “Source point scales with brush”, and “Source point rotates with brush”. If the second and/or third option are unchecked, the source will keep its size/rotation, but the data will be transformed appropriately to the size/rotation of the brush where it gets painted.

BTW, this may help me figure out how to implement another request I saw, which was to be able to rotate textures as they are drawn…

6 Likes

Yes!

Rotation and scaling affecting the copied image data would be a great addition for the clone brush, if that’s possible without a heavy performance impact.

So if I understand your idea correctly, those split source point options could be checked independently and would use the existing Size and Rotation options on the brush? One possible limitation I see in that case is that size ranges from 0 to 100%, so that would mean the brush tip can sample a bigger area and paint it scaled down, but you couldn’t magnify a small area.

With the current settings, that’s correct. Changing the “size” option to allow greater than 100% is a pretty simple change, though.

I did manage to get rotation working, kind of. I thought performance might be an issue, because I’m converting the data to a QImage, applying a transform matrix on it, then converting it back to the format used by the clone brush, but when I tested it, performance is fine. I just need to tweak the transformation, because it’s drawing a bit off, like the rotation isn’t quite centered properly. But now I know that in concept it’s not too difficult, and performance isn’t really an issue. And the transform matrix does both size and rotation, so size won’t cost anything extra.

I’ll keep playing with it in between working on other things, and if I get it working properly, I’ll submit it to the team, and post an update here.

1 Like

Cool! :sunglasses:

I’ve actually been having fun painting with the clone brush as it is - so any options you can add to open up the flexibility are very welcome! :slight_smile:

One thing I would find useful is to have a toggle for the sample layer selection; The ctrl-alt click to select previously sampled layer is a bit awkward to do repetitiously. I’m used to using ctrl to colour-pick from the canvas; it’s like second nature to me now - so I’ve quickly adjusted to using it for sample-picking on the fly. If I was sampling from another layer though I keep forgetting to ctrl-alt.

Oh! - And being able to hide the sample area outline would be good - as it can get in the way if it’s close you where you are painting!

The smudge brush seems to sometimes drift upwards and left as well, but not always strangely enough. Most noticeable with a small square tip without any size or rotation dynamics.

Hey guys, seeing clone brush is being worked on, I’v made request some time ago Clone tool from reference images, would that be possible ?

I discovered by accident that you can clone from another open file (on another tab or window). I’m not sure if you can display them side by side (I think you can but it’s not a feature I ever use).

You could also have a reference open on the current file on its own layer and sample from that layer onto the one you’re painting.

Not ideal, but kind of what you want… ish… :wink:

edit: It will also still sample from a layer if it’s set to hidden!

Yeah just that “ish” makes it a pain, constantly switching layers, moving them around when i can open few references and position them where I want them even outside canvas.

@ZigiZen If you change the standard tab behaviour of krita to the windowed mode you probably can sample from the other file like @Mythmaker suggested. The advantage of that is that you can even “crop” a reference buy making the size of the window smaller that the image itself. That’s use if you are making a portrait painting and you want to focus on the eye/nose/mouth for example and don’t want the rest of the image to cover you painting.

You can also try to measure buy sketching over the reference to measure distances, check color accuracy and so on.

I don’t think that those functionalities would be very difficult to implement on the reference tool but since the windowed mode will always be more powerful overall maybe the coders would do better to put their time into other functionalities.

1 Like

@Snudl Hmm, I haven’t been able to replicate that issue. I’m guessing from the image that your brush is in “smearing” mode with Color Rate turned off? If I can get more details on the conditions under which this happens, I might be able to figure it out.

Yes, Smearing mode and Color Rate off. The document was in 16-bit int LAB and RGB at first, and the drift at least temporarily disappeared when I closed it and reopened. I can just make a bug report, you don’t have to tackle all the problems :smiley:

I think it’s worth mentioning that tablets can develop issues - it’s not always the software (just in case)!

@Voronwe13 since you are working a little bit on the clone brush would you explore the possibility of implementing Smudge Length/Smudge Radius/Color rate - whatever is easier - for it since its a functionality that can be used to emulate Oil Paint impasto like you are trying with the RGBA brushes. ( Example of use )

The Mixer Brush on PS works basically like that. Its like the functionalities of both Krita’s Color smudge engine+Clone Brush engine working together at the same time.

I know nobody copies other software just because, but it’s a technique digital painters use in other software and simply cannot on Krita even though the functionality is apparently there just not offered to be used at the same time.

I appreciate very much the new stuff you are bringing to the table and how you are interacting with the forum by implementing the small requests and looking for feedback, I hope you continue like that.

So I looked up information on the Mixer Brush, and it’s almost identical to the smudge brush, just using different terminology, and a couple of added features (though it looks like it does not have the “dulling” option the smudge brush has). The “Wet” option in it as far as I can tell works exactly like smudge length. Both determine exactly how much of the existing canvas gets copied into the next dab. “Mix” is actually Color Rate, in a way, except inverted. 100% Mix is the same as 0% Color Rate, and 0% Mix is 100% Color Rate. “Load” is basically a distance modifier on the Color Rate. The exact method of mixing color and canvas is probably a bit different between PS and Krita, but the essentials are the same.

The only things I see that Mixer Brush can do that Smudge can’t, are the dirty brush, and the ability to pick the whole dab instead of a single color with the color pick. I have some ideas for how to implement those options into the smudge engine, but I’ll probably consult with the main developers to see how they might want it done.

3 Likes

Yes, It’s like I said in the beginning, the functionalities are there, one could say - and have said - that it doesn’t need to be changed., but as I said even though things are implemented they cannot be used to produce similar results.

I thought of saying that for “an artists” it makes more sense to implement that on the clone brush, since we know that that’s how we are going to be able to copy that from the canvas than burying that on the color smudge engine were people won’t necessarily think of looking for it.

But I realize two things: 1) It’s preposterous of me to think that I can speak for how all artists think, so a pool is definitely a better idea than following my suggestion, and 2) It sounds easier to implement one extra new thing into the color smudge engine than to to add a whole bunch of new features to the clone brush engine.

Thank you for giving it your time. Let me say that your work of late, specially since we in the forum can feel progress and the anticipation of shinning new things to come, has been much appreciated. keep it up! :slight_smile: