Your head, neck, body, inner ear, brain, and eyes together provide phenomenal vibration isolation and image stabilization. This is the one thing I have felt was missing from Assetto since day 1, especially in VR. I was thrilled to learn that CSP v0.2.0 provides full control over the head motion in Assetto Corsa, allowing me to finally create this.
AC Head Physics is a scratch-written physics engine that transfers g-forces and torques from the car to your head through a spring-like "neck", including all 6 degrees of freedom (3 displacement and 3 rotation axes). Each axis is characterized by an adjustable stiffness (i.e., how strong your neck is) and damping (how fast head movement slows down), and can be enabled or disabled. Rotations include optional additional "eye-like" stabilization to somewhat compensate for the lack of inner ear feedback from the game (we aren't in the matrix yet). Everything works identically with flat screens and VR.
For me, this enhances immersion, conveys acceleration, and reduces nausea (especially in VR), but it also allows my eyes to better follow the track so I can identify apices like a mf tryhard nerd. Compared to default behavior, the car will feel like it's "floating and rattling underneath you", not unlike the sensation in a real car (try watching with your periphery next time you're driving ).
Note the default settings are tuned to something like a GT3 car. For something more intense, you may want to increase the stiffness, e.g., by increasing the global stiffness modifier. If you mouse over each parameter, you will see documentation in Content Manager.
FULL FEATURE LIST
- Head physics: All six degrees of freedom (three rotational, three displacement) independently simulated with RK4 solver written and extensively tested by a physics professor (who specializes in acoustics, vibration isolation, and feedback stabilization ). Each can be enabled or disabled, and each has independent parameters to tweak to your liking.
- Additional visual stabilization: Option to further stabilize the rotational degrees of freedom, to somewhat simulate the tracking provided by your eyes.
- Horizon lock: Option to lock (or partially lock) your head's pitch (nod) and roll (tilt) axes to the horizon.
- Look-ahead: Option to look toward the drift angle, track (apex), and/or steering wheel direction.
- Gear-kick: Optional effect (not physics) to give your head an impulse when changing gears. This is not in the AC physics engine, but some F1 heads like "immersion", so...
- Optimized code: Reasonable efforts and approximations were made to minimize CPU overhead. Each frame takes ~35 microseconds to simulate on a 12th gen i5. This will not limit your framerate.
- Documentation: Hovering over each setting in Content Manager provides a pop-up with basic information. Let me know if something is confusing!
- Works the same in VR and flat screen
INSTALLATION (NOT STANDARD!)
- This physics engine requires CSP v0.2.0 or later.
- You cannot just drag this zip file onto Content Manager.
- Extract the "ac-head-physics" folder into ...\assettocorsa\extension\lua\cockpit-camera so that the "ac-head-physics" folder is sitting next to the "default" folder.
- Enable it in Content Manager by navigating to: Settings -> Custom Shaders Patch -> NeckFX, activating "Replace original CSP behavior", then selecting the script "ac-head-physics" at the end.
- If you want access to all the settings within Content Manager (note you can adjust these while the game is running!), you may need to get the latest untested Content Manager version by enabling Settings -> Content Manager -> Testing access. Usually this causes no problems, but 2 people have reported issues with the untested Content Manager (see below).
REPORTED CONTENT MANAGER ISSUES
Content Manager is amazing but let's face it: it lacks "attention to detail" and has a lot of bugs.
- At least one person reported that updating to the untested version of Content Manager messed with their settings. The solution is likely to do some combination of saving, resetting, and / or loading saved settings. Hopefully the ability to see NeckFX script settings gets pushed to a "stable" version soon, though the "stable" version has been randomly / surprisingly trashing my settings for years, though (usually right before a race ).
- Another user found that, though all the AC Head Physics script settings appeared to be defaults, something was corrupted in Content Manager behind the scenes. The (tedious) solution was to right click all the settings and select "reset" and / or adjust them, which likely overwrites the behind-the-scenes values.
At this point I only plan to make small tweaks. Let me know if there is something you want to try. Note I am a physicist with two kids and no time. If you have coding skills, feel free to check out the git respository (I would check it out directly into the appropriate Assetto folder), add a feature, test it thoroughly, and submit a pull request. I can help out through the LoPeN discord server as well.
NOTE
Please don't review bomb to try and get what you want. I made this for me but thought others might benefit from it. If something is confusing, you find a bug, or want to discuss ideas, the best way to get in the discussion is to join https://discord.me/LoPeN and navigate to #dev-corner. You can also use the discussion tab of this website (though I check that less frequently).
CREDITS
Jack: Physics nurd. Code nurd. Punching bag at the League of Perpetual Novices.
Jordash: Wrote the original VR stabilization script that got my foot in the door. He also gave all kinds of technical help and troubleshooting with AC (and video editing! ).
Rowin & his distinctive Duca shoes: Extremely fast driver with real-life track experience, gave lots of useful feedback about what default settings feel the most realistic (on a flat screen).
Damgam: Uncanny ability to break the physics engine. Provided valuable testing, videos and feedback that helped solve the drift-look artifacts.
DAZD: Feedback, testing and help with drifting look-ahead. And a beer.
The League of Perpetual Novices: Lots of testing and feedback. Lots of laughs and good times (now for more than 20 years!). Join https://discord.me/LoPeN for fun-focused, inclusive racing and more. Newbies and fasties welcome!
CHANGE LOG
v2.2.3: Smoothing and more
- Added "Smoothing Time" option to look-ahead. This filters the look-ahead effects to smooth out any jitters associated with things like framerate / framedrops, bad AI lines, and more.
- Added "Threshold" and "Full Effect" speeds to global settings to let you control how all the effects smoothly turn on (and off).
- Added "Max Frequency" to global settings (0 / disabled by default) that allows you to specify above what frequency the head physics can no longer keep up with the car bumps. This will allow you to transfer some of the faster vibrations to your vision, for a little more realism.
- Added the ability to automatically disable look-ahead features when switching to VR.
- Other minor tweaks you won't notice.
- Added drift, steering, and track (apex) following.
- Added optional horizon lock about pitch and roll axes.
- Added optional artificial gear kick effect that shakes your head when changing gears.
- Code optimization and improvements.
- Spring-inertia physics now uses RK4 solver. This is more accurate than the original method, and is more stable at low frame rate.
- Coded a hard ceiling on the damping of 1 (i.e., critically damped, no oscillations) for all 6 DOF. This will be imposed even if you set the damping higher in Content Manager.
- Adjusted the "soft" limits in Content Manager sliders.
- Added advanced option to limit the per-frame step size.
- Minor code clarity improvements.
Let me know if the smoothing fixes the issue for you, and I'd love to work on it at https://discord.me/LoPeN if it doesn't!