Barrel Rotation Input support [WIP]


#21

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)…


#22

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:


#23

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


#24

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:


#25

And zooming looks to works :wink:

What are your others patches about ? :grin:


#26

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.


#27

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


#28

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!!


#29

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!



#30

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

#31

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: