Jump to content

[App] Absolute Stick Aiming Dead Zone Fix. - 2.0: Proof Of Concept


40 replies to this topic

#1 evilC

    Member

  • PipPipPipPipPipPipPipPip
  • Legendary Founder
  • Legendary Founder
  • 1,298 posts
  • LocationLondon, UK

Posted 15 January 2015 - 10:16 AM

Posted Image


DOWNLOAD

For the coders among you, you may like to check out the Github page.

What is it?
A program to make aiming with a joystick in MWO feasible.

Doesn't cl_joystick_absolute_inputs do that?
No, "Absolute" mode in MWO is broken as it has a big deadzone that you cannot remove, and it does not map the stick to the full scale.

Who cares? You can't be competitive aiming with a joystick!
Not necessarily true. Properly done, absolute aiming has the potential to be more competitive than mouse.

It doesn't work / Motion is jerky! etc
Please be sure that your joystick is of sufficient quality to use Absolute aiming.
In order to be good enough, you need to be able to accurately point to in excess of the number of pixels you run the game in (eg 1920 for 1080p) - ie about 10 or 12-bit accuracy or better is desirable.
Unless you have a Thrustmaster T16000M or an expensive stick, this is very unlikely to be the case.
Even with one of those sticks, you probably need an extended shaft (To give you more accuracy) and to remove the centering spring.
Also, be aware that at the moment MWO imposes both an upper and lower deadzone - in a low twist mech, you have a bigger upper deadzone. For example, in a stalker the "window" is only ~ 2000 x 800 joystick points (of a scale of 0 to 16384) - so you will not be seeing a ton of resolution until PGI fix this!

Quick Start:
Download and install vJoy.
Download the zip from the top of this post and extract. Run the EXE file, ignore .ahk files.
FOLLOW THE CALIBRATION PROCESS BELOW!

Full instructions repeated from the source code:

=================================================================

Quick Start:
Install vJoy virtual joystick driver from http://vjoystick.sourceforge.net
Use the EXE file in the zip

For coders:
Also Download:
AHK from http://ahkscript.org. !!! NOT autohotkey.com !!!
AHK-CvJoyInterface.ahk from here: https://github.com/e...-CvJoyInterface
ADHD from https://github.com/e...eys-for-Dummies
Then use the AHK version from the zip

MWO Setup:
One Time
========
1) Set cl_joystick_absolute_inputs=1 is required in ?user.cfg? - i need mine in system.cfg
2) In the CONTROLLER menu, the following sliders MUST be at thier DEFAULT values!
X-AXIS SENSITIVITY, Y-AXIS SENSITIVITY and DEADZONE
DO NOT attempt to set deadzone to 0! It goes mental!
3) Bind vJoy axis 1 to TORSO TWIST in MWO:
Start the script, go into the BINDINGS tab and bind a KEYBOARD KEY to "MWO Bind X" and "MWO Bind Y".
Double click TORSO TWIST in the JOYSTICK column
Hit the key you bound to "MWO Bind X"
This moves the virtual stick without you having to move the physical stick...
... so we can be sure MWO binds to the virtual stick.
Now repeat for the PITCH setting.
3) Configure inputs
In the script, select the ID and axis number of the stick you wish to use as input.

Per-Mech etc
============
Low Threshold (Deadzone) is probably the same for all mechs.
However, the High Threshold may well vary from mech to mech.
You can use the PROFIlES tab to add profiles if you need different setups for different situations.

Calibration process:
1) Make sure on the BINDINGS tab you bind something to CALIBRATION MODE, AXIS SELECT, TOGGLE LOW / HIGH and AXIS SET.
Make sure CALIBRATION MODE is not something you would normally use in-game, but when not calibrating, the others do nothing.
2) In-Game, at any point, you can hit CALIBRATION MODE to calibrate.
You will hear a voice telling you that you entered calibration mode, and what current setting you are setting.
eg "Calibrate: X, Low"
This means you are calibrating the Low Threshold of X.
3) You can hit AXIS SELECT or TOGGLE LOW / HIGH to switch between settings (eg X / Y and Low / High)
4) The stick controls the edge of the threshold - move it left to decrease X, up to increase Y etc.
You can only move X when editing X, and Y when editing Y, to avoid unintentional changing of an axis you dont want to.
5) When you find the edge of motion, hit AXIS SET to set that setting (eg X Low)
6) Unless you use AXIS SET for a given setting, no changes are saved when change setting or exit Calibration Mode.
7) If you know roughly where a threshold is, you can use the CALIB START LOW, CALIB START HIGH edit boxes to set values to start at.
This can GREATLY speed up fine-tuning

