Dismiss Notice

In the upcoming weeks mod approvals could be slower than normal.
Thank you for your patience.

Beta WRC-style Active Center Differential For Vivace 4.1

Active center differential responding to throttle and steering input

Tags:
  1. ProgUn1corn
    This is a Lua I'm working on my own WRC car, testing on Vivace.

    --------------------------------------------------------


    By default, Vivace only has a split shaft lock, which is similiar to pre 17 WRC and Rally2 cars. 17-21 WRC has an active center differential, which helps cornering and gaining traction on loose surfaces.

    According to M-Sport, the differential will lock when full throttle/brake and no steering at all, open when no throttle/brake and turning steering wheel. This is exactly what this mod will do.

    From interviews resources, it's clear that WRC teams can only homologate 2 sets of different power bias center differentials, and it's a set and fixed type instead of change on the fly type. So I have changed to 37/63 and 48/52 for tarmac and gravel. It's not too aggressive since Vivace is very front heavy (60/40).

    I wrote a basic detection that when counter-steering, you will not get less lock with steering input, to have a more controlled oversteer experience.

    Additionally, there's a speed map that will limit how steering can affect the differential lock at high speed, the threshold is 120km/h.

    Lastly, rear axle automatically disconnect from front when handbrake is pulled above threshold, or clutch input is beyond 75%.

    Aslo I added a Rallycross variant, which is basically a mechanical LSD with realistic values adn some features from my active diff. The Rallycross one also comes with handbrake and clutch detection, also with clutch release according to Fiesta RX's features.

    You will find this in Engine>Transmission>Transfer Case.

    I currently do not know how to get a fully customizable differential map for users to input, but I do have some tuning options to create a differential map by numbers. By default, the maximum lock is always full lock, if you want to change this you can modify the Lua file.

    The variables are:

    -Minimum Lock
    The minimum lock rate when throttle/brake input is at 0, without steering input. This can be further reduced by steering down to 0% (This is only my though, but I don't know if this is actually possible, since M-Sport only said "open", without actually telling us if it's full open or partialy open)

    -Brake Lock Threshold
    The brake input percentage when lock is at maximum (100% default). For example when this value is at 60%, when the brake is at 60% the lock will be 100%, rest will be calculated by a linear equation from minimum lock rate to 100%.

    -Throttle Lock Threshold
    The throttle input percentage when lock is at maximum (100% default). For example when this value is at 80%, when the throttle is at 80% the lock will be 100%, rest will be calculated by a linear equation from minimum lock rate to 100%.

    -L.foot Brake Max Lock
    The max lock when left foot braking map is actived. Usually it's a bit lower than 100%, the rest will be calculated from the range of Max-Min, input from 0 to 1 by using abs(throttle - brake).

    -L.foot Brake Threshold
    The brake threshold where left foot braking map is actived. Only when there is throttle input and brake input at the same time, and brake input is larger than this threshold, the L.foot brake map will be actived.

    -Steering Contribution
    How much steering will affect lock. At 100% contribution, fully locked steering and full throttle/brake at the same time will make differential lock at minimum. For example when the minimum lock is 30%, steering contribution is 100%, then fully throttled the diff lock is 100%, if you turn full lock at the same time the lock will be 30%, the rest is calculated linearly.

    Note that steering contribution will at the end multiplied by speed map, which is from 1x to 0.1x, from 0km/h to 120km/h. This means at low speed you will have a more open center differential compared to high speed, to ensure stability.

    Additionally when steering*yaw rate is less than 0, means you are steering at the opposite direction of the car slides, thus counter steering, steering contribution will not take effect.

    upload_2024-2-13_0-59-39.png

    -Handbrake Release
    The threshold where rear axle is automatically disconnected. Rallycross variant also engages clutch automatically.

    I'm very new to Lua, at this time the differential maps are all linear. For example:

    Throttle input is from 0 to 1, min lock rate is at 30%, then the throttle differential map equation will be:

    yLock = 0.3 + Throttle*(1-0.3)

    Brake is the same, but since with LSD you do not have torque input when braking, it will use preload instead. The amount of torque is very unsure at this point, but I have tested some values like 250N for tarmac and 500N for gravel. You may play around this with your own values by editing the Jbeam file. Differential map equation will be:

    yLock = 0.3 + Brake*(1-0.3)

    When coasting, without any throttle or brake input, the lock will be:

    yLock = 0.3

    If the threhold is below 100% differently for brake and throttle, then it will clamp to max lock rate before throttle/brake is at 100%. Let's say 60% brake and 80% throttle.

    yLock = 0.3 + Throttle*(1/0.8)*(1-0.3)

    yLock = 0.3 + Brake*(1/0.6)*(1-0.3)

    If you are left foot braking, this will activate the third map that will use the difference of brake and throttle input. Note that in this map it's designed to not affected by input threshold settings.

    yLock = 0.3 + abs(Throttle-Brake)*(Max L.foot Map Lock-0.3)

    All this is summed as y axis lockCoef, and there is x axis lockCoef for steering:

    xLock = 0.3 + Steering*(1-0.3)Contribution*Speed Map Factor

    The final center diff lock/preload will be:

    FinalLock = clamp(yLock - xLock, 0, 1)

    --------------------------------------------------------
    I have included the Github page of my own WRC car project, where this Lua is getting updated. If you are interested, you can download it and try for yourself. My car is heavily modded from Automation, where most meshes are further modified in Blender and 100% Jbeam is written by me from the ground up. It aims the accurate representation of 17-21 WRC car which strictly follows the regulation.

    Things that can be improved further (maybe not by me):

    - I do not know how to create a fully customizable differential map to input.

    - Differential maps are created with linear equation, so you can't customize at each point by yourself in game.

    - I have no smoothing written, so the calculations are done instantly with raw numbers, where steering will return to a very small value after some kind of input, even there is no input after.

    - There are no G sensor or sliding detection like ESC on your road going car, so the counter steering detection is not that perfect, there are 2 reasons.:

    One, I don't actually know if this is allowed by regulation, as M-Sport only said the basics, I don't know if they are actually able to write something that will detect yaw rate or wheelspeed or something to get even better traction.

    Two, it will introduce a TONS of new problems that no one knows how in reality is fixed. In RBR NGP it's flawed, like left foot braking logic is not how things should work, and in EA WRC it's not modelled at all. It's too much more complexed and it's not something I can assume and replicate accurately.

    Third, I don't know how lol. I don't really know how to do Lua. There should a better algorithm.

Recent Reviews

  1. pants
    pants
    5/5,
    Version: 3.0
    very good
    handles nice
  2. afx420
    afx420
    5/5,
    Version: 2.1
    splendid. we're moving up in rally pyramid with this joint
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice