simphax / Touchmote

Touchmote
GNU General Public License v3.0
114 stars 32 forks source link

Deadzone for Wiimote Pointer #65

Closed Papermanzero closed 1 year ago

Papermanzero commented 8 years ago

Currently Touchmote misses adjustments for a wiimote pointer deadzone. The sensitivity of the pointer is too high to play certain games like first person shooters or strategy games. A IR pointer deadzone ensures that, the mouse or touch controls wouldn't jerk all the time. GlovePie scripts implemented such a mechnism. Range Functions: http://glovepie.org/w/index.php?title=Preliminary_Documentation_v0.45 Script with Deadzone: http://glovepie.org/forum/viewtopic.php?f=6&t=2164

Papermanzero commented 8 years ago

Example: https://www.youtube.com/watch?v=jdxTFGlz5Jw

Optimisations: http://wiimoteoncod9.blogspot.de/

Ryochan7 commented 8 years ago

Using fpsmouse mode (or Mouse Camera/View in Controller Configuration) is needed to change the mouse behavior to work better in games. It has a default deadzone value of 0.03 (3%). The deadzone setting cannot be changed in the GUI. The setting can be changed by editing the settings.json config file. You would have to change the value for fpsmouse_deadzone.

Papermanzero commented 8 years ago

Tried it. However the fpsmouse is really slow in terms of quick reactions. Means if I point left and quickly turn right, the mouse only moves very slow. It must be a combination like the "normal" mouse behavior and the fpsmouse. A deadzone for the normal mouse would be interessting.

Ryochan7 commented 8 years ago

The current implementation has some flaws. The biggest issue is that the final relative mouse speed is unintentionally throttled in two places. It gets throttled when calculating PointerX and PointerY from the IR data and also for the conversion from absolute coordinates to relative mouse speed.

MouseHandler.cs (line 104)

Point smoothedPos = cursorPositionHelper.getSmoothedPosition(new Point(cursorPos.RelativeX, cursorPos.RelativeY));

The value maxes out at around 0.8 and the minimum is around 0.2.

MouseHandler.cs (line 118-119)

double shiftX = Math.Abs(smoothedPos.X - 0.5) > deadzone ? smoothedPos.X - 0.5 : 0; double shiftY = Math.Abs(smoothedPos.Y - 0.5) > deadzone ? smoothedPos.Y - 0.5 : 0;

The end value would max out around +-0.5 if the full IR range were being used. Also, the dead zone is ignored so there will be a jump in cursor speed after leaving the assigned dead zone.

I have been making some minor changes to the source code. Although I haven't found a configuration that I have completely liked yet, I have hacked together something that is somewhat usable.

DevNullx64 commented 8 years ago

Hi :) I'm work on a cursor stabilisation. I've made a dirty proof of concept, and i try to clearly code it. The idea is to see cursor as a circle, and the concerning cursor position is the center of this circle. Data from WiiMote is use to push the circle by its inner. You can see this as a ring put on a table. The center of the ring is the mouse pointer. To move the "rind cursor" you use your finger to push the ring by an internal pushing.

This idea is near a dead zone but have some extart feature. the difference is when the wiimote data is out of the dead zone the new cursor position is exactly the wiimote data... with it noise. In the radius implémentation, if the wiimote data is out of the circle, the new position is compute after moving the circle to its new position. Its hard for me to be more clear in this language ^^'.

Wait a litle :)

Le dim. 8 nov. 2015 17:10, Travis Nickles notifications@github.com a écrit :

The current implementation has some flaws. The biggest issue is that the final relative mouse speed is unintentionally throttled in two places. It gets throttled when calculating PointerX and PointerY from the IR data and also for the conversion from absolute coordinates to relative mouse speed.

MouseHandler.cs (line 104)

Point smoothedPos = cursorPositionHelper.getSmoothedPosition(new Point(cursorPos.RelativeX, cursorPos.RelativeY));

The value maxes out at around 0.8 and the minimum is around 0.2.

MouseHandler.cs (line 118-119)

double shiftX = Math.Abs(smoothedPos.X - 0.5) > deadzone ? smoothedPos.X - 0.5 : 0; double shiftY = Math.Abs(smoothedPos.Y - 0.5) > deadzone ? smoothedPos.Y - 0.5 : 0;

The end value would max out around +-0.5 if the full IR range were being used. Also, the dead zone is ignored so there will be a jump in cursor speed after leaving the assigned dead zone.

I have been making some minor changes to the source code. Although I haven't found a configuration that I have completely liked yet, I have hacked together something that is somewhat usable.

— Reply to this email directly or view it on GitHub https://github.com/simphax/Touchmote/issues/65#issuecomment-154835662.

DevNullx64 commented 8 years ago

Use my "dirty" fork to make a try ;) I'm interesting about you're opinion

2015-11-08 17:28 GMT+01:00 Luc BOLOGNA bologna.luc@gmail.com:

Hi :) I'm work on a cursor stabilisation. I've made a dirty proof of concept, and i try to clearly code it. The idea is to see cursor as a circle, and the concerning cursor position is the center of this circle. Data from WiiMote is use to push the circle by its inner. You can see this as a ring put on a table. The center of the ring is the mouse pointer. To move the "rind cursor" you use your finger to push the ring by an internal pushing.

This idea is near a dead zone but have some extart feature. the difference is when the wiimote data is out of the dead zone the new cursor position is exactly the wiimote data... with it noise. In the radius implémentation, if the wiimote data is out of the circle, the new position is compute after moving the circle to its new position. Its hard for me to be more clear in this language ^^'.

Wait a litle :)

Le dim. 8 nov. 2015 17:10, Travis Nickles notifications@github.com a écrit :

The current implementation has some flaws. The biggest issue is that the final relative mouse speed is unintentionally throttled in two places. It gets throttled when calculating PointerX and PointerY from the IR data and also for the conversion from absolute coordinates to relative mouse speed.

MouseHandler.cs (line 104)

Point smoothedPos = cursorPositionHelper.getSmoothedPosition(new Point(cursorPos.RelativeX, cursorPos.RelativeY));

The value maxes out at around 0.8 and the minimum is around 0.2.

MouseHandler.cs (line 118-119)

double shiftX = Math.Abs(smoothedPos.X - 0.5) > deadzone ? smoothedPos.X

  • 0.5 : 0; double shiftY = Math.Abs(smoothedPos.Y - 0.5) > deadzone ? smoothedPos.Y
  • 0.5 : 0;

The end value would max out around +-0.5 if the full IR range were being used. Also, the dead zone is ignored so there will be a jump in cursor speed after leaving the assigned dead zone.

I have been making some minor changes to the source code. Although I haven't found a configuration that I have completely liked yet, I have hacked together something that is somewhat usable.

— Reply to this email directly or view it on GitHub https://github.com/simphax/Touchmote/issues/65#issuecomment-154835662.

Ryochan7 commented 8 years ago

I have been meaning to try out your fork. It is an interesting idea for making the absolute mouse pointer more stable.

Ryochan7 commented 8 years ago

I finally took the time to try out the radius dead zone for the absolute mouse. Although I like the idea, I had some issues with the current routine.

On a positive note, the cursor with the forked version is far more stable than the vanilla Touchmote mouse cursor. However, the coordinate system seems to get messed up especially when attempting to reach the corners of the screen. The cursor will occasionally move to the middle or opposite end of the screen when moving the cursor towards a corner of the screen; the cursor will keep jumping around from the wrong position to around the corner where the cursor should be. Sometimes the Y axis coordinate gets inverted so moving the Wiimote down will cause the cursor to move towards the top of the screen. Also, it seems like the cursor moves a little too much after leaving the radius dead zone so making small cursor position changes isn't really possible. That type of problem will likely be a very difficult one to solve.

Ryochan7 commented 8 years ago

Current fpsmouse mode experiments.

https://gist.github.com/Ryochan7/5c939fd53c508ad63a59

Ryochan7 commented 8 years ago

Demo video showing the results of recent changes. I will update the gist soon.

https://www.youtube.com/watch?v=thD3ZFkwkPo

Papermanzero commented 8 years ago

That is awesome! Can you share a compiled version?

Ryochan7 commented 8 years ago

I am still working on it and the current patch uses some hard coded values as opposed to settings so I don't really want to post a compiled version as of yet. I would like to get something out that people can test. The most recent un-posted changes on my local copy of the code include an easeOutCubic curve for the delta acceleration routine and adding a small delay when the Wiimote goes outside the IR range before mouse movement stops. The out of reach delay is only for 1 second and that seems to be fine; I will have to check out Metroid Prime 3 again to see how much of a delay that game uses but I am pretty sure that it is longer than 1 second.

Also, I am still getting used to the Wiimote again after not having played the Wii since around the release of Xenoblade Chronicles. The biggest issue is getting the accelerometer settings down so I can map some necessary keys for games and not have them executed by accident.

Ryochan7 commented 8 years ago

Gist updated with previously mentioned routines added. The final change will be adding some temporary settings so the experience can be customized in some way without needing to edit the source code.

Ryochan7 commented 8 years ago

Gist updated and a link to a compiled Release build.

https://dl.dropboxusercontent.com/u/31073509/Touchmote_20151118.zip

There are some new temporary settings that will be stored in settings.json after exiting Touchmote for the first time. All test settings are prefixed with _test__. Those settings are only for use during testing. It should be assumed that there will be no migration path for those settings when upgrading even between various test versions. Those settings keys and expected values are subject to change at any time.

Another thing to mention is that using a value of 0.0 for test_deltaAccelEasingDuration while test_deltaAccel is set to true will cause delta acceleration to only be applied for one Wiimote poll.

As for personal preferences, I have test_deltaAccel set to true. I have also been playing with the value for fpsmouse_deadzone and I am currently using a value of 0.015.

Papermanzero commented 8 years ago

Wow awesome! But, unfortunately your compiled version doesn't work (I am getting an error message that the reference to the server is not available). I extracted the file and overwrote the file in the installed folder.

Ryochan7 commented 8 years ago

As long as Touchmote.exe is run from the proper location (ex. C:\Program Files\Touchmote) and the Touchmote certificate is installed on your system then it should work. uiAccess is enabled and the executable is signed. I don't think that I missed anything. Either way, I have compiled two Release builds to test out that problem. One is the more proper version with uiAccess enabled and another with uiAccess disabled. The big disadvantage of trying to use a version without uiAccess enabled is that the D3DCursor will not appear in the WinRT environment.

https://dl.dropboxusercontent.com/u/31073509/Touchmote_20151119.zip https://dl.dropboxusercontent.com/u/31073509/Touchmote_nouiAccess_20151119.zip

Also, I would recommend that you rename the original exe and keep it as a backup instead of overwriting it.

Papermanzero commented 8 years ago

The second one is working (without UI Access). The optimisations are pretty nice. What kind of settings did you use for the demo video? The default ones? Is it also possible to add a dead zone for the absolute coordinates (not the Mouse Camera/View in Controller Configuration)? Currently you are focusing on FPS and a "Metroid Prime 3" like control mechanism. But if I select the normal mouse mode (not the Mouse Camera/View in Controller Configuration) the jitter is still available.

I still have to find optimal settings, but the improvements are great.

Ryochan7 commented 8 years ago

The implementation was slightly different then but the following settings placed in settings.json will make the current routine perform similarly to what was shown in the video; I ended up choosing more conservative settings for the defaults.

"test_deltaAccel": true,
"test_deltaAccelMulti": 10.0,
"test_deltaAccelMinTravel": 0.1,
"test_deltaAccelEasingDuration": 0.0,
"fpsmouse_deadzone": 0.01,
"fpsmouse_speed": 25,

Another thing to mention is that I have Enhance pointer precision disabled in the Windows mouse settings. So far, I have mainly played around with Duke Nukem Forever and Amnesia: The Dark Descent.

As for implementing a dead zone for the absolute coordinates, I think that the work done by DevNullx64 is a good start for adding that functionality. It would help improve all mouse modes available in Touchmote.

simphax commented 8 years ago

Nice work! :) The exe needs to be signed on the same computer since it is a "Test" Certificate. Copy this into the Program/Touchmote folder and run sign.bat to re-sign it :) https://docs.google.com/file/d/0B39V0JZUSzQfWDdCUEhmQ0J4ZmM/edit?usp=drive_web

simphax commented 8 years ago

Also, hold on for some improved cursor stability on the dev branch :)

simphax commented 8 years ago

