Barrel Rotation Input support [WIP]

Just tested with Wayland, and it works too :yum: !
even if trying to edit the brush result in a crash :frowning: (probably not your code)ā€¦

Thatā€™s great! :smiley:
Maybe test a normal stylus that doesnā€™t have rotation-- you might notice it reports a bogus rotation value (probably +180 degrees instead of 0). Not sure how to fix that yet.

Also please test the rotation at varying ascension positions and with the canvas rotated.

Oh, you really should change the source= lines back to the original official mypaint repositories, if you havenā€™t already. I think I am going to make my master branches the combination of all my different patches, which will make it a lot easier to try out. So unless you want to test all my other patches. . :smiley:

The feedback cursor is an interesting issue. Itā€™s been mentioned before regarding brush size (the brush size indicator doesnā€™t respond to dynamic brush radius changes). I donā€™t know how feasible it is to fix that. The Mypaint GUI is not really aware of a lot of things, it just knows the basic raw input values, which are surprisingly not very useful. Ascension, declination and barrel_rotation, and most others, are computed inside libmypaint because the raw values areā€¦ well, uncooked I supposeā€¦ but I digressā€¦ :slight_smile:

Anyway, thanks for testing it and being patient enough to compile it! :smiley:

Waylandā€¦ haha. I just tried Wayland the other day and I had two cursors inside MyPaint. Veryā€¦ weird.

Yes I complied back from the official repo + your branch :wink:

I feel like there is maybe an issue with rotating the canvasā€¦ but I donā€™t know where and how to check the values.
I did a simple test: drawing with a customised knife brush and not rotating barrel while drawing, I draw vertical stokes and horizontal stokes, and one is thin the other is thickā€¦

Here is the brush:

And the result rotating the canvas, not the stylus:

Is canvas rotation influencing barrel rotation on the Art Pen ? they should be independantā€¦

On other topics, yes having this visual feedback on cursor would be great bit I have no idea how to achieve that ;p. Canā€™t libmypaint send the info to mypaint ? or maybe libmypaint should be in charge of drawing the cursor ?
Maybe in a second time ?

About Wayland, I had a crashy Xorg version theses last weeks because of several bugs (now solved), so thatā€™s why I tried Wayland. And Mypaint (git version) is the only drawing application supporting tablets on Wayland because itā€™s based on GTK3.
So this bring me back to Mypaint after 2 years on Krita, and in the meantime I integrated the Art Pen in my workflow for inking, which brings me to you :wink:

And zooming looks to works :wink:

What are your others patches about ? :grin:

Second test hodling the Art Pen stylus in another rotation. Looks to work finallyā€¦
Maybe my brush should be made in another way to show clearer resultsā€¦ Or we have to check the values.

Third test holding in another direction. This is working, I probably rotated the Art pen a little during th first tests, which confirm I need a visual feedback ;p

Under Helpā€“> debug you can print the input values to the console (start it from a terminal window). So, I was expecting the issue with rotation, sorry I didnā€™t mention that. I have another branch (view-zoom) that adds the canvas-rotation and zoom levels as inputs to libmypaint and then we can apply a correction to the various inputs to keep everything consistent regardless of zoom or canvas rotation. The pain is that a lot of my patches conflict with each other so there is no clean way to merge them all together at once. Thatā€™s why I think Iā€™ll just use Master as my branch for everything. I have a branch called all-newinputs that does this but it is out of date right now.

You might be interested in my AngleAttack branch. This adds an input that is really helpful for controlling the dab angle. You know how with a fat marker if you push or drag the marker the line will be narrow, but if move the marker side-to-side it will be fat? Thatā€™s what AngleAttack does. 0 degrees means the stylus is pointing in the direction you are moving. 180(or -180) means you are dragging it in the opposite direction that it is pointing, and -90 or +90 mean you are moving it side to side.

I have a few other patches in progress, Gridmap (aka surfacemap) lets you make patterns/textures or other weird stuff. RYBSmudge (inspired by AntiArtā€™s HCY mix) which allows yellow+blue to mix into green like ā€œrealā€ paint. Thatā€™s about it for nowā€¦ oh, curve-points is a branch that bumps up the number of points you can have on the graph from 8 to 64 points, which is nice for doing silly complicated brush shapes and stair-stepped patterns. Thanks for testing and feedback!!

Hey there @nylnook I have a branch here now that also includes a fix for the issue you had with the view rotation messing up the barrel rotation values. GIve it a shot if you can!

https://github.com/mypaint/libmypaint/tree/pen-rotation

If you want to try this branch easily, you can do:

flatpak remote-add --no-gpg-verify --user mypaint-master-repo http://flatpak-repo.manuq.com.ar
flatpak --user install mypaint-master-repo org.mypaint.MyPaint-PenRotation
flatpak run org.mypaint.MyPaint-PenRotation
1 Like

Thanks @manuq. It looks this is going to have to wait until libmypaint is reworked to accept new inputs more flexibly w/o breaking the API :-D. But it is definitely worth testing to see how we might handle rotation inputs that may be missing or not accurate. I havenā€™t checked how other programs handle it and I really should :slight_smile: