Improving Gimx 1:1 translation

Talk about anything concerning the source code.
Lucashsmello
Posts: 17
Joined: Tue Nov 20, 2018 11:44 am
Location: Brazil
Contact:

Improving Gimx 1:1 translation

Post by Lucashsmello » Thu Nov 29, 2018 3:42 pm

I have been working from time to time in improving the mouse/controller 1:1 translation for a long time in my Gimx github https://github.com/Lucashsmello/GIMX/tr ... nhancement. The latest update introduces a simple mechanism to map/translate Axis<=>Rotation Speed. Basically, it just consists of providing Gimx with a csv file that informs, for each axis intensity, its corresponding rotation speed in game. This csv file is game dependent. An example for Destiny 2 (PS4) is found here: https://github.com/Lucashsmello/GIMX/bl ... 2_data.csv.
To provide this csv file to GIMX, just run with option --advconfig. Example:

Code: Select all

gimx -p /dev/ttyUSB0 --config destiny2PS4.xml --force-updates --refresh 5 --advconfig ../destiny2_data.csv
This "advanced configuration" substitutes the mapping/translator function inside Gimx. Therefore, the values you defined for deadzone and exponent will be ignored.

For other games, the data (csv file) must be collected first.

Compilation and installation are similar to original GIMX, you just have to clone my modified version instead:

Code: Select all

git clone -b mouse2axis_enhancement --single-branch --depth 1 --recursive -j8 https://github.com/Lucashsmello/GIMX.git
Please, anyone feel free to test on Destiny 2. I would like to know if it really improves 1:1 translation. I found to be just perfect. :D

Edit: I forgot to mention that this Destiny2 data was collected with in-game sensibility set to 10 (maximum). I recommend seting this value to 10 when testing in game.
NOTE: Only works on PS4! i don't have a xbox. :(
Last edited by Lucashsmello on Fri Nov 30, 2018 2:40 pm, edited 1 time in total.

User avatar
GoDlike
Posts: 867
Joined: Thu Apr 28, 2016 12:47 pm
Location: Poland

Re: Improving Gimx 1:1 translation

Post by GoDlike » Fri Nov 30, 2018 9:25 am

This is very interesting indeed. Thank you for your valuable contribution. I'll let Matlo know about this. This could help counteract these acceleration spikes in games.
My hardware: PS3 Slim CFW 4.80 | PS4 Pro 500 Million LE | Xbox One S
Steam: Godlike_RU | PSN: GoDlike_RU | XBL: GoDlike

Cybereu
Posts: 129
Joined: Sun Jul 10, 2011 1:10 pm

Re: Improving Gimx 1:1 translation

Post by Cybereu » Tue Dec 04, 2018 12:10 am

I'm using it for a while and I can certainly tell that is working very well. In destiny I'm using about 13 sensivity 3200 dpi. I notice that the spike what occurs when axis touches last 10% were removed.

User avatar
Matlo
Posts: 5452
Joined: Wed Jul 06, 2011 7:01 am
Location: France
Contact:

Re: Improving Gimx 1:1 translation

Post by Matlo » Wed Dec 05, 2018 8:14 pm

Better translation is indeed possible, but we have to find a way to easily produce the game data :)
Very few people are ready to spend hours on calibration before playing!
GIMX creator Donate Shop

cotecine
Posts: 3
Joined: Tue Jul 03, 2018 9:45 am

Re: Improving Gimx 1:1 translation

Post by cotecine » Sat Jan 12, 2019 8:22 am

how do i implement the new mouse info into gimx? iam new to this so i dont know how to use the advanced stuff. thanks

Lucashsmello
Posts: 17
Joined: Tue Nov 20, 2018 11:44 am
Location: Brazil
Contact:

Re: Improving Gimx 1:1 translation

Post by Lucashsmello » Sat Jan 12, 2019 10:13 am

If you are using Linux, follow this tutorial: http://gimx.fr/wiki/index.php?title=Dev ... ux#Compile.
In the part that says to run "git clone -b master --single-branch (...)", use this command instead:

Code: Select all

git clone -b mouse2axis_enhancement --single-branch --depth 1 --recursive -j8 https://github.com/Lucashsmello/GIMX.git
There is also a tutorial for compiling in Windows: http://gimx.fr/wiki/index.php?title=Dev ... on_Windows.
I think that after you downloaded/cloned GIMX-build, open file windows\build.sh and substitutes the "git clone line" by the git clone command above. I never tested compiling in windows. Maybe there is more than just modifying this.

