Automobilista 2 Custom Force Feedback - Overview & Recommendations

Discussion in 'Automobilista 2 - General Discussion' started by Karsten Hvidberg, May 30, 2020.

  1. NuScorpii

    NuScorpii Well-Known Member

    Joined:
    Apr 7, 2020
    Messages:
    433
    Likes Received:
    472
    Cool, you've merged some of my new developments :cool:

    One of them is actually a huge breakthrough in what we can do with the custom ffb files so is worth detailing here for reference and for anyone else that is trying to do similar things.

    The currently accepted thinking of how the custom ffb works is that every time it is run through it starts fresh, all variables are assigned and you can only operate on the inputs to create an output. i.e. a function that can be made fairly complex. This works for most effects where you are just influencing the shape or scale of the input. However for the load based effects I was working on you needed to have a reference weight of the vehicle otherwise the effects would be blown out of proportion between light and heavy vehicles (There isn't a static weight for the vehicles provided, just the real time load of the front wheels). One way around this was to use the smoothing function to give a kind of average over time, but we don't know how the smoothing function works and it leads to odd effects such as ghost force from previous high load situations.

    What I managed to find out was how to persist variables across runs through the file. This allows you to create counter variables. That in turn opens up the ability to write custom averaging functions allowing a much more accurate and static average front load weight for a vehicle.

    Down to the specifics:

    If you declare or use a variable but don't initialise it, it will be auto initialised to 0.0 the first time it is used. So if you do this:

    (new_var new_var)

    The first run through the file will assign 0.0 to new_var and assign new_var to itself. You can use this to make a counter:

    (counter (+ counter 1.0))

    However, the variables do not get reset between different vehicles being loaded so a way is needed to reset it. This can be done by using the inbuilt variable et - elapsed time. This gives the elapsed time from the start of the current session. So to reset the counter we can do this:

    (counter (+ counter 1.0))
    (counter (if (max 0 (- et 0.5)) (counter) (0.0) ))

    This will start counting from 0.5s into the current session. You can then calculate a running average of the front load weight to determine if the car is under heavy load or light:

    (moving_avg (+ moving_avg 0.0))
    (moving_avg (if moving_avg moving_avg f_load_avg))
    (moving_avg (+ (* moving_avg (/ (- counter 1.0) counter)) (* f_load_avg (/ 1.0 counter))))

    And then compare that to the real time FL/FR_loads.
     
    Last edited: Jun 8, 2020
    • Like Like x 4
    • Informative Informative x 2
    • Winner Winner x 1
  2. Fizzy

    Fizzy Well-Known Member AMS2 Club Member

    Joined:
    Feb 29, 2020
    Messages:
    439
    Likes Received:
    334
    Ignore. Double post.
     
  3. Fizzy

    Fizzy Well-Known Member AMS2 Club Member

    Joined:
    Feb 29, 2020
    Messages:
    439
    Likes Received:
    334
    Suggestion: Make these 2 file branches easily distinguishable by their naming, by following some sort of theme or convention.

    Eg: All files derived from Gunboat Diplomat could begin with the word 'Gun' or have a boat reference in the title. Even a letter prefix like 'A' / 'B' or the Red / Blue file would be useful.

    Loving your work guys!
     
  4. Aza340

    Aza340 Active Member

    Joined:
    May 18, 2020
    Messages:
    364
    Likes Received:
    141
    What !
    Seriously though , thanks so much to both of you geniuses for the hard work you have put in . Have really enjoyed this thread and testing out the fruits of your labour
     
    • Like Like x 3
    • Agree Agree x 1
  5. Karsten Hvidberg

    Karsten Hvidberg Well-Known Member

    Joined:
    Feb 27, 2020
    Messages:
    1,255
    Likes Received:
    1,647
    Update on the big file:

    A smoothing function has been missed(at least by me) for a while in AMS2.
    After Reiza's downgrade on the ffb update rate the ride has felt even more rough than ever, so @NuScorpii 's discovery of persisting state between runs could not have come at a better time :)

    Now it is simple stuff to add something like well-controlled smoothing functionality.

    * Merged NuScorpii's Sigmoid stuff for the rack.
    * Added smooth function. Rack force final result now a combination of the the last 3 runs, based on specific weights.

    If you want to change the smoothing you can go to the "Smooth rack" section & adjust.

    Custom FFB file attached "Smooth Rider":
     

    Attached Files:

    Last edited: Jun 8, 2020
    • Like Like x 5
  6. 2ndLastJedi

    2ndLastJedi Free speech matters AMS2 Club Member

    Joined:
    Sep 7, 2016
    Messages:
    4,980
    Likes Received:
    2,183
    Okay , i have no idea what you just said or how i am supposed to change or what it changes ! Im not sure why im so slow at understanding what is being said here but i be confused ¯\_(ツ)_/¯
     
    • Like Like x 1
  7. NuScorpii

    NuScorpii Well-Known Member

    Joined:
    Apr 7, 2020
    Messages:
    433
    Likes Received:
    472
    Heh, don't worry, it's more for people who want to make their own files. There's nothing to change here for an end user.
     
    • Like Like x 2
  8. Karsten Hvidberg

    Karsten Hvidberg Well-Known Member

    Joined:
    Feb 27, 2020
    Messages:
    1,255
    Likes Received:
    1,647
    Hi Cully,

    Yes, they are.
    Clipping is dealt with and in the big file clipping is guaranteed to not happen no matter how you put your sliders too.

    So go ahead :)
    In the big file there is a setting you can define to specify your wheel base, that is prob. importantfor your wheel base if you use that file.

    Cheers!
     
    • Winner Winner x 1
    • Informative Informative x 1
  9. 2ndLastJedi

    2ndLastJedi Free speech matters AMS2 Club Member

    Joined:
    Sep 7, 2016
    Messages:
    4,980
    Likes Received:
    2,183
    Thanks mate :)
    I tried the big file (smooth rider) i set road rumble and engine enhance to 0.0 and put a 1.0 in for my CSWv2 and used the recommended 70/65/75, it feels good i guess but still a lot of noise , grain vibrations from track surface and i guess its scrub from understeer .
    Do you know how i can just get simple wheel getting light when understeering or locking brakes instead of the grain scrub feeling and remove the track vibrations ? In older builds even if i didnt feel the rumble of the track surface i still could feel dips , lumps , crests and had a good feel for a bumpy track but now it just feels like artificial track vibration :(
     
  10. Karsten Hvidberg

    Karsten Hvidberg Well-Known Member

    Joined:
    Feb 27, 2020
    Messages:
    1,255
    Likes Received:
    1,647
    Yes, the rumble effect can be disabled at the top: "road_rumble_fx" set it to 0.0.
    Reg. the scrub try changing:
    (sf_s 0.55) to (sf_s 0.70)
    and
    (sr_s 0.52) to (sr_s 0.65)

    Cheers!
     
    • Like Like x 2
  11. deadly

    deadly Well-Known Member

    Joined:
    Jul 8, 2016
    Messages:
    1,587
    Likes Received:
    552
    hm, still using one of your old files and am fine with it. can feel the road much better than with the new one, but i guess it is a matter of personal taste. thanks for your efforts. :)
     
  12. Dean Ogurek

    Dean Ogurek "Love the Simulation You're Dreaming In." AMS2 Club Member

    Joined:
    Mar 9, 2016
    Messages:
    1,644
    Likes Received:
    739
    @NuScorpii

    I tested "Heavy Messing" last night and find it to work extremely well with my SC1 DD-wheel. It seems to have removed the tendency for what "chunky" factor remains in the FFB (with cars that have a tendency to bounce), resulting in FFB that really feels seamless now.

    Thank you for sharing your work! :)
     
    • Like Like x 2
  13. kkdrummer

    kkdrummer Well-Known Member AMS2 Club Member

    Joined:
    Jun 25, 2016
    Messages:
    1,631
    Likes Received:
    782
    I tried rumblefx at 0 but the crazy rattling is still present. I tested the F3 301 at Donington. I think it has to do with the car and maybe the track as I've tried several of your files and nothing can remove the rattling. Ffb overall feels great though, thanks.
     
  14. Karsten Hvidberg

    Karsten Hvidberg Well-Known Member

    Joined:
    Feb 27, 2020
    Messages:
    1,255
    Likes Received:
    1,647
    Ah, then lower your in-game FX, possibly to down around 50, if you have it high.
    That should work!
     
    • Like Like x 2
  15. Cfst

    Cfst Active Member AMS2 Club Member

    Joined:
    Jul 5, 2016
    Messages:
    169
    Likes Received:
    60
    These files are well-loved by the sounds of it, and there have been so many iterations; super impressive that some people have the ability to highly customize the experience. I have not attempted testing a single one since they are updated at a faster rate than builds come out :D

    Might I suggest separate threads in the fashion of LEXXVR's custom files... respectfully, of course. It seems now with two standalone files that this could be simpler for the slow guys (like myself). One could just go to the thread of the author, maybe those authors could append the most recent iteration by date to the OP etc etc. This way not only could the suggestions for changes or specific questions be separated by thread, thereby reducing the complexity to follow along...but the advice for further tuning could be separated and easier to follow as well. A polite reminder that the previous thread ran up to 70+ pages, surely burying lots of pertinent and valuable information in the process..

    @NuScorpii @Karsten Hvidberg

    This could surely be an awful suggestion. In which case simply ignoring this post would suffice, rather than sparking a hotly contested internet debate.
     
    Last edited: Jun 8, 2020
  16. 2ndLastJedi

    2ndLastJedi Free speech matters AMS2 Club Member

    Joined:
    Sep 7, 2016
    Messages:
    4,980
    Likes Received:
    2,183
    Thank you , will try tomorrow now , i need sleep . Thanks mate :)
     
  17. kkdrummer

    kkdrummer Well-Known Member AMS2 Club Member

    Joined:
    Jun 25, 2016
    Messages:
    1,631
    Likes Received:
    782
    That was with fx down to zero. Just did a race at Donnington in a stock car, what great ffb feeling thanks! No rattling in those cars. Still think the f3s and possibly other formula cars need some work.
     
  18. Aza340

    Aza340 Active Member

    Joined:
    May 18, 2020
    Messages:
    364
    Likes Received:
    141
    Don't worry mate it's not just you who feels a bit thick when looking at the intricacies !
     
    • Funny Funny x 1
  19. steelreserv

    steelreserv Well-Known Member Staff Member AMS2 Club Member

    Joined:
    May 25, 2020
    Messages:
    1,008
    Likes Received:
    1,262
    This *is* the thread for nuscorpii and Karsten custom files and the format allows for the necessary context and discussion to take place for improvements.

    For now I’d suggest working backwards for the latest iterations. The large file (23+kb) is the collaborative “original” development and the smaller one (5+kb) is nuscorpii’s streamlined version.

    They are both friendly to all wheel types so keep an eye on discussions/messages from users with your wheel and take it from there.
     
    • Agree Agree x 2
    • Like Like x 1
  20. Cfst

    Cfst Active Member AMS2 Club Member

    Joined:
    Jul 5, 2016
    Messages:
    169
    Likes Received:
    60
    They are working on two standalone files, so I thought it might be okay to suggest separate threads. Thanks for the heads up.
     

Share This Page