Node-based brush designer (including mockups)

If I do get around to writing it, I will do it as a separate brush engine. However, I would make sure it can convert existing brushes into node brushes. Once all of the current features are available as nodes, it’s just a matter of creating the nodes based on the properties as they are read from the preset files.

Conceptually, it’s not actually that complicated to create. It just takes time to create the interface, and then creating all of the nodes and testing them will take a ton more time. Not something I can afford to invest in at the moment.

5 Likes

In Blackink, the brush design system is also based on nodes. You even can write a pixel processing function by yourself. Here’s a screenshot of how it looks like.

4 Likes

Wow, shader programming for brushes. This is kinda crazy.

The nodes are really basic operations, as far as I can tell from the screenshot. Not really easyer to understand than our current system but expected from a modular brush engine. Still a cool advanced feature.

3 Likes

Oh! That’s definitely much closer to what I was proposing for sure.

I’ll chime in just to say I love the idea of node-based brushes(actually seeing that Black Ink node-based layer system is sexy as hell too) and while I can’t do coding(although I do familiar somehow with c++ and can do not-very-complicated things and can help with that on occasion) I am definitely interested in such a feature.

One aspect of krita I don’t like that much(actually it can be translated to Photoshop etc as well) is the juggling the various submenus and checkboxes scattered everywhere inside the brush editor. Although node editor has a more steep learning curve it is definitely much more visually clear and self-explanatory.

Although I second the opinion it should be a separate brush engine with an option to convert existing brushes.

So I’m very interested in the development of this idea and maybe can be of some help at least as a tester.

1 Like

A number of us seem to be short of enough time to work on this solo but eager about the idea, would it maybe make sense to organise a low-key working group to do some planning and split the workload? I’m not that familiar with how project management works around krita forks, but I do have design and programming skills to offer.

I definitely see the point of making a separate brush engine for this to work with at this point. I think to get this to work we’d have to first get an extensible node editor framework working for Krita, which might be a good and non-intrusive starting point? Starting with the brush engine itself might be a bit too technical-first, and I think this is something that requires a lot of thinking about what would work and what might not.

3 Likes

You don’t need to fork :-). Just join us on invent.kde.org and phabricator.kde.org; phab is for planning and jotting down requirements and things like that. Invent is where you publish your merge request and get discussions about the actual code.

And if you hang out on the irc channel, you can ask questions and get hints about where to get started hacking.

I would be really excited to see something like this happen :slight_smile:

3 Likes

I think a node-based editor might resolve some of the limiting issues I currently have here:
"Perspective" Brush influence questions/suggestions
Some of it hinges on the order of operations, which is very difficult to make changeable in the current setup, but in a node-editor it would be quite trivial. It’d be both much clearer what things all affect the current brush, and you could use arbitrary effect orders. So I would absolutely love this kind of setup.

I’m not convinced that’s the case. First of all, it’s way more flexible and certain effects may be easier to pull off and some might be doable at all that currently just aren’t. The current brush engine requires you to go through long lists that don’t entirely fit into the menu so you gotta scroll and might not even notice some checkbox is checked and it’s actually quite cumbersome to troubleshoot. In a node editor, if there is no influence by something, there will not be a node. So for simple setups you can see at a single glance what might take some digging in the current menus. For more complicated setups either of them take time.
I don’t think a node editor would make this process slower. It might be about the same with some situations that take slightly more time and others that take less time.
But the added flexibility is a real benefit that the current design just can’t hope to match.

That might change with the Everything Nodes project that is currently in the works (but has only just begun) - and honestly I find Blender’s current approach in that department rather confusing despite being much simpler (in that there are as yet fewer features) than in Krita’s brush engine.

I also don’t think the general sentiment that 3D folks are just more used to nodes is entirely true either. Blender makes great use of nodes and so does, say, Houdini (Wherein that worflow REALLY gets to shine) but for the most part I’m not sure that they are that prevalent throughout 3D software. They are certainly on the rise though. So 3D folks had to settle in for this change. It had a learning curve associated with it, but it worked eventually.
And I think the same kind of trajectory can happen in 2D software.

Indeed, the entire node-tree for a given material also is visible in an automatically laid-out menu that handles all the nesting accordingly. It’s a really good tradeoff, imo, between simple and complex stuff. Really simple brushes won’t make it necessary to view the actual node tree at all, but complex stuff is gonna be confusing to look at in that menu, and it’ll be advantageous to look at all the nodes to get a better feel for what’s going on.

