Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add wacom (wintab) support #7

Closed
3 of 5 tasks
fredemmott opened this issue Dec 31, 2021 · 9 comments
Closed
3 of 5 tasks

Add wacom (wintab) support #7

fredemmott opened this issue Dec 31, 2021 · 9 comments

Comments

@fredemmott
Copy link
Collaborator

fredemmott commented Dec 31, 2021

  • in-process cursor
  • add DrawableTab subclass of Tab, move all existing tabs to it
  • intercept in external apps (injected DLL + WindowProc hook + IPC)
  • add drawing options (color, erase etc) to DrawableTab
  • tab/page navigation buttons

DrawableTab: this should be handled in the tab class rather than another layer to allow tabs to have special behavior, e.g. have buttons that you tap with the stylus, instead of drawing.

@fredemmott fredemmott added enhancement Enhancement to an existing feature feature and removed enhancement Enhancement to an existing feature labels Jan 24, 2022
@fredemmott
Copy link
Collaborator Author

There is not a supported way to get exclusive access to the tablet (https://developer-docs.wacom.com/intuos-cintiq-business-tablets/docs/wintab-faqs#how-can-my-application-have-exclusive-access-to-all-tablet-pen-events) - so this will require injecting the tablet handling code into the game, so that things continue to work when the game is the foreground window.

@Rolln-dev
Copy link

Any chance of Huion tablet support as well?

@fredemmott
Copy link
Collaborator Author

In theory, wintab doesn't support making things wacom-specific; whether it actually works in practice this depends on the quality of the hardware manufacturer's driver. Once Wacom tablets work, Huion tablets..

  • ... might 'just work'
  • ... might need VRK's special driver (I don't know what that actually does - if it's an alternative wintab driver for Huion, it should do the trick)
  • ... might need someone with a Huion tablet to send a pull request implementing dedicated support

@Rolln-dev
Copy link

Ok, I guess we see what happens!

@fredemmott
Copy link
Collaborator Author

Looking at Huion's configuration application screenshots, I suspect the tablet will work, but the buttons on the tablet won't

If that's the case, #19 and setting them to unusual key combinations in the Huion software is probably the easiest way to go, with the least interference with other applications

fredemmott added a commit that referenced this issue Feb 1, 2022
Draws a cursor only, and no tablet rotation

Add wacom (wintab) support #7
fredemmott added a commit that referenced this issue Feb 1, 2022
Add wacom (wintab) support #7
fredemmott added a commit that referenced this issue Feb 1, 2022
Doesn't need to be bound to pixel grid

Add wacom (wintab) support #7
fredemmott added a commit that referenced this issue Feb 1, 2022
Add wacom (wintab) support #7
fredemmott added a commit that referenced this issue Feb 1, 2022
This will allow using a texture/surface to for tablet data, and sharing it between the in-app view and main renderer

Add wacom (wintab) support #7
fredemmott added a commit that referenced this issue Feb 2, 2022
... scale is wrong, but you can doodle :p

Add wacom (wintab) support #7
@fredemmott
Copy link
Collaborator Author

image

That's a start :)

fredemmott added a commit that referenced this issue Feb 2, 2022
fredemmott added a commit that referenced this issue Feb 2, 2022
fredemmott added a commit that referenced this issue Feb 2, 2022
Add wacom (wintab) support #7
fredemmott added a commit that referenced this issue Feb 2, 2022
I didn't want to because encapsulation, but it's actually required for things to work :(

Add wacom (wintab) support #7
fredemmott added a commit that referenced this issue Feb 2, 2022
Tablet pen actions takes us from seconds-per-frame to frames-per-second; having feeder and viewer fight over the same texture leads to jittering

Add wacom (wintab) support #7
fredemmott added a commit that referenced this issue Feb 2, 2022
test-viewer is fairly representative of the experience in game, as it uses the shared textures

Better framerate to get better feel of how tablets feel

Add wacom (wintab) support #7
fredemmott added a commit that referenced this issue Feb 2, 2022
Works, as long as when injected:
- feeder is running
- tablet is attached

Next up: removing those requirements

Add wacom (wintab) support #7
fredemmott added a commit that referenced this issue Feb 2, 2022
fredemmott added a commit that referenced this issue Feb 3, 2022
Add wacom (wintab) support #7
fredemmott added a commit that referenced this issue Feb 3, 2022
fredemmott added a commit that referenced this issue Feb 3, 2022
Also, add erasing while I'm at it

Add wacom (wintab) support #7
@fredemmott
Copy link
Collaborator Author

fredemmott commented Feb 3, 2022

Basic but usable.

  • only tested with Wacom Intuos, but 'should' work with any tablet that supports wintab
  • assumes tablet is rotated 90 degrees clockwise
  • needs these settings:

image

Tip button ignored, any other button turns it into an eraser.

fredemmott added a commit that referenced this issue Feb 4, 2022
fredemmott added a commit that referenced this issue Feb 4, 2022
fredemmott added a commit that referenced this issue Feb 4, 2022
Allows more resource sharing, which greatly simplifies handling of tablet drawing textures

Add wacom (wintab) support #7
@fredemmott
Copy link
Collaborator Author

Calling this done; will open follow-up issues for enhancements.

@fredemmott
Copy link
Collaborator Author

Basics (drawing, pressure sensitivity) work with a Huion H640P, however, Huion only treat the pen tip as an actual button; everything else needs to be done through their software.

This means there will be no direct support for:

  • binding a Huion pen button to 'erase'
  • binding the buttons on the tablet itself

Supporting more functionality on Huion is probably best done by:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants