Pressure Sensitivity + other Brush tool Improvements

I posted about this on an old Github issue, but pressure sensitivity is an important features for us artists. This + the new text tool (:star_struck:) would really help me make the switch from my ancient version of Flash. (I tried Inkscape, but pressure sensitivity was borked :dog:)

Another improvement would be better customizable brush smoothness. Last time I checked, brush “smoothness” was actually more like “brush hardness”. Setting the smoothness to 100 just makes the lines more uniform and pen-like instead of inky and brush-like. They deviate less from the way they were drawn. The lines are pretty smooth either way.
It’s also limited to a weird 65-100 range, which makes the difference hard to spot.

To get lower, more “brush”-y smoothing levels to work, try adjusting “wick/lib/potrace.js” turdsize variable depending on the brush radius. It seems to be responsible for removing tiny speckles of paint.
Or, (this might be better) you could scale down the drawn brush-image by a factor of the brush radius, THEN potrace it, then scale it back up. This will make all lines look the same no matter what radius they are drawn at. It will also allow tiny brush sizes to work. Currently, they don’t work.

1 Like

Oh boy, the paintbrush tool


Long ago I got pressure sensitivity to work with the brush tool. It looked really good, but the problem was that it was reeeally slow. The brush is pretty slow to begin with, and adding that extra step of changing the thickness based on pressure made it unbearable.

The brush is going to need some big changes to be comparable to using something like Paint Tool SAI, Gimp, FireAlpaca etc. I think what we need is a javascript guru to come help make it faster :weary:

1 Like

@zrispo, could we potentially add a pressure sensitivity experimental feature for now? Put it on a toggle and see if we can test it out / improve it as it goes?

1 Like

Hmmm
does the slowness actually come from the process of rendering the initial bitmap-looking stroke? (i.e. before smoothing)
Are you using WebGL/hardware acceleration to render that?

If the major slowness comes from querying the pressure drivers to determine how hard the pen is being pressed, maybe you could query it less often and then interpolate the different pressure levels during the smoothing process.

@kryptot7 I believe the slowness in the old pressure sensitivity version was mainly coming from the conversion step from a bitmap to an SVG. I’m currently experimenting with a Pressure.js + Paper Dripping Brush system and will let you know when you can test it! This should be much faster.