I think this is what’s meant:
This is two views of the same material. Once in the node editor, once in the materials tab. For really complex, deeply nested node setups it’s easier to just look at the node tree, but for simple stuff like this, all you need is in the materials tab, ready to be tweaked.


The right menu is entirely automatically generated based on the nodes.

I don’t think there is any situation where a proper implementation of these ideas would make that necessary. That being said, it’s already a problem due to different brush engines and stuff. Some options only work in certain engines, which can actually be confusing at times.

That’s fair. There are surely lots of details to carefully consider. The different brush engines among them.

I don’t think that’s really a problem. It’s more complicated to special-case things. A proper modular design might be technically complicated in that the combinatorial complexity is large, but actually it will be relatively easy to wrap your mind around as modules tend to make sense.

Yup, the order of operations is entirely fixed and no matter what choices you make there, there will be situations where the current choice is wrong.

The thing is I question that the current system is all that easy to read. I think in terms of that this will mostly be a wash.

4 Likes

As long as pen input type is a list on the node or something close I am good either way.

This seems like a very interesting addition. I love the current brush editor in Krita because of it’s ability to semi-arbitrarily map input properties to output properties with a curve, and that arbitrary mapping would only get easier in a node-based interface.

I’m also very used to node-based systems since I work in game engines and vfx software all day and they are very popular in there. It’s also true that nodes can turn into a nightmare of spaghetti if the UI is not carefully managed… but then again, that complexity is also very opt-in and since most people who use the brush editor at all probably use it quite a lot, I think it’s reasonable to trust them to not confuse themselves.

I’ve always thought of brushes as fundamentally being like a shader or particle system and I would be very excited to see this progress. Now all we have to do is make an “Arbitrary HLSL” blendmode so I can turn all of krita into a shader editor lol. (also, thanks for bringing up Black Ink @Venn @Vineyo , I’m definitely gonna play with that)

2 Likes

Node-based brush creation is an intriguing idea for sure but I don’t think this should be just another brush engine. I think the real potential of this idea is as a huge project to rework the brush engine system as a whole in the future.

  1. The first time you open the brush editor and create a new brush Krita gives you a pretty lean interface with just some values and sliders. Similar to SAI’s or Photoshop’s UI for brush properties. Hide away precise controls and niche features like dynamic pressure curves, texture offset and tip density. New users would feel less overwhelmed but still have plenty of power to create some great brushes while seasoned brush makers could use the simple UI draft a new tool.
  2. In the interface, add a button to “Open Advanced Editor”. Clicking the button, the UI would change to show the same brush as a node system instead. The nodes would then reveal more precise controls either directly on each node or as inputs/outputs. This is where more experienced (or daring) people could fine tune their brushes and/or add interesting dynamics.
  3. *In a perfect world there wouldn’t have to be so many different engines, but rather different components you tack on to each brush depending on what you need of them. So you would start out with a very basic brush but then be able to dynamically tack on components like “Mask Brush”, “Texture” and “Smudging”.

*I say this very dreamily since I know next to nothing about the feasibility of something like this.

2 Likes

Well if the nodes had their variables exposed in python would be rad. I have wanted the access a couple of them before and was not able to.

Like access node pen_input.pen_tilt as a random example. i am sure there would be use for it.

1 Like

I use blenders material node to create resolution-free brush drawing with curves. The problem with Bender is that there is a problem with their curve system that needs to be addressed.

Node-based brushes are honestly pretty amazing because the detail is infinite this really is the future.

Painting & drawing and animating to become resolution-free definitely is must 2 weeks ago a guy on my discord posted the same thing except using 3D geometry and materials.

The result was truly incredible. Something worth considering.

Gumroad will like people to what i am talking about

1 Like

I found a gpl program with “node brush”. It was made by Chengdu LittleA (who made Grease Pencil LineArt feature for Blender).

At present, it is in a very early stage. It only has Linux, and the brush system is very close to mypaint. But it may have some inspiration, and it looks really cool:


(https://www.wellobserve.com/index.php?post=20221222155743&pic=)

10 Likes

Yeah I was tracking this on twitter. Thanks for sharing

I was thinking the same idea about a node based system allow the end-user has a high level brush control interface made by brush maker, so that end-user won’t overwhelm by the underlying brush configuration when they just want to make some micro adjustment and can prevent them making the brush working not as intended by brush maker.

That looks very cool but also a lot like a UX nightmare

1 Like

There is now windows version:

I’m now playing it:

5 Likes

我去看了下官网,到目前还没有Windows版本吧,只有Linux版本 :astonished:

I went to check the official website, there is no Windows version yet, only Linux version :astonished: