Microsoft Surface pens does not send first events when moves #55589

Closed
opened 2018-06-22 19:59:24 +02:00 by Antonio Vazquez · 93 comments

Microsoft Surface Pro 2 using Microsoft Pen
Windows 10 64 bits
Pen driver update to last version.
Full system info: P736

Versions: Blender 2.79b, Blender 2.8 and Blender 2.8 greasepencil-object branch.

Areas affected: Any area of Blender using pen events: Texture Paint, Grease Pencil, etc.

When draw using a microsoft pen, the first events are missing. This problem is not present in Wacom products.

You can see the problems in a video created by @pepe-school-land : https://t.co/Od5T5csS1B?amp=1

To analysis the problem, we have added some printf lines to modal operator GPENCIL_OT_draw to print the events received (you can see them in the console window in the video)

 printf("Event: %d \n", event->type);
  if (event->tablet_data != NULL) {
      printf("Event: %d Pressure: %f\n", event->type, event->tablet_data->Pressure);
  }

Debug with the lines above, we have verified that the event is not received for the first movements of the pen and only after a while. After that, all events work perfect.

The error could be a driver problem, or maybe some threshold limit defined internally in Blender.

This error is important because a lot of new hardware is using this pen and the bug makes unusable the pen for Blender.

Microsoft Surface Pro 2 using Microsoft Pen Windows 10 64 bits Pen driver update to last version. Full system info: [P736](https://archive.blender.org/developer/P736.txt) Versions: Blender 2.79b, Blender 2.8 and Blender 2.8 greasepencil-object branch. Areas affected: Any area of Blender using pen events: Texture Paint, Grease Pencil, etc. When draw using a microsoft pen, the first events are missing. This problem is not present in Wacom products. You can see the problems in a video created by @pepe-school-land : https://t.co/Od5T5csS1B?amp=1 To analysis the problem, we have added some printf lines to modal operator GPENCIL_OT_draw to print the events received (you can see them in the console window in the video) ``` printf("Event: %d \n", event->type); if (event->tablet_data != NULL) { printf("Event: %d Pressure: %f\n", event->type, event->tablet_data->Pressure); } ``` Debug with the lines above, we have verified that the event is not received for the first movements of the pen and only after a while. After that, all events work perfect. The error could be a driver problem, or maybe some threshold limit defined internally in Blender. This error is important because a lot of new hardware is using this pen and the bug makes unusable the pen for Blender.
Author
Member

Added subscribers: @pepe-school-land, @antoniov

Added subscribers: @pepe-school-land, @antoniov

#61114 was marked as duplicate of this issue

#61114 was marked as duplicate of this issue

#60231 was marked as duplicate of this issue

#60231 was marked as duplicate of this issue

#57538 was marked as duplicate of this issue

#57538 was marked as duplicate of this issue
Author
Member

Added subscriber: @mendio

Added subscriber: @mendio
Author
Member

Added subscriber: @ideasman42

Added subscriber: @ideasman42
Author
Member

@ideasman42 Could you take a look of this?

@ideasman42 Could you take a look of this?
Author
Member

Added subscriber: @JoshuaLeung

Added subscriber: @JoshuaLeung
Member

Added subscriber: @LazyDodo

Added subscriber: @LazyDodo
Member

kinda feels like some gesture recognition layer is sitting on the evens until it determines, 'nahhhhhh it's nothing' could be worth looking into if we're getting a WM_TABLET_QUERYSYSTEMGESTURESTATUS message, and if we do report back we don't want any of it..

kinda feels like some gesture recognition layer is sitting on the evens until it determines, 'nahhhhhh it's nothing' could be worth looking into if we're getting a [WM_TABLET_QUERYSYSTEMGESTURESTATUS ](https://msdn.microsoft.com/en-us/library/windows/desktop/bb969148(v=vs.85).aspx) message, and if we do report back we don't want any of it..

The windows "Flicks" are disabled (or must be) , I forget mention in the video that programs like Krita, Sketch Book, Gimp are working fine without problem with the same laptop, only in Blender I notice this issue

The windows "Flicks" are disabled (or must be) , I forget mention in the video that programs like Krita, Sketch Book, Gimp are working fine without problem with the same laptop, only in Blender I notice this issue
Member

Out of curiosity is Krita set to wintab or pointer input? ( https://docs.krita.org/en/reference_manual/preferences/tablet_settings.html )

Out of curiosity is Krita set to wintab or pointer input? ( https://docs.krita.org/en/reference_manual/preferences/tablet_settings.html )

Good point, I was thinking on that in all my tests with playing diferent wintab drivres, windows flicks, programs options, etc but Krita works fine with both, wintab or pointer input. The only program that i found with similar problem is Mischief (2D drawing program) but as I comented in the video
Mischief can "recreate" the first part of the stroke

Good point, I was thinking on that in all my tests with playing diferent wintab drivres, windows flicks, programs options, etc but Krita works fine with both, wintab or pointer input. The only program that i found with similar problem is Mischief (2D drawing program) but as I comented in the video Mischief can "recreate" the first part of the stroke

Added subscriber: @mont29

Added subscriber: @mont29
Antonio Vazquez was assigned by Bastien Montagne 2018-07-23 10:07:30 +02:00

That’s gonna be hard for us to investigate, since afaik none of main devs have that kind of hardware? So I think it’s in your desk @antoniov ;)

I’d suggest you run Blender with --debug-events option, and then go checking in ghost event handling code what’s happening exactly.

That’s gonna be hard for us to investigate, since afaik none of main devs have that kind of hardware? So I think it’s in your desk @antoniov ;) I’d suggest you run Blender with `--debug-events` option, and then go checking in ghost event handling code what’s happening exactly.
Author
Member

I haven't this hardware either. I will try to instruct @pepe-school-land to make the debug.

I haven't this hardware either. I will try to instruct @pepe-school-land to make the debug.

Added subscriber: @mklemarczyk

Added subscriber: @mklemarczyk

If you need any help I have Surface Pro 4 with pen.

If you need any help I have Surface Pro 4 with pen.

Added subscriber: @ColbyKlein

Added subscriber: @ColbyKlein

I've fixed a seemingly identical bug to this locally affecting my Monoprice MP22. I compared it to my tablet test program and it looks like the primary issue was not specifically reactivating things on focus, and potentially violating wintab spec by initializing in an invalid state (apparently you have to open with context disabled if using certain flags, then enable after)fix-t55589.diff

I've fixed a seemingly identical bug to this locally affecting my Monoprice MP22. I compared it to my tablet test program and it looks like the primary issue was not specifically reactivating things on focus, and potentially violating wintab spec by initializing in an invalid state (apparently you have to open with context disabled if using certain flags, then enable after)[fix-t55589.diff](https://archive.blender.org/developer/F4100229/fix-t55589.diff)
Author
Member

Added subscriber: @Sergey

Added subscriber: @Sergey
Author
Member

@ColbyKlein I don't know how the tab events are handled, but it's good to know you had something similar in your tablet and that this fix solves the issue.

We need someone that knows how Blender events work to review your patch. @ideasman42 @Sergey Could you take a look at the patch?

@ColbyKlein I don't know how the tab events are handled, but it's good to know you had something similar in your tablet and that this fix solves the issue. We need someone that knows how Blender events work to review your patch. @ideasman42 @Sergey Could you take a look at the patch?
Member

probably easier if they look directly at D3573 which appear to be the same patch.

probably easier if they look directly at [D3573](https://archive.blender.org/developer/D3573) which appear to be the same patch.

Yes, both are the same diff.

Yes, both are the same diff.

Good to hear some news about that!

Good to hear some news about that!
Author
Member

@ColbyKlein We have been testing your changes in a Surface 4 and according to @pepe-school-land the problem is not solved (he did the test because I haven't a Surface)

Any idea? test?

@ColbyKlein We have been testing your changes in a Surface 4 and according to @pepe-school-land the problem is not solved (he did the test because I haven't a Surface) Any idea? test?

@antoniov hm, I see. I thought it was the same bug, since it matched what I was seeing, but it must be separate. This does fix my MP22 and possibly other non-Wacom tablets when drawing on GP objects though. Assuming the patch doesn't cause any regressions (I haven't noticed any at least), it'd still be good to merge.

I've also noticed there is an issue related to annotate, it (seemingly) activates on tweak, which has an unwanted threshold for drawing. This messed up my testing for a while after I'd fixed the regular GP issue and has a similar appearance.

@antoniov hm, I see. I thought it was the same bug, since it matched what I was seeing, but it must be separate. This does fix my MP22 and possibly other non-Wacom tablets when drawing on GP objects though. Assuming the patch doesn't cause any regressions (I haven't noticed any at least), it'd still be good to merge. I've also noticed there is an issue related to annotate, it (seemingly) activates on tweak, which has an unwanted threshold for drawing. This messed up my testing for a while after I'd fixed the regular GP issue and has a similar appearance.
Author
Member

@ColbyKlein I don't know enought the event code to answer your question about commit your change or not. Could you ask to Campbell or Sergey (they know how works this area)

@ColbyKlein I don't know enought the event code to answer your question about commit your change or not. Could you ask to Campbell or Sergey (they know how works this area)

OK. I have updated the revision title/summary to reflect the test result.

@Sergey @ideasman42 can one of you review D3573?

OK. I have updated the revision title/summary to reflect the test result. @Sergey @ideasman42 can one of you review [D3573](https://archive.blender.org/developer/D3573)?
Author
Member

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Author
Member

The problem was resolved using the "official" Microsoft Pen.

The problem was resolved using the "official" Microsoft Pen.

Added subscriber: @MaciekGliwa

Added subscriber: @MaciekGliwa

@antoniov Hi Antonio. I have surface book2 15' and official Microsoft Surface Pen and I can definitely still see the issue in all builds of blender 2.8 :(. The latest build I just tested is from October 13.

@antoniov Hi Antonio. I have surface book2 15' and official Microsoft Surface Pen and I can definitely still see the issue in all builds of blender 2.8 :(. The latest build I just tested is from October 13.
Author
Member

@MaciekGliwa The problem disappears when you use the "official" Microsoft pen... any other pen gets the error.

@MaciekGliwa The problem disappears when you use the "official" Microsoft pen... any other pen gets the error.

@antoniov I am using the latest official microsoft pen and there is definitely an issue at the beginning of the stroke, it is not correctly registering the movement of the pen. I can record my screen and share with you the video of what is happening exactly.

@antoniov I am using the latest official microsoft pen and there is definitely an issue at the beginning of the stroke, it is not correctly registering the movement of the pen. I can record my screen and share with you the video of what is happening exactly.

With the latest official microsoft pen works better because "reconstruct" the first part of the stroke, with others pens the first part of the stroke is not created, but yes,
is definitely an issue at the beginning of the stroke in blender

With the latest official microsoft pen works better because "reconstruct" the first part of the stroke, with others pens the first part of the stroke is not created, but yes, is definitely an issue at the beginning of the stroke in blender

@pepe-school-land I see what you mean. Yeah, it creates a stroke, it is just that the very beginning of the stroke is always a straight line. It makes it really difficult to draw "circular" shapes, especially when you draw on a small section of the screen.

@pepe-school-land I see what you mean. Yeah, it creates a stroke, it is just that the very beginning of the stroke is always a straight line. It makes it really difficult to draw "circular" shapes, especially when you draw on a small section of the screen.

Yes, is really really annoying, a little trick is if you make a "double click" taping twice in the screen, now you can draw small circle.
I have the same problem with MIschief (link)
but not with Krita, photoshop, mypaint, etc,

Yes, is really really annoying, a little trick is if you make a "double click" taping twice in the screen, now you can draw small circle. I have the same problem with MIschief [(link)](https://www.madewithmischief.com/downloads/mischief-free/windows?submitted=1&email=pepe%40ere.es) but not with Krita, photoshop, mypaint, etc,

@pepe-school-land Ahh, thanks for the tip! Also (please correct me if that is off topic) but I also noticed that grease pencil is super fast on my another desktop computer with wacom tablet (cintiq 24hd), but on my surface book 2 15' with pretty much exactly the same specs it is much much slower. Did you experience that on your surface book Daniel? (I saw that you use one on the video you shared)

@pepe-school-land Ahh, thanks for the tip! Also (please correct me if that is off topic) but I also noticed that grease pencil is super fast on my another desktop computer with wacom tablet (cintiq 24hd), but on my surface book 2 15' with pretty much exactly the same specs it is much much slower. Did you experience that on your surface book Daniel? (I saw that you use one on the video you shared)

Be sure that you have the surface attached to the keyboard base, GP need a proper graphic card and the Nvidia card is in the base not in the screen part

Be sure that you have the surface attached to the keyboard base, GP need a proper graphic card and the Nvidia card is in the base not in the screen part

@pepe-school-land Sorry my bad, after investigating for quite some time I found out that my battery setting wasn't set to "best performance" on the windows task bar, once I set it correctly now blender is blasting fast, yay! Now if only we could get that little issue with stroke solved it would be perfect.

@pepe-school-land Sorry my bad, after investigating for quite some time I found out that my battery setting wasn't set to "best performance" on the windows task bar, once I set it correctly now blender is blasting fast, yay! Now if only we could get that little issue with stroke solved it would be perfect.

yes the issue with stroke is so annoying in deed, can you check if you have the same problem with mischief link

yes the issue with stroke is so annoying in deed, can you check if you have the same problem with mischief [link](https://www.madewithmischief.com/downloads/mischief-free/windows?submitted=1&email=pepe%40ere.es)

@pepe-school-land Ok, so I was just about to return my surface book to store after restoring the entire windows system to factory settings when I read your email....lol...so I actually installed everything back again to test mischief. And it actually works with no problems at all!

I am very much on the fence with Surface Book 2 15'. The specs are great, but the microsoft pen is horrible to use because it has only one button which is super hard to press. And there is no alternatives to the pen, bamboo ink pen apparently doesn't support surface book 2 15'....

Might just return it and see if there will be better pens in the future and you guys will figure out the pen drivers in blender.

I will have Surface Book for few more days so if you want me to test anything just let me know, I will gladly do it.

@pepe-school-land Ok, so I was just about to return my surface book to store after restoring the entire windows system to factory settings when I read your email....lol...so I actually installed everything back again to test mischief. And it actually works with no problems at all! I am very much on the fence with Surface Book 2 15'. The specs are great, but the microsoft pen is horrible to use because it has only one button which is super hard to press. And there is no alternatives to the pen, bamboo ink pen apparently doesn't support surface book 2 15'.... Might just return it and see if there will be better pens in the future and you guys will figure out the pen drivers in blender. I will have Surface Book for few more days so if you want me to test anything just let me know, I will gladly do it.

Added subscriber: @Lutz-Scharf

Added subscriber: @Lutz-Scharf

I registered here for the first time just to comment:

I'm using an HP x360 laptop with an HP active pen and have the same problem. I installed WinTab drivers because Blender does not support Windows Ink and since then the pressure sensitivity works great.

However, I experience the same problem where Blender does not register the first part of the stroke und only seems to accept a "click" when the pen starts to move.

I hope this problem can get fixed soon-ish, because working with 2.8 and a pen is simply put AMAZING. Nothing even comes close to the productivity I can achieve in texture painting - and of course with Grease Pencil.

I registered here for the first time just to comment: I'm using an HP x360 laptop with an HP active pen and have the same problem. I installed WinTab drivers because Blender does not support Windows Ink and since then the pressure sensitivity works great. However, I experience the same problem where Blender does not register the first part of the stroke und only seems to accept a "click" when the pen starts to move. I hope this problem can get fixed soon-ish, because working with 2.8 and a pen is simply put AMAZING. Nothing even comes close to the productivity I can achieve in texture painting - and of course with Grease Pencil.

Changed status from 'Archived' to: 'Open'

Changed status from 'Archived' to: 'Open'

Added subscribers: @bugreporter, @midije-2

Added subscribers: @bugreporter, @midije-2

Added subscriber: @brecht

Added subscriber: @brecht

See #57538 (Windows 10 Pen input) for more investigation on this topic.

See #57538 (Windows 10 Pen input) for more investigation on this topic.

Added subscriber: @a_blender_user

Added subscriber: @a_blender_user

I find how to resolve this problem
setting -> device -> pen and window ink ,then check this
you can setting follow my picture

2018-12-15_161225.jpg

my English is terrible

I find how to resolve this problem setting -> device -> pen and window ink ,then check this you can setting follow my picture ![2018-12-15_161225.jpg](https://archive.blender.org/developer/F5959553/2018-12-15_161225.jpg) my English is terrible

In #55589#580863, @a_blender_user wrote:
I find how to resolve this problem
setting -> device -> pen and window ink ,then check this
you can setting follow my picture

2018-12-15_161225.jpg

my English is terrible

Hi, would you mind sharing a screenshot in English? Google Translate says "Please allow me to use the pen as mouse in some desktop applications". I do not have that checkbox in my settings.

> In #55589#580863, @a_blender_user wrote: > I find how to resolve this problem > setting -> device -> pen and window ink ,then check this > you can setting follow my picture > > ![2018-12-15_161225.jpg](https://archive.blender.org/developer/F5959553/2018-12-15_161225.jpg) > > my English is terrible Hi, would you mind sharing a screenshot in English? Google Translate says "Please allow me to use the pen as mouse in some desktop applications". I do not have that checkbox in my settings.

Same here. I do not have that checkbox in my settings.

Same here. I do not have that checkbox in my settings.

my windows10 version is rs5

Screenshot_20181215-220429.jpg

and my computer is surfce pro4 use surfce pen
and i installed wintab driver

my windows10 version is rs5 ![Screenshot_20181215-220429.jpg](https://archive.blender.org/developer/F5961909/Screenshot_20181215-220429.jpg) and my computer is surfce pro4 use surfce pen and i installed wintab driver

Thanks! I do not have a Surface device but the Windows version SHOULD be correct. I suppose this is workaround only available to Surface.

I will try to find out if this can be activated on my HP laptop as well.

Either way, this does not make this less of a bug, because I don't think Blender wants to be a "legacy application" in this area, especially with Grease Pencil as its new feature.

Thanks! I do not have a Surface device but the Windows version SHOULD be correct. I suppose this is workaround only available to Surface. I will try to find out if this can be activated on my HP laptop as well. Either way, this does not make this less of a bug, because I don't think Blender wants to be a "legacy application" in this area, especially with Grease Pencil as its new feature.

some applications (like pint tool sai,Photoshop cs3) use “ wintab ” don’t have pen pressure on win10 tablet,I guess blender use “wintab”

other applications (like clip studio pro) use“ tablet api“ is ok


grease pencil is great tool :)

some applications (like pint tool sai,Photoshop cs3) use “ wintab ” don’t have pen pressure on win10 tablet,I guess blender use “wintab” other applications (like clip studio pro) use“ tablet api“ is ok **** grease pencil is great tool :)

Added subscriber: @thomason1005

Added subscriber: @thomason1005

Added subscriber: @ChristopherPeerman

Added subscriber: @ChristopherPeerman

I've just put this pull request which should help https://developer.blender.org/D4203

I've just put this pull request which should help https://developer.blender.org/D4203

This issue was referenced by 19fba61d46

This issue was referenced by 19fba61d46a6e54d0a85a88f36bd150ec3df97b4

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

Sorry, has this made it into the daily builds by now? Neither of them (blender-2.79.0-git.d753726ce712-windows64, blender-2.80.0-git.7f40d553f903-windows64) fix the issue for me (Toshiba/Wacom Pen on Windows 10 convertible, https://developer.blender.org/T57538). Thanks for your efforts!

Sorry, has this made it into the daily builds by now? Neither of them (blender-2.79.0-git.d753726ce712-windows64, blender-2.80.0-git.7f40d553f903-windows64) fix the issue for me (Toshiba/Wacom Pen on Windows 10 convertible, https://developer.blender.org/T57538). Thanks for your efforts!

#55589 has not been resolved.

I am using the Microsoft Surface Book with Microsoft Pen. The first events still do not show in Grease Pencil drawings.
After it was announced that it was resolved, I downloaded builds after January 14 and still have the same problem.
Is there a certain build I should be using that has the fix?

#55589 has not been resolved. I am using the Microsoft Surface Book with Microsoft Pen. The first events still do not show in Grease Pencil drawings. After it was announced that it was resolved, I downloaded builds after January 14 and still have the same problem. Is there a certain build I should be using that has the fix?

Changed status from 'Resolved' to: 'Open'

Changed status from 'Resolved' to: 'Open'

It should be in all the latest builds.

@ChristopherPeerman, any other ideas for solving this?

It should be in all the latest builds. @ChristopherPeerman, any other ideas for solving this?

The builds after January 14 work with my HP x360 laptop and HP pen.

I installed WinTab drivers, maybe this is the crucial difference?

The builds after January 14 work with my HP x360 laptop and HP pen. I installed **WinTab drivers**, maybe this is the crucial difference?

With the Microsoft Surface Book and Surface Pen.
I use the wintab drivers also. The issue is as described. If I draw a horizontal line and then try to start at the horizontal line to make vertical lines starting at the horizontal. The first part of the verticle lines do not start at the horizontal line. There is a delay before ink starts.

With the Microsoft Surface Book and Surface Pen. I use the wintab drivers also. The issue is as described. If I draw a horizontal line and then try to start at the horizontal line to make vertical lines starting at the horizontal. The first part of the verticle lines do not start at the horizontal line. There is a delay before ink starts.

I just tried the latest blender-2.80-3d8cbb534f82-win64 build on my Surface Book and it is working fine on there. I don't have the WinTab drivers for the Surface Book installed, I do however have the drivers for my Wacom Bamboo installed. When I get the chance I'll try different combinations of drivers and see if that has any effect. Are there any other settings you may have changed at all? I'll take a look through the various Pen & Ink settings and see if this makes any difference.

I just tried the latest blender-2.80-3d8cbb534f82-win64 build on my Surface Book and it is working fine on there. I don't have the WinTab drivers for the Surface Book installed, I do however have the drivers for my Wacom Bamboo installed. When I get the chance I'll try different combinations of drivers and see if that has any effect. Are there any other settings you may have changed at all? I'll take a look through the various Pen & Ink settings and see if this makes any difference.

I just tried enabling the 'LegacyPenInteractionModel' which a few people have recommended around the internet using the following commands and it definitely doesn't work with the fix. I'll take a look and see if I can work out any ways of improving it with legacy mode enabled.

Enable (from Administrator command prompt):
reg add HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Pen /v LegacyPenInteractionModel /t REG_DWORD /d 1 /f

Disable (from Administrator command prompt):
reg add HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Pen /v LegacyPenInteractionModel /t REG_DWORD /d 0 /f

@midije-2 could you check if you're using the current version of Windows 10. Also if you've added the following key to your registry could you remove it (or set it to 0) and see if that fixes it or not?

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Pen]
"LegacyPenInteractionModel"=dword:00000001

I just tried enabling the 'LegacyPenInteractionModel' which a few people have recommended around the internet using the following commands and it definitely doesn't work with the fix. I'll take a look and see if I can work out any ways of improving it with legacy mode enabled. **Enable (from Administrator command prompt):** reg add HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Pen /v LegacyPenInteractionModel /t REG_DWORD /d 1 /f **Disable (from Administrator command prompt):** reg add HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Pen /v LegacyPenInteractionModel /t REG_DWORD /d 0 /f @midije-2 could you check if you're using the current version of Windows 10. Also if you've added the following key to your registry could you remove it (or set it to 0) and see if that fixes it or not? [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Pen] "LegacyPenInteractionModel"=dword:00000001

I am running the latest Windows 10 Version 1809.
I did try the legacy command a while back and then reverted back after it did not work. The last 2.8 build I used was posted on the 18th. This evening I will download the latest 2.8 Build and delete the wintab drivers and try without. Where can I get the Wacom Bamboo drivers?

I am running the latest Windows 10 Version 1809. I did try the legacy command a while back and then reverted back after it did not work. The last 2.8 build I used was posted on the 18th. This evening I will download the latest 2.8 Build and delete the wintab drivers and try without. Where can I get the Wacom Bamboo drivers?

For my CTH-470 tablet I got the driver from here https://www.wacom.com/en/support/product-support/drivers. I did my test earlier with the Wacom drivers uninstalled.

Unfortunately without having a machine with the problem present it may take a while to track down. I'll have a play around on my machine and see if I can get legacy mode to work as well as this may also shed some light on the problem

For my CTH-470 tablet I got the driver from here https://www.wacom.com/en/support/product-support/drivers. I did my test earlier with the Wacom drivers uninstalled. Unfortunately without having a machine with the problem present it may take a while to track down. I'll have a play around on my machine and see if I can get legacy mode to work as well as this may also shed some light on the problem

In #55589#607160, @ChristopherPeerman wrote:
I just tried enabling the 'LegacyPenInteractionModel' which a few people have recommended around the internet using the following commands and it definitely doesn't work with the fix. I'll take a look and see if I can work out any ways of improving it with legacy mode enabled.

I can confirm for my system that this key needs to be disabled in order for the changes to work (recent nightly builds, referred to in my first comment). I am not certain of the state of the drivers from previous experiments (i.e. whether WinTab is used somehow), the hardware driver used is by Wacom (7.3.4.48).

Thanks for solving this!

> In #55589#607160, @ChristopherPeerman wrote: > I just tried enabling the 'LegacyPenInteractionModel' which a few people have recommended around the internet using the following commands and it definitely doesn't work with the fix. I'll take a look and see if I can work out any ways of improving it with legacy mode enabled. I can confirm for my system that this key needs to be disabled in order for the changes to work (recent nightly builds, referred to in my first comment). I am not certain of the state of the drivers from previous experiments (i.e. whether WinTab is used somehow), the hardware driver used is by Wacom (7.3.4.48). Thanks for solving this!

Removed subscriber: @ColbyKlein

Removed subscriber: @ColbyKlein

I've taken a look at the legacy behaviour it seems that with the new behaviour we get WM_POINTERDOWN and WM_LBUTTONDOWN, followed by WM_POINTERUPDATE, WM_TOUCH and WM_MOUSEMOVE events. However with machines running legacy versions of Windows we only get WM_POINTERDOWN and WM_POINTERUPDATE events only, until after a long delay and we'll get the WM_LBUTTONDOWN and WM_MOUSEMOVE events.

I'm going to need to do some research to see if there is anything to cause this. I one approach I want to look at is to correctly handle the WM_POINTERxxx events and switch us over to pointer mode for compatible versions of Windows, this should make Blender more compatible with older versions of Windows.

I've taken a look at the legacy behaviour it seems that with the new behaviour we get WM_POINTERDOWN and WM_LBUTTONDOWN, followed by WM_POINTERUPDATE, WM_TOUCH and WM_MOUSEMOVE events. However with machines running legacy versions of Windows we only get WM_POINTERDOWN and WM_POINTERUPDATE events only, until after a long delay and we'll get the WM_LBUTTONDOWN and WM_MOUSEMOVE events. I'm going to need to do some research to see if there is anything to cause this. I one approach I want to look at is to correctly handle the WM_POINTERxxx events and switch us over to pointer mode for compatible versions of Windows, this should make Blender more compatible with older versions of Windows.

I made sure Legacy was disabled on my Surface Book. I downloaded the 2.8 build on the 28th.
Still had the issue. I uninstalled Wintab drivers and still had the same issue. As for as I know to use wintab drivers you just install them without having to make any changes in Device Manager.

Is it something I am missing or not understanding?

I made sure Legacy was disabled on my Surface Book. I downloaded the 2.8 build on the 28th. Still had the issue. I uninstalled Wintab drivers and still had the same issue. As for as I know to use wintab drivers you just install them without having to make any changes in Device Manager. Is it something I am missing or not understanding?

Added subscriber: @ipeerbhai

Added subscriber: @ipeerbhai

Just to give an update to this. I've been working on this and I hope to have something put up for code review later this week. The new version uses the WM_POINTERxxx messages for Touch and Stylus and the GetPointerInfo, GetPointerPenInfo and GetPointerTouch info. So far it seems to be working well, I've just got a little more work to do with it and spend some time testing it. I also hope that this implementation will also fix issues some users have seen on Windows 8.

Just to give an update to this. I've been working on this and I hope to have something put up for code review later this week. The new version uses the WM_POINTERxxx messages for Touch and Stylus and the GetPointerInfo, GetPointerPenInfo and GetPointerTouch info. So far it seems to be working well, I've just got a little more work to do with it and spend some time testing it. I also hope that this implementation will also fix issues some users have seen on Windows 8.

Pull request in review https://developer.blender.org/D4314

Pull request in review https://developer.blender.org/D4314

Added subscriber: @riceart

Added subscriber: @riceart

This issue was referenced by 2933fd6c7c

This issue was referenced by 2933fd6c7c16d95c8d8e7a5b171edd35632cdb50

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

Great, thank you guys for your work!

Great, thank you guys for your work!

I'm not able to verify myself if this fix is working, so please let us know if there are further issues.

I'm not able to verify myself if this fix is working, so please let us know if there are further issues.

I just pulled master and built this change. The fix improved the behavior, but pen interaction is still broken.

I've made a quick video showing the new behavior:
https://youtu.be/KPz4_Ffxv8M

In this video, I do a texture paint with the pen 3 different times. Each time, I touchdown, draw, then release. After I finish a stroke, I hit CTRL-Z to erase the entire stroke I drew. I draw each stroke continuously, with constant pressure and speed, until I lift up.

The paint update cuts in/out, resulting in long periods of time where the new line being drawn is invisible. I'm using a standard Windows 10 PC, build 1809, and the default Microsoft Pen driver.

I just pulled master and built this change. The fix improved the behavior, but pen interaction is still broken. I've made a quick video showing the new behavior: https://youtu.be/KPz4_Ffxv8M In this video, I do a texture paint with the pen 3 different times. Each time, I touchdown, draw, then release. After I finish a stroke, I hit CTRL-Z to erase the entire stroke I drew. I draw each stroke continuously, with constant pressure and speed, until I lift up. The paint update cuts in/out, resulting in long periods of time where the new line being drawn is invisible. I'm using a standard Windows 10 PC, build 1809, and the default Microsoft Pen driver.

I just downloaded the latest build this evening and now in grease pencil I can connect lines as expected. The pen starts at the beginning of strokes.
I do see an unwanted speck within lines sometimes but this change has definitely solved the pen starting at first event issue for me.

I am using Microsoft Surface Book with the latest Windows 10 1809 build.

Keep up the good work!!

I just downloaded the latest build this evening and now in grease pencil I can connect lines as expected. The pen starts at the beginning of strokes. I do see an unwanted speck within lines sometimes but this change has definitely solved the pen starting at first event issue for me. I am using Microsoft Surface Book with the latest Windows 10 1809 build. Keep up the good work!!

Did these issues also happen with 2.80 before this fix? What about the 2.79 daily build? If the problem is not caused specifically by yesterday's change, can you create a new bug report for them?

@ipeerbhai, if I'm understanding correctly, the issue is that it's not refreshing the display but the resulting stroke is correct? I assume the stroke stepping artifacts are from the image being low resolution.

Did these issues also happen with 2.80 before this fix? What about the 2.79 daily build? If the problem is not caused specifically by yesterday's change, can you create a new bug report for them? @ipeerbhai, if I'm understanding correctly, the issue is that it's not refreshing the display but the resulting stroke is correct? I assume the stroke stepping artifacts are from the image being low resolution.

@brecht -- yes, your understanding is correct -- resulting stroke is correct. I just tried 2d drawing instead of texture painting and that worked!

While testing, I noticed a few bugs related to pen in 2d drawing:

  1. I can't repro it reliably, but I notice a very faint streak between last mouse position and first pen touchdown under some circumstances ( distance, first run ). It's a bug people can live with ( CTRL-Z when it happens ), and seems to be rare.
  2. Fast strokes lag behind pen position by about 1/2". This is pretty consistent, and is dependent on how fast I move the pen. At slow speeds, pen doesn't really lag.

I also noticed these two bugs in Texture painting( unrelated ) :

  1. The "disappearing stroke" bug as in the video. ( Video was just a flat color, with single color pen strokes painted on top to a low poly STL ).
  2. All painted textures "disappear" forever, cannot draw any textures at all, if painted STL object placed into a collection.

I love the new 2.8 changes, and had a blast using the texture paint. Should I file any of those issues I noticed as bugs?
Thanks!

@brecht -- yes, your understanding is correct -- resulting stroke is correct. I just tried 2d drawing instead of texture painting and that worked! While testing, I noticed a few bugs related to pen in 2d drawing: 1. I can't repro it reliably, but I notice a very faint streak between last mouse position and first pen touchdown under some circumstances ( distance, first run ). It's a bug people can live with ( CTRL-Z when it happens ), and seems to be rare. 2. Fast strokes lag behind pen position by about 1/2". This is pretty consistent, and is dependent on how fast I move the pen. At slow speeds, pen doesn't really lag. I also noticed these two bugs in Texture painting( unrelated ) : 1. The "disappearing stroke" bug as in the video. ( Video was just a flat color, with single color pen strokes painted on top to a low poly STL ). 2. All painted textures "disappear" forever, cannot draw any textures at all, if painted STL object placed into a collection. I love the new 2.8 changes, and had a blast using the texture paint. Should I file any of those issues I noticed as bugs? Thanks!

where can i test 2.79 build? On blender.org there is 2.79 from March 22?

where can i test 2.79 build? On blender.org there is 2.79 from March 22?
Member

https://builder.blender.org has a nightly 2.79 build.

https://builder.blender.org has a nightly 2.79 build.

@ipeerbhai: yes ,you can file bug reports for those things.

@riceart: note that this is only fixed in the 2.80 daily build, not the 2.79 build.

@ipeerbhai: yes ,you can file bug reports for those things. @riceart: note that this is only fixed in the 2.80 daily build, not the 2.79 build.

Ok so ive tested 2.8 daily build from Lazydodo link. It is still broken when wintab enabled and when windows ink is enabled it only kinda helps. Right now there is no lag with the stroke at start but spacing of brush in texture paint mode looks like its a random value.
Is there a plan to repair this also on 2.79?

Ok so ive tested 2.8 daily build from Lazydodo link. It is still broken when wintab enabled and when windows ink is enabled it only kinda helps. Right now there is no lag with the stroke at start but spacing of brush in texture paint mode looks like its a random value. Is there a plan to repair this also on 2.79?

I have found that since the fix on Suface Pen first events that now Grese Pencil effects do not work and the clean up loose points under strokes do not work.

I have found that since the fix on Suface Pen first events that now Grese Pencil effects do not work and the clean up loose points under strokes do not work.

Please create new bug reports for those issues.

Please create new bug reports for those issues.
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
16 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#55589
No description provided.