Giter VIP home page Giter VIP logo

Comments (4)

a1xd avatar a1xd commented on August 18, 2024 1

Ah I see, so post-scale and cap are not converted correctly in your case.
I'll add your conversions for those, and try to fix non-linear conversion too.
Thanks!

from rawaccel.

JacobPalecki avatar JacobPalecki commented on August 18, 2024 1

This is my fault - wrote quickly for linear case. Will fix.

from rawaccel.

systemofapwne avatar systemofapwne commented on August 18, 2024

So what I figured now, the adjusted sensitivity via accelerion of the original code looks like this (pseudo-code/math)

//#### InterAccel
x = input_x
y = input_y

x' = x*pre
y' = x*pre

speed = sqrt(x'² + y'²)/time = pre * sqrt(x² + y²)/time

scale = (sensitivity + (accel * speed)^n)

if(scale > senscap): scale = senscap

scale = scale / sensitivity

x'' = scale * x'
y'' = scale * x'

y''' = y'' * post //This gets applied
y''' = y'' * post //This gets applied

// All multiplied out for x value and N = 1 and no senscap applied

x''' = x * pre * post * ( 1 + (accel * pre * sqrt (x² + y²)/time) / sensitivity )

while the RawAccel's looks like this (for linear case)

//#### RawAccel (for linear acceleration)
x = input_y
y = input_y

// No prescaler

speed = sqrt(x² + y²)/time
scale = 1 + accel * speed

if(scale > senscap): scale = senscap

x' = scale * x
y' = scale * y

x'' = post * x' //This gets applied
x'' = post * x' //This gets applied

// All multiplied out for x value and no senscap applied
x'' = x * post * ( 1 + accel * sqrt(x² + y²)/time )

Your wiki suggest to use (preScaler * acceleration/sensitivity) to get the new accel value. But this omits the power N completely around (preScaler * acceleration) part. For the linear case, it is not important but for any non-linear case (like applying a Power-law or log), you will not be able to match the old with the new curve - Only, if you modify the DPI of your mouse (hence, adding a pre-scaler).

In the meantime, I figured out how to at least transform the old InterAccel "Linear" curve (with sens-cap) to RawAccel. Yet, the entry in the wiki about how to do it is not 100% complete and the conversion tool is not entirely converting the old curve to the new curve.

Here are the actual conversion you need to apply for a linear curve:

accel_new = accel_old * pre_old / sensitivity_old
post_new = post_old * pre_old                                    // post_new is called 'Sens Multiplier' in  RawAccel
senscap_new = senscap_old / sensitivity_old

from rawaccel.

systemofapwne avatar systemofapwne commented on August 18, 2024

I updated my previous post since I digged in deeper. With my rules applied at the end of the second post, my old

settings.txt

Sensitivity = 0.85
Acceleration = 0.26
SensitivityCap = 4
Offset = 0
Power = 2
Pre-ScaleX = 0.033333
Pre-ScaleY = 0.033333
Post-ScaleX = 0.4
Post-ScaleY = 0.4
AngleAdjustment = 0
AngleSnapping = 0
SpeedCap = 0
FancyOutput = 0

transforms to this settings.json file

{
  "GUISettings": {
    "DPI": 1200,
    "PollRate": 1000,
    "ShowLastMouseMove": true,
    "ShowVelocityAndGain": false
  },
  "Driver settings": {
    "### Mode Types ###": "linear | classic | natural | naturalgain | power | motivity | noaccel",
    "Degrees of rotation": 0.0,
    "Use x as whole/combined accel": true,
    "Accel modes": {
      "x": "linear",
      "y": "noaccel"
    },
    "Accel parameters": {
      "x": {
        "offset": 0.0,
        "legacyOffset": true,
        "acceleration": 0.010195976470588236,
        "scale": 1.0,
        "limit": 2.0,
        "exponent": 2.0,
        "midpoint": 10.0,
        "weight": 1.0,
        "legacyCap": 4.7,
        "gainCap": 0.0
      },
      "y": {
        "offset": 0.0,
        "legacyOffset": true,
        "acceleration": 0.0,
        "scale": 1.0,
        "limit": 2.0,
        "exponent": 2.0,
        "midpoint": 10.0,
        "weight": 1.0,
        "legacyCap": 0.0,
        "gainCap": 0.0
      }
    },
    "Sensitivity multipliers": {
      "x": 0.0133332,
      "y": 0.0133332
    }
  }
}

This now completely replicates my old curve.
In essense, the convert tool is bugged.
And you can not convert all curves (especially the nonlinear curves) from InterAccel to RawAccel, when a prescaler had been used in InterAccel, since a prescaler is missing in RawAccel by design.

from rawaccel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.