Good luck and REMEMBER you have PROFILES!
You can duplicate the current profile, so you can save known good settings and experiment in other profiles.

========================================================

Here comes the Science (Because you're worth it!)
OK, so I think I have figured out how to remove MWO's deadzone on absolute stick aiming.

By examining exact axis values that mwo sees (by feeding it input from a vjoy virtual stick that I set exact axis values for through code) and the resulting torso twist, I was able to establish that when on default settings for sensitivity and deadzone, the twist axis behaves in a 100% predictable manner (albeit with a deadzone).

axes are reported as values from 0->32768

To make it easier, we shall shift the scale to -16384 -> +16384 (ie zero is no deflection).

We can then consider each direction as a number between 0 and 16384 (negative - left, or positive - right)

For me, in a test jenner, when I move the axis from 0->~2460 I get no motion at all.
Then, suddenly, with the next pip of motion, we get an exactly proportionate motion.

This continues until part way up the scale (about 12300 in my tests) where it stops.

So from ~2460 to ~12314 I got motion.

I then do some maths to basically take that range of motion and remap it to your physical stick.
When you do nothing with your stick, the virtual stick sits at 0.
When you move your stick to 1%, it moves the virtual stick to 2460 + 1% of the movement range.
When you move your stick to 100%, it moves the virtual stick to 12300

This is a very basic proof-of-concept as of now.
No persistent settings, X axis only.

If it works for other people, then I can make it into a fully fledged tool.

Please try it and see if it works.

I am also interested in knowing:
What affects it?

FOV? Mech torso twist? Elited?
What exact values define your range? Is this the same for everyone with the same appropriate settings?

Discuss, enjoy.

Edited by evilC, 17 January 2015 - 06:22 AM.


#2 Foust

    Member

  • PipPipPipPipPipPip
  • Legendary Founder
  • Legendary Founder
  • 394 posts
  • LocationKentucky

Posted 15 January 2015 - 10:29 AM

I'll work with this tonight and report back.

#3 evilC

    Member

  • PipPipPipPipPipPipPipPip
  • Legendary Founder
  • Legendary Founder
  • 1,298 posts
  • LocationLondon, UK

Posted 15 January 2015 - 11:11 AM

Oh, and I only have bad sticks to test with at the moment - an unmodded TM T-Flight Hotas X, which is 8-bit (only 256 steps!) and has an imposed deadzone of it's own.

If anyone has a decent stick (ie hall sensors, 12+bit acc), then I would love to hear how it performs.

#4 Homeless Bill

    Member

  • PipPipPipPipPipPipPipPip
  • The 1 Percent
  • The 1 Percent
  • 1,968 posts
  • LocationA Box Near You

Posted 15 January 2015 - 12:12 PM

Unfortunately, this still won't allow for fine adjustments - it just gets rid of the deadzone. I really wish they'd just properly fix this and the fact that overlays reset your throttle to zero when you're using a joystick for movement.

#5 Seth

    Member

  • PipPipPipPipPipPipPip
  • Moderate Giver
  • Moderate Giver
  • 785 posts

Posted 15 January 2015 - 11:14 PM

I would love to be able to chat and not stop moving when using my stick.

#6 M A S E

    Member

  • PipPipPipPipPip
  • Caladbolg
  • Caladbolg
  • 142 posts

Posted 16 January 2015 - 12:00 AM

If you can use a joystick in MWO and do well, I salute you. I tried using a joystick and... nope!

If you need a setup that takes all the fiddling with the keyboard away, able to use PTT while poptarting without having to use a single macro. This is your answer, right here. I have been using this setup since closed beta. Except I used a G300 mouse at first and now I use the G600.

I use G-shift backwards. My standard dpi is 200 and holding G-shift changes it to 2500. Windows mouse speed is at the lowest, no accelerators. So to compensate for a rediculously low dpi, I also have a toggle set for 8200. Since G-shift can also use its own dedicated DPI's I only use the turn speed when needed. I hold the 3rd mouse click for 90% of the match. This may sound very unorthodox to alot of people... but this particular setup and the profile makes the game play so much better IMO
Posted Image

#7 Bellum Dominum

    Member

  • PipPipPipPipPipPipPip
  • The Hitman
  • The Hitman
  • 592 posts

Posted 16 January 2015 - 12:05 AM

Awesome to see you guys still working on getting joysticks to work :)