After installed correctly, download this file https://github.com/Lucashsmello/GIMX/bl ... 2_data.csv and run gimx in command line:

Code: Select all

gimx -p /dev/ttyUSB0 --config XYZ.xml --force-updates --refresh 5 --advconfig destiny2_data.csv
Substitutes XYZ.xml by your own configuration file. If you are using bluetooth, you should use other option instead of "-p /dev/ttyUSBX" (run gimx --help).

User avatar
GoDlike
Posts: 867
Joined: Thu Apr 28, 2016 12:47 pm
Location: Poland

Re: Improving Gimx 1:1 translation

Post by GoDlike » Sat Jan 12, 2019 10:26 am

cotecine wrote:
Sat Jan 12, 2019 8:22 am
how do i implement the new mouse info into gimx? iam new to this so i dont know how to use the advanced stuff. thanks
This is advenced feature that should not be used by regular gimx user. We are thinking about integrating it in user-friendly way in further release versions.
My hardware: PS3 Slim CFW 4.80 | PS4 Pro 500 Million LE | Xbox One S
Steam: Godlike_RU | PSN: GoDlike_RU | XBL: GoDlike

cotecine
Posts: 3
Joined: Tue Jul 03, 2018 9:45 am

Re: Improving Gimx 1:1 translation

Post by cotecine » Sat Jan 12, 2019 12:19 pm

Okej. thanks guys! ill give it a try. But i need to learn more about the software programing. Have a nice day.

HiddePoel
Posts: 4
Joined: Wed Jan 03, 2018 9:33 pm

Re: Improving Gimx 1:1 translation

Post by HiddePoel » Tue Sep 03, 2019 1:35 am

omg, this is exactly what i needed. You are awesome.

Could you please tell me a little bit about the calibration process? How do you come up with the numbers?
left number = joystick input value
right number = degrees per time unit?

Thanks in advance.

Lucashsmello
Posts: 17
Joined: Tue Nov 20, 2018 11:44 am
Location: Brazil
Contact:

Re: Improving Gimx 1:1 translation

Post by Lucashsmello » Wed Sep 04, 2019 11:21 am

HiddePoel wrote:
Tue Sep 03, 2019 1:35 am
Could you please tell me a little bit about the calibration process? How do you come up with the numbers?
left number = joystick input value
right number = degrees per time unit?
Right number is degrees per second.

I made a software to measure automatically the degrees per second for each input value. It uses a pci video capture device and image processing to do the job. I will try to create a repository in GitHub with the code (in C++) with instructions for how to use it, next weekend. Meanwhile, you can measure it by a strategy that i used in earlier days:
  • Make a broad list of joystick input values. Example assuming dead zone is 13: {20,25,30,35, ..., 125, 127}.
  • make your character look down;
  • send a single X axis input value using gimx event utility (see https://gimx.fr/wiki/index.php?title=Co ... mx_options). Example:

    Code: Select all

    gimx --event "rel_axis_2(32)" --dst 127.0.0.1:51914
  • measure the time taken for the character to do a cycle (360 degrees).
  • divide the 360 by the time taken in seconds.
It is not as precise and not as fast as using image processing + video capture card, but at least you do by yourself.

Tips:
  • Place your character where there is some great references on the ground, like two perpendicular straight lines crossing each other.
  • For very high speeds, i recommend waiting for multiples cycles (n) and then divide the product of 360 and n by the time taken.
  • For very low speeds, i recommend waiting for completing only 90 degrees.
  • You don't need to find all values. You can just use the values tested or use interpolation for finding the other values the were not tested. This website is easy to use: http://polynomialregression.drque.net/online.php. Typically, games implement a linear or a cubic relationship between input and outputs. See what fits with your data without exaggerating in the number of coefficients to fit.
  • For measuring time in linux, i think you can make a bash script like this:

    Code: Select all

    #!/bin/bash
    gimx --event "rel_axis_2($1)" --event " rel_axis_3(0)" --dst 127.0.0.1:51914
    sleep 1000
    
    , and run with

    Code: Select all

    time bash myscript.sh 30
    in a terminal for measuring the angular speed for joystick input 30. When the cycle in game is completed, press CTRL+C in the terminal, the time will be displayed. I have an old python script that may help with this. I will upload it later.
Tell me the games you want the mapping values. If i have it, i can measure it for you.

Post Reply