A test on branch "euro+radius" , check it out if you like ( : It uses a 1€Filter and the radius smoothing by DevNullx64

Ryochan7 commented 8 years ago

Updated fpsmouse mode changes. Gist has been updated and new binaries have been built. I will still provide a binary with uiAccess set to true so people can have the option to sign the executable themselves it they want to use it; thank you for the archive simphax.

https://dl.dropboxusercontent.com/u/31073509/Touchmote_20151127.zip https://dl.dropboxusercontent.com/u/31073509/Touchmote_nouiAccess_20151127.zip

Not much has changed. The two main changes are that the dead zone is now circular instead of a square and directional dead regions outside of the dead zone have been removed. I find this more responsive than before and it is more like what I am used to. I am still using a value of 0.015 for fpsmouse_deadzone for my configuration but I might decide to increase it slightly later.

Ryochan7 commented 8 years ago

Small update. A small delay has been added when initially moving the Wiimote into the range of the IR sensor bar. This allows centering the Wiimote before any mouse movement occurs on screen. The delay is 125 ms which is small enough to not get in the way but just enough to get the Wiimote into position. It should be noted that the delay only occurs after mouse movement has completely stopped so it will not occur after going out of range slightly and then returning.

https://dl.dropboxusercontent.com/u/31073509/touchmote/Touchmote_20151209.zip https://dl.dropboxusercontent.com/u/31073509/touchmote/Touchmote_nouiAccess_20151209.zip

Papermanzero commented 8 years ago

The FPS pointer is awesome :-) Great work. The camera view option is perfect for FPS games. Hopefully the absolute mouse pointer can be improved as well. This would be perfect for adventure and strategy games.

marquinio007 commented 8 years ago

hi, this message appears when i try to open the program

"The version of this file is not compatible with the version of windows you're running. Check your computer's system information to see whether you need an x86 (32-bit) or x64 (64 bit) version of the program, and then contact the software publisher"

Help Please .. excuse me my bad english

Ryochan7 commented 8 years ago

I am not sure how much of an interest there is regarding this topic but I will post an update. After a hiatus due to the holidays and trying out the Steam Controller, I have started experimenting with the Wiimote again and I have made some new changes and updated the Gist. Some changes include lowering the input value thresholds for acceleration, adding an easing routine to the upper end, and allowing a maximum value to be specified for delta acceleration displacement. While making those new changes, I ended up playing through Painkiller: Black Edition and Painkiller Overdose.

Currently used edited settings:

"test_deltaAccel": true,
"test_deltaAccelMulti": 4.0,
"test_deltaAccelMinTravel": 0.0875,
"test_deltaAccelEasingDuration": 0.05,
"test_regionEasingXDuration": 0.03,
"test_deltaAccelMaxTravel": 0.5,
"pointer_positionSmoothing": 2,
"fpsmouse_deadzone": 0.018,
"fpsmouse_speed": 25,
Ryochan7 commented 8 years ago

The changes are far enough along that a new exe is in order for people to test. Gist has also been updated. Ended up playing through Serious Sam 2.

https://dl.dropboxusercontent.com/u/31073509/touchmote/Touchmote_20160218.zip https://dl.dropboxusercontent.com/u/31073509/touchmote/Touchmote_nouiAccess_20160218.zip

Settings:

"test_deltaAccel": true,
"test_deltaAccelMulti": 4.0,
"test_deltaAccelMinTravel": 0.09,
"test_deltaAccelEasingDuration": 0.05,
"test_regionEasingXDuration": 0.02,
"test_deltaAccelMaxTravel": 0.4,
"test_regionEasingXOffset": 0.75,
"pointer_positionSmoothing": 2,
"fpsmouse_deadzone": 0.018,
"fpsmouse_speed": 25,
MisakaMikotoDolphin commented 7 years ago

What variable would I have to add to a custom (or any) keybinding profile to alter the values for left stick dead zone, scale, and threshold from the default 0.01, 1.00, 0.40? Changing in the UI doesn’t take.

Ryochan7 commented 7 years ago

It looks like the GUI does not detect changes from the default settings properly. Changing the initial mapping on any Classic Controller stick direction and then editing the dead zone, scale, and threshold values allows the values to be saved and loaded from the json file as expected. You can just override the default mapping with the same action and that will be enough to allow Touchmote to be able to save the other settings. For reference, here is a full example of how the values are represented in the json file.

