[Project] alternative input methods: "OMG-Input"
Closed, ResolvedPublic

Description

Krita already has excellent support for tablets. However, there is still shortcomings to having full control:

If you are on a low budget (at least regarding tablets), you'll usually only have x, y and pressure. A wad of extra money gives you another axis: "tangential pressure" in the form of the airbrush pen. A more expensive tablet gives you tilt, too. In any case, the input usually comes from just one arm/hand.

The proposal of this project is adding support for MIDI, OSC, and - if deemed worthy of our time - game controllers. Here's a quick overview of possible features/use cases:

  • Controling brush size and smoothing strength via two MIDI foot pedals - ossiferousrex posted a link to a video of this in TVPaint: https://www.youtube.com/watch?v=kijiFI3QIuE
  • Quickly switching between colors in a palette/brushes in a tag with the piano keys on a keyboard
  • Mixing colors from the palette by pushing multiple piano keys on a keyboard
  • Adjusting brush size/opacity/color params/... with sliders on a midi mixpanel or knobs on any controller
  • Using a X/Y pad from TouchOSC/QuickOSC/AndrOSC/... to pan over a canvas quickly
  • Using a fader to control zoom level and/or canvas rotation
  • Using a Joystick to provide brush tilt values (so that the tangent normal map brush engine can be used even with a cheap tablet)
  • With a grid of buttons (like a Launchpad or what TouchOSC offers) control "current layer", visibility/locked/alpha-locked/alpha-inherited of layers (or select layers)
  • Binding piano keys or buttons to different actions from the menu: undo/redo, deselect/reselect/invert selection, next layer/previous layer/...
  • Choose tools with piano keys/buttons: brush, selection, transform, multi-brush, bezier paths, ...
  • Bring different dockers into the foreground (if they are in a tabbed group), or cycle through different tabbed groups
  • Switch through documents or frames in an animation with piano keys/buttons/...

Obviously it's a challenge to allow a user to properly configure all of this without having to read a 1000 page manual. For this, I suggest an equivalent to "press the key you want to use" from the shortcuts menu: "Wiggle the knob/fader/... you want to use" etc.

Here's a few areas that still require some thought and design:

  • In order to make brush tilt and angular pressure available through extra input modes, it'll have to be considered even when the tablet itself provides it.
  • It must be possible to create arbitrary sensors that are fed via extra input modes, otherwise every brush preset would have to be configured individually and changes would have to manually be applied everywhere.
  • How should actions activated via extra input modes give their feedback? Especially when an action was requested that is currently not available? Perhaps using the same pop-up notification mechanism that zooming uses.
  • Since OSC is typically transferred via UDP, how much control does krita have to expose over where UDP packets are accepted from?
  • Some OSC apps on smartphones or tablets accept incoming OSC packets, too. They will then update their UI accordingly. Krita should make use of this for things like "have a toggle button for eraser mode", "show layer settings and current selection in button grid", "show zoom level/panning in faders/XY-pad", "show brush size/opacity/..."

"Drumstick", the library I'd use for midi support on linux, windows and mac, is licensed under "GPL 2 or later", which should be fine for this project, right?

tpaulssen updated the task description. (Show Details)
tpaulssen raised the priority of this task from to Wishlist.
tpaulssen claimed this task.
tpaulssen added a project: Krita.
tpaulssen added a subscriber: tpaulssen.
Restricted Application added a subscriber: woltherav. · View Herald TranscriptDec 6 2015, 11:42 AM
rempt added a subscriber: rempt.Dec 10 2015, 7:58 AM

Yes, gplv2+ is fine!

tpaulssen renamed this task from [Project] alternative input methods to [Project] alternative input methods: "OMG-Input".Dec 13 2015, 11:21 AM
tpaulssen updated the task description. (Show Details)

It seems like I will have to pull in another external dependency to get joystick/gamepad support.

I've got some experience with SDL and SDL2, as well as SFML. Of the three, SDL2 is my favourite. However, it may be a bit excessive to pull in all of SDL2 only for getting events from joysticks and regular game controllers ... Thoughts?

rempt added a comment.Dec 30 2015, 8:48 AM

Yes... That would be a big dependency! Not so much a problem for Linux distributions, but it would be a problem for our own builds, at least initially.

scottpetrovic closed this task as Resolved.
scottpetrovic added a subscriber: scottpetrovic.

I talked with timotimo and we are ok closing this out for now. A new ticket can get created if we need it.