#8 evilC

    Member

  • PipPipPipPipPipPipPipPip
  • Legendary Founder
  • Legendary Founder
  • 1,298 posts
  • LocationLondon, UK

Posted 16 January 2015 - 05:00 AM

View PostHomeless Bill, on 15 January 2015 - 12:12 PM, said:

Unfortunately, this still won't allow for fine adjustments - it just gets rid of the deadzone. I really wish they'd just properly fix this and the fact that overlays reset your throttle to zero when you're using a joystick for movement.

Then the problem is not MWO or PGI but your joystick.
What resolution is your joystick? Most mass market sticks are only 8-bit, so how do you expect a joystick that can only report 256 individual locations per axis to be able to point to an individual pixel on an HD screen? Answer, it cannot.

Edited by evilC, 16 January 2015 - 05:10 AM.


#9 evilC

    Member

  • PipPipPipPipPipPipPipPip
  • Legendary Founder
  • Legendary Founder
  • 1,298 posts
  • LocationLondon, UK

Posted 16 January 2015 - 05:03 AM

I prefer my G720 to the other mouse.

I already have a G13, and used the analog thumbstick on that for throttle control for quite some time.

I currently use a G720 mouse in the right hand and a Thrustmaster T-Flight Hotas X throttle in the left hand.

Quote

Windows mouse speed is at the lowest, no accelerators. So to compensate for a rediculously low dpi, I also have a toggle set for 8200.

Windows mouse speed setting makes zero difference in games, except for UI selection.

#10 evilC

    Member

  • PipPipPipPipPipPipPipPip
  • Legendary Founder
  • Legendary Founder
  • 1,298 posts
  • LocationLondon, UK

Posted 16 January 2015 - 05:57 AM

Before I go on, I feel that I should explain what I am saying about "Your stick is not good enough".

Let us imagine a mech with no torso twist but arm travel, such that it cannot move the screen at all, but the arms can aim at any point of the screen.
Being able to aim this theoretical mech accurately should be considered "minimum requirements" to be able to play with stick aiming.

So let's say you are playing this mech and running a 1080p monitor - this is 1920 pixels wide.

8-Bit stick
(All xbox controllers, most cheaper or older sticks)
You have 2 ^ 8 or 256 positions on the x axis.
1920 / 256 = 7.5
You can only aim in blocks of 7.5 pixels.

10-bit Stick
(eg Saitek X-45)
You have 2^10 or 1024 positions on the x axis.
1920 / 1024 = 1.875
You can aim in blocks of 1.875 pixels

12-bit stick
(eg BU0836 board, Thrustmaster T1600M, Warthog, other decent sticks)
You have 2^12 or 4096 positions on the x axis.
1920/4096 = 0.46 (Sub-pixel accuracy).

Now let's consider a mech with 180deg torso twist.
Let's assume the FOV is a slightly unusual 90deg, as it makes the maths easier.

360 deg overall twist = 4x FOV = 1920 x 4 pixels of view width.

So now your 8-bit stick can now only aim at blocks of 30 pixels
A 10-bit stick has a granularity of 7.5 pixels.
A 12-bit stick has a granularity of 1.40 pixels.

So, as you can see, ideally you are gonna want 12-bit or better accuracy, else stick aiming is pointless.