"Classic.StickLLeft": {
  "scale": 1.1,
  "threshold": 0.5,
  "deadzone": 0.31,
  "output": "360.sticklleft"
},

Key values for the Classic Controller sticks are as follows: Classic.StickLUp, Classic.StickLDown, Classic.StickLLeft, Classic.StickLRight, Classic.StickRUp, Classic.StickRDown, Classic.StickRLeft, Classic.StickRRight.

1seam1 commented 4 years ago

The changes are far enough along that a new exe is in order for people to test. Gist has also been updated. Ended up playing through Serious Sam 2.

https://dl.dropboxusercontent.com/u/31073509/touchmote/Touchmote_20160218.zip https://dl.dropboxusercontent.com/u/31073509/touchmote/Touchmote_nouiAccess_20160218.zip

Settings:

"test_deltaAccel": true,
"test_deltaAccelMulti": 4.0,
"test_deltaAccelMinTravel": 0.09,
"test_deltaAccelEasingDuration": 0.05,
"test_regionEasingXDuration": 0.02,
"test_deltaAccelMaxTravel": 0.4,
"test_regionEasingXOffset": 0.75,
"pointer_positionSmoothing": 2,
"fpsmouse_deadzone": 0.018,
"fpsmouse_speed": 25,

Could you reupload this? I would love to try it out, thank you.

Ryochan7 commented 4 years ago

I will have to check if I still have the pre-built versions. There were a couple of bugs in mouse emulation regarding the output curve portion that got fixed later. I still have the edited diff files somewhere but I have not used Touchmote in a long time. I doubt the diff would apply cleanly with the latest code and I probably won't have the time to set up everything to make it work again.

1seam1 commented 4 years ago

I will have to check if I still have the pre-built versions. There were a couple of bugs in mouse emulation regarding the output curve portion that got fixed later. I still have the edited diff files somewhere but I have not used Touchmote in a long time. I doubt the diff would apply cleanly with the latest code and I probably won't have the time to set up everything to make it work again.

Thank you, any of the prebuilt versions would help. I just need the cursor to not fly all over the place, thanks!

flytech01 commented 4 years ago

Settings can change in settings.json, these not needed 😉

From: 1seam1 notifications@github.com Sent: Thursday, November 21, 2019 10:05 PM To: simphax/Touchmote Touchmote@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: Re: [simphax/Touchmote] Deadzone for Wiimote Pointer (#65)

The changes are far enough along that a new exe is in order for people to test. Gist has also been updated. Ended up playing through Serious Sam 2.

https://dl.dropboxusercontent.com/u/31073509/touchmote/Touchmote_20160218.zip https://dl.dropboxusercontent.com/u/31073509/touchmote/Touchmote_nouiAccess_20160218.zip

Settings:

"test_deltaAccel": true, "test_deltaAccelMulti": 4.0, "test_deltaAccelMinTravel": 0.09, "test_deltaAccelEasingDuration": 0.05, "test_regionEasingXDuration": 0.02, "test_deltaAccelMaxTravel": 0.4, "test_regionEasingXOffset": 0.75, "pointer_positionSmoothing": 2, "fpsmouse_deadzone": 0.018, "fpsmouse_speed": 25,

Could you reupload this? I would love to try it out, thank you.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/simphax/Touchmote/issues/65?email_source=notifications&email_token=AFUSEQMKW5EY4AIBY36EBDTQU3ZX5A5CNFSM4BTFJJF2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEE3USQQ#issuecomment-557271362 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AFUSEQIUADJ35TFICWNQBXLQU3ZX5ANCNFSM4BTFJJFQ . https://github.com/notifications/beacon/AFUSEQPD2CV2WID765AAZSDQU3ZX5A5CNFSM4BTFJJF2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEE3USQQ.gif

Ryochan7 commented 4 years ago

Ended up finding the archives. I found some of the other related files as well. It has been a while since I edited Touchmote at all. I think I was playing Doom 3 BFG while testing at that time (in 2018) but I could be mistaken.

Touchmote_20160218.zip https://drive.google.com/file/d/1mrou30SCYqvfM8-8Z5WHoKuSoY93_R3_/view?usp=sharing

Touchmote_nouiAccess_20160218.zip https://drive.google.com/file/d/1FX7VyCIddCHcR4QZ0rmIVUNNahpuVtxg/view?usp=sharing

The newest diff that I could find was from 2018/06/05. Looks like the last change was to fix the middle offset for the output curve. The curve got changed in the previous revision and the middle zone range was not correct.

touchmote_current_state_20180605.diff https://gist.github.com/Ryochan7/63cc5be3b7bb73eaa11ab5118092e730

Newest used setting changes that I could find.

 "test_deltaAccel": true,
 "test_deltaAccelMulti": 4.0,
 "test_deltaAccelMinTravel": 0.08,
 "test_deltaAccelEasingDuration": 0.04,
 "test_regionEasingXDuration": 0.24,
 "test_deltaAccelMaxTravel": 0.425,
 "test_regionEasingXOffset": 0.8,
 "pointer_positionSmoothing": 2,
 "fpsmouse_deadzone": 0.018,
 "fpsmouse_speed": 25,

Settings can change in settings.json, these not needed :wink:

Try reading the thread next time. Life does not stop and start at your convenience.

1seam1 commented 4 years ago

Ended up finding the archives. I found some of the other related files as well. It has been a while since I edited Touchmote at all. I think I was playing Doom 3 BFG while testing at that time (in 2018) but I could be mistaken.

Touchmote_20160218.zip https://drive.google.com/file/d/1mrou30SCYqvfM8-8Z5WHoKuSoY93_R3_/view?usp=sharing

Touchmote_nouiAccess_20160218.zip https://drive.google.com/file/d/1FX7VyCIddCHcR4QZ0rmIVUNNahpuVtxg/view?usp=sharing

The newest diff that I could find was from 2018/06/05. Looks like the last change was to fix the middle offset for the output curve. The curve got changed in the previous revision and the middle zone range was not correct.

touchmote_current_state_20180605.diff https://gist.github.com/Ryochan7/63cc5be3b7bb73eaa11ab5118092e730

Newest used setting changes that I could find.

 "test_deltaAccel": true,
 "test_deltaAccelMulti": 4.0,
 "test_deltaAccelMinTravel": 0.08,
 "test_deltaAccelEasingDuration": 0.04,
 "test_regionEasingXDuration": 0.24,
 "test_deltaAccelMaxTravel": 0.425,
 "test_regionEasingXOffset": 0.8,
 "pointer_positionSmoothing": 2,
 "fpsmouse_deadzone": 0.018,
 "fpsmouse_speed": 25,

Thank you very much, and thanks for all your great work.

Ryochan7 commented 4 years ago

Luckily I ended up backing up the most recent code base that I was using when I reformatted my computer (20190526); kind of forgot that I did that. I also found a slightly newer uiAccess build in my backups (20180120); I can't remember why I bothered archiving that. I will try to see if I can get it compiled again. It is still based on version 1.0b14 rather than 1.0b15. I wouldn't be able to test it too much due to a hand injury that I still have not completely healed from.

It is too bad that Touchmote was never updated to use ViGEmBus rather than the old ScpVBus driver. Having to deal with the ScpVBus driver again is going to be a pain. ViGEmBus is overall a better emulation driver and it has a lot better support nowadays. ViGEmBus can also emulate a DS4 controller and I have found some uses for that feature

Ryochan7 commented 4 years ago

Also, I don't know if this will matter but here is an archive of the Touchmote v1.0b14 installer.

Touchmote_v1.0b14_x64.exe https://drive.google.com/file/d/1AWru_sIyBPGfKhXuLoaui7PEShRrV2lR/view?usp=sharing

1seam1 commented 4 years ago

Yea its a shame that it stopped being updated as it is in my opinion the best way to use wiimotes with pc. Thanks for the installer, I'll be sure to test this out when I get home later.

Ryochan7 commented 4 years ago

That was a bit of a pain but I got it compiled and working. I can only verify that the app launches, a TR Wiimote connected to a DolphinBar can be detected, and that controller and KB+M output work. I have not attempted to play with fpsmouse mode in its modified state. Looking at the files and .git directory (saved the repo info in the archive), it looks like the changes from touchmote_current_state_20180605.diff are in the code.

Firstly, make sure you install vanilla Touchmote via the installer if you have not done it already. After that, make sure to rename the original Touchmote.exe in the install folder for backup purposes. Getting the nouiAccess archive working should be fairly easy and should be a matter of just copying the exe from the archive and placing it in the install folder. The major downside of the nouiAccess build is that the overlay won't work IIRC.

The normal uiAccess version requires more work to get working. Besides copying over the new Touchmote.exe, copy sign.bat and signtool.exe and place them in the Touchmote install folder. You have to run sign.bat from an Administrator command line prompt to stop the referrer errors from popping up.

Touchmote_20191122.zip https://drive.google.com/file/d/14yImzW0PmldmRgW_QV3BZRUoS-jwjg_-/view?usp=sharing

Touchmote_nouiAccess_20191122.zip https://drive.google.com/file/d/1FmxWG4tPpNiqJujTXxJX90sW5nLc7zGs/view?usp=sharing

Ryochan7 commented 4 years ago

My hand is a bit iffy but I can make it through short burst. The cursor speed is a little slower than I remember it being. Bumping up the fpsmouse_speed to 32 mostly did the trick though. It is still fairly usable but it could very likely be better. Using IR this way could never beat using Motion Plus though.

"fpsmouse_speed": 32,
1seam1 commented 4 years ago

I'm actually testing it right now, its no longer jittery flying all over the place which is great. But I keep getting stuck to the sides of the screen. It feels so sensitive that its hard to stay in the middle of the screen. I'm currently adjusting the speed and acceleration to try to normalize it.

Ryochan7 commented 4 years ago

Part of that problem is with Touchmote's IR tracking routine. Sometimes it does lose the current IR points and the remote will be considered out of range. It can sometimes detect 3 IR points and flake out; the Wiimote IR camera can actually detect up to 4 IR points. When I was doing IR mouse with WiimoteGlue, I had made a simpler algorithm that did the job better despite not being as thorough.

1seam1 commented 4 years ago

I did not know that. I thought it could only detect two points at a time. I think it'll take a while to adjust all these settings enough to get it just right. I do think the issue I'm facing atm is just that I need to tweak things more.

Ryochan7 commented 4 years ago

Maybe you haven't encountered that problem yet. Try disabling delta acceleration in settings.json to get a feeling for the normal output curve.

"test_deltaAccel": false,
Ryochan7 commented 4 years ago

There are some other things that I should probably mention. Firstly, the sensor bar sensitivity was changed with that diff. The end margins are larger so you will end up hitting the max edges quicker than with vanilla Touchmote; margins weren't really taken into account with the vanilla fpsmouse routine anyway. Also, the smoothing buffer used might be a bit too high. Just decreasing the smoothing weight value used slightly improved control a fair amount. That value cannot be changed from the settings as it is though.

Lastly, despite using a DolphinBar to use the Wiimote on my computer, I am actually not using it as the sensor bar. The DolphinBar IR LED array is obstructed so it will not be seen. I have a separate USB sensor bar that I am using with the Wiimote as I like it better than the IR LED array that is used in the DolphinBar.

Ryochan7 commented 4 years ago

Ended up making smoothing weight a configurable setting. The setting is editable in settings.json as test_smoothingWeight and the default value is now 0.4. The old value was 0.5.

"test_smoothingWeight": 0.4,

Touchmote_20191125.zip https://drive.google.com/file/d/1nMphPMaWQ4_56u0gBQz_RxCDgaD_gQhm/view?usp=sharing

Touchmote_nouiAccess_20191125.zip https://drive.google.com/file/d/16v8yWI8hPgo0Ft_8nlItc6O32XVKvHbn/view?usp=sharing

1seam1 commented 4 years ago

I also use a standard bar (not a dolphin bar). It has worked great so far. I will hopefully have more time to test this tomorrow to give you some better feedback. I cant figure out why the cursor seems to drift after i have pointed to a specific spot. I think maybe I should just make a video for you to see the issues. Again, I cant thank you enough for going out of your way to help me with this.

Ryochan7 commented 4 years ago

Not sure if the problem would be general input lag or just too much smoothing. The smoothing technique used in vanilla Touchmote is more aggressive than what I use. Using smoothing does add a bit of perceived resistance to the cursor so the used IR position will be slightly behind where you are pointing the Wiimote at that moment. I don't know how much of my settings you are using but I am using a smoothing buffer size of 2 instead of 3 like vanilla Touchmote uses by default. That value is controlled by pointer_positionSmoothing in settings.json. Also, my version of smoothing uses a weighted average calculation rather than a simple average. The weighted average technique is more configurable and is less aggressive.

I did not expect to get pulled back into this but it is interesting trying this out again. I am playing around with the initial mouse offset currently. I think I have nailed down a setting that I like better than what was being used and it makes the cursor more snappy at the low end. A newer build will get uploaded later today with the change after a little more testing.

If I had some extra free time, I would almost consider forking Touchmote and seeing how far I can take it.

flytech01 commented 4 years ago

Try flyfps mouse, i played out Doom 4 times, with my touchmote mod. Can you set all smoothing parameters, accel deccel more more… and can set individual settings for tunrning etc..

From: 1seam1 notifications@github.com Sent: Friday, November 22, 2019 6:39 PM To: simphax/Touchmote Touchmote@noreply.github.com Cc: Filátz Róbert flytech01@gmail.com; Comment comment@noreply.github.com Subject: Re: [simphax/Touchmote] Deadzone for Wiimote Pointer (#65)

Ended up finding the archives. I found some of the other related files as well. It has been a while since I edited Touchmote at all. I think I was playing Doom 3 BFG while testing at that time (in 2018) but I could be mistaken.

Touchmote_20160218.zip https://drive.google.com/file/d/1mrou30SCYqvfM8-8Z5WHoKuSoY93_R3_/view?usp=sharing

Touchmote_nouiAccess_20160218.zip https://drive.google.com/file/d/1FX7VyCIddCHcR4QZ0rmIVUNNahpuVtxg/view?usp=sharing

The newest diff that I could find was from 2018/06/05. Looks like the last change was to fix the middle offset for the output curve. The curve got changed in the previous revision and the middle zone range was not correct.

touchmote_current_state_20180605.diff https://gist.github.com/Ryochan7/63cc5be3b7bb73eaa11ab5118092e730

Newest used setting changes that I could find.

"test_deltaAccel": true, "test_deltaAccelMulti": 4.0, "test_deltaAccelMinTravel": 0.08, "test_deltaAccelEasingDuration": 0.04, "test_regionEasingXDuration": 0.24, "test_deltaAccelMaxTravel": 0.425, "test_regionEasingXOffset": 0.8, "pointer_positionSmoothing": 2, "fpsmouse_deadzone": 0.018, "fpsmouse_speed": 25,

Thank you very much, and thanks for all your great work.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/simphax/Touchmote/issues/65?email_source=notifications&email_token=AFUSEQIIPQFDUUYZ67SD45LQVAKMNA5CNFSM4BTFJJF2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEE6K33Q#issuecomment-557624814 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AFUSEQMQZQA232ZHDBZZX6LQVAKMNANCNFSM4BTFJJFQ . https://github.com/notifications/beacon/AFUSEQKYSYMBL7BR7ICM47LQVAKMNA5CNFSM4BTFJJF2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEE6K33Q.gif

Ryochan7 commented 4 years ago

Ended up making the mouse offset configurable. The setting is exposed as test_fpsmouseOffset and it has a default value of 0.25. The low end feels quite a bit looser than before and it feels better to me. Been testing this on Serious Sam 2.

Touchmote_20191126.zip https://drive.google.com/file/d/1nH2RD79-ojgnnCSzSd1VSlxss5iAnfho/view?usp=sharing

Touchmote_nouiAccess_20191126.zip https://drive.google.com/file/d/1AYZiHXgA62QfLzL-MjwZ7rKPtlUL4Nyb/view?usp=sharing

 "test_fpsmouseOffset": 0.25,

Try flyfps mouse, i played out Doom 4 times, with my touchmote mod. Can you set all smoothing parameters, accel deccel more more… and can set individual settings for tunrning etc..

Link to pre-built binary. Take note that his build has uiAccess enabled so you have to run the sign.bat script that I provided, in my uiAccess build zip, on the executable in order to not get referral errors pop up on your system. Please give that build a try as well.

https://github.com/flytech01/Touchmote/raw/f8ac7b3df1a281135860919be9bba88fe4132854/TouchMotex64Release.zip