Page 1 of 1

New brush model

Posted: Sun Jul 30, 2023 8:17 am
by Tunari
Assetto Corsa has had a big problem for the longest time: the wheel raycaster is terrible. Thankfully, CSP has had extended rays available for a while now. The extended rays are not a perfect solution, but they work perfectly fine for most purposes.
CSP has had a full-fledged brush model in the works for a while now, and it is now available in production, at least in the most recent preview releases.

Vanilla raycaster is a basic single raycast. Nothing to write home about this.
vanilla-raycaster.png
vanilla-raycaster.png (583.96 KiB) Viewed 7419 times
Pros:
Simple, light on physics side
Compatible with vanilla AC, no CSP/extension physics required
Cons:
Struggles over curbs
Starts to show its problems with wider tire applications.


Extended rays is a more advanced approach, while using basic raycasting. In principle, it shoots more rays along the lower diameter of the wheel, which results in more predictable traction, as the tire does not depend on a single contact point.
extension-raycast.png
extension-raycast.png (856.83 KiB) Viewed 7419 times
Enabling:
In tires.ini, add below VERSION

Code: Select all

[_EXTENSION]
EXTENDED_RAYTRACING=1
Pros:
Much more consistent grip over curbs
Improved tire contact in general
Can handle bumpier roads better
Cons:
There are none :idea:

The new brush model
This is currently available in the CSP previews. It's currently officially undocumented, and who knows if it ever will be. My mate found this from some guys patreon paymod. I don't know anything about brush models but I know RF2 does it and RF2 is cool.
brush-model-side.png
brush-model-side.png (464.43 KiB) Viewed 7419 times
brush-model-front.png
brush-model-front.png (386.02 KiB) Viewed 7419 times

Enabling:
In tires.ini, add below VERSION

Code: Select all

[_EXTENSION]
EXTENDED_RAYTRACING=1
LATERAL_RAYS=3
LONGITUDINAL_RAYS=5
MAX_RAY_ANGLE=60 ;max ray angle along the diameter of the tire
MAX_RAY_WIDTH_RATIO=1.3 ;ratio of width along perimeter of tread that rays get cast - not recommended to change this, very easy to cause problems
DISABLE_RAY_DOUBLING=1;will double the cast rays, at below 30-40kph
Pros:
Even more improved contact patch vs. extended rays.
Works, even when driving UPSIDE DOWN!!
Cons:
Heavier on CPU than other implementations
Currently undocumented apart from random comments in the INI
Prone to hard-crash the game if you manage to get a tire stuck in geometry (rare)