If you do not know what bit your stick is:
1) Download DIView.
2) Edit -> Settings and tick your stick, click OK.
3) Right click one of the axes and select "View Raw Data".
4) Look at the maximum value in RED.
256 = 8-bit stick
1024 = 10-bit
4096 = 12-bit
16384 = 14-bit
32767 = 15-bit
65535 = 16-bit
Be aware though that sticks often use a higher bit depth than they actually are. When you move the stick the smallest you can, can you get it to move by 1? If you cannot, it is not a "full bit depth" stick and such should be considered at least one rung lower.

eg
My T-Flight Hotas X reports as a 10-bit stick, but accuracy is actually 8-bit.
My XBox controller reports as 16-bit !? when even if it was 16-bit (It isn't), try finding 65 thousand unique positions on such a tiny stick!

Hopefully this clears up which sticks are and are not suitable for use with absolute aiming and MWO.

Edited by evilC, 16 January 2015 - 07:47 AM.


#11 evilC

    Member

  • PipPipPipPipPipPipPipPip
  • Legendary Founder
  • Legendary Founder
  • 1,298 posts
  • LocationLondon, UK

Posted 16 January 2015 - 06:02 AM

Oh, and FYI, if you have a stick you like but the accuracy is too low, this can be fixed if you are willing to do a bit of DIY and spend some money.

See here for an example of converting a cheap stick (TM T-Flight Hotas X) to more accurate sensors / electronics.

#12 evilC

    Member

  • PipPipPipPipPipPipPipPip
  • Legendary Founder
  • Legendary Founder
  • 1,298 posts
  • LocationLondon, UK

Posted 16 January 2015 - 07:52 AM

Thinking about it, I reckon I can make the deadzone calibration automatic.

If I use pixel detection to check the center pixel, when not moving it will be HUD colour.

In theory, I think center deadzone will be the same for all mechs, but may vary with FOV. Whatever, this techique would work best with a light mech with lateral arm motion (A lower arm actuator).

Basically the idea would be to move the stick until the crosshair moves, at which point you have found the lower threshold.

#13 evilC

    Member

  • PipPipPipPipPipPipPipPip
  • Legendary Founder
  • Legendary Founder
  • 1,298 posts
  • LocationLondon, UK

Posted 16 January 2015 - 02:57 PM

New version up, 1.0

Project moved to Github
Both X and Y supported.
All settings saved in settings file.
Auto-Calibration.

Edited by evilC, 16 January 2015 - 02:57 PM.


#14 Mycrus

    Member

  • PipPipPipPipPipPipPipPipPipPip
  • Overlord
  • Overlord
  • 5,160 posts
  • Google+: Link
  • Twitter: Link
  • LocationFilipino @ Singapore

Posted 16 January 2015 - 04:51 PM

paging loc nar... you are needed at aisle no. 1...

#15 evilC

    Member

  • PipPipPipPipPipPipPipPip
  • Legendary Founder
  • Legendary Founder
  • 1,298 posts
  • LocationLondon, UK

Posted 16 January 2015 - 05:48 PM

Hmm, I found bugs in the calibration, wont work properly.
Sec, lemme fix.

#16 Foust

    Member

  • PipPipPipPipPipPip
  • Legendary Founder
  • Legendary Founder
  • 394 posts
  • LocationKentucky

Posted 16 January 2015 - 05:50 PM

View PostevilC, on 16 January 2015 - 05:48 PM, said:

Hmm, I found bugs in the calibration, wont work properly.
Sec, lemme fix.


I just started mucking with this. Would what your fixing involve the MWO Bind X/Y not triggering the vjoy bind in game?

#17 M A S E

    Member

  • PipPipPipPipPip
  • Caladbolg
  • Caladbolg
  • 142 posts

Posted 16 January 2015 - 09:06 PM

View PostevilC, on 16 January 2015 - 05:03 AM, said:

I prefer my G720 to the other mouse.

Windows mouse speed setting makes zero difference in games, except for UI selection.


For Windows Mouse pointer speed? Yes it will for sure. Window's mouse speed is an emulation but practically a master setting in comparison to the software with actually changes mouse sensor calibrations. The MWO mouse speed is set also set 2 ticks from the lowest setting. I double checked that. For real though, if you haven't tried playing MWO on the G13 or at least one of Razer's keypads - you are missing out. And even though Razers' orbweaver is mechanical... G13 takes the cake with how well built it is. Mine is almost 4 years old.. and I have a spare.

Edited by M A S E, 16 January 2015 - 09:11 PM.


#18 evilC

    Member

  • PipPipPipPipPipPipPipPip
  • Legendary Founder
  • Legendary Founder
  • 1,298 posts
  • LocationLondon, UK

Posted 16 January 2015 - 10:58 PM

View PostM A S E, on 16 January 2015 - 09:06 PM, said:


For Windows Mouse pointer speed? Yes it will for sure. Window's mouse speed is an emulation but practically a master setting in comparison to the software with actually changes mouse sensor calibrations. The MWO mouse speed is set also set 2 ticks from the lowest setting. I double checked that. For real though, if you haven't tried playing MWO on the G13 or at least one of Razer's keypads - you are missing out. And even though Razers' orbweaver is mechanical... G13 takes the cake with how well built it is. Mine is almost 4 years old.. and I have a spare.

I have a G13, I use it if I am not using my throttle.

Set DPI settings using logitech / whatever, leave.
Go into windows mouse sensitivity, set to lowest you can still operate windows using.
Start up MWO, drop into game, observe look speed.

Kill mwo, open windows mouse settings, change to full (leave logitech etc dpi setting).

fire up mwo again, drop into match, observe look sensitivity is identical.

Many of us have tried and failed to make zoom-based sensitivity work in mwo through hacks like this.

The only way I can do it is thru LUA code in Logitech Gaming Software, but I use AHK to control zoom (I skip the middle zoom, but still use mouse wheel in/out)

Update - been working for hours on this - it is a lot more complicated to do auto-detection of dz / twist limits than I anticipated.

I am just on the verge of a breakthru tho, gimme a couple of hours.

Edited by evilC, 16 January 2015 - 10:58 PM.


#19 evilC

    Member

  • PipPipPipPipPipPipPipPip
  • Legendary Founder
  • Legendary Founder
  • 1,298 posts
  • LocationLondon, UK

Posted 17 January 2015 - 05:56 AM

New update, Auto-Calibrate canned.

You now use hotkeys and move the joystick to define the window.

So, for example, to set the low threshold for the X axis, you hit some hotkeys until the script says "X Low" (yes, it talks) and then move the stick right to increase the threshold, left to decrease.

The advantage being, this can be tweaked mid-game if needs be, and the system would also work to remove the deadzone from other games.

#20 Turbo Corvair

    Member

  • PipPipPipPipPipPip
  • 211 posts
  • LocationLake Ariel, PA

Posted 17 January 2015 - 05:23 PM

Edit: I just realized this is specifically intended for absolute (zero order I believe) joystick usage so now a lot of the stuff in the OP makes more sense to me. With mouse emulation I can do either first order or zero order but since I'm not willing to disable my spring centering for MWO (because I play mostly Star Citizen) I choose to still play with relative control on my stick. Before you make any noise about that please note that during the very first MWO Tournament weekend I held roughly 20th place for medium mechs for many hours before throwing in the towel and going to sleep. That was using plain old joystick support with the old (defunct) deadzone workaround.

Thank you so much for doing this! I solved the problem a few nights ago using TARGET mouse emulation and it's working great but I'm really happy to know there is another option available.

I'm using (all via TARGET)
Thrustmaster Cougar with U2NXT gimbal and hall sensors
SimPed rudder pedals (through the Cougar)
100% custom built throttle with Cougar grip

It's working great but man did I have to make some huge sensitivity adjustments! Let me know if there is a good reason for me to switch from mouse emulation to this fix, I've got it so perfectly adjusted now that I don't feel the need to switch without a good reason.

Turbo Corvair (MWO)
Trip (Star Citizen)
simpit builder extraordinaire (NGNG #49)

Edited by Turbo Corvair, 17 January 2015 - 05:30 PM.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users