Skip to content

Instantly share code, notes, and snippets.

@gro-ove
Created April 24, 2023 01:04
Show Gist options
  • Save gro-ove/f36eeacae88d7673e5aecb15664e9fe5 to your computer and use it in GitHub Desktop.
Save gro-ove/f36eeacae88d7673e5aecb15664e9fe5 to your computer and use it in GitHub Desktop.
Changelog from 1st of January to 23th of April

CM changes

  • CSP installation improved to be more stable, especially for archives dropped into CM. Also, added support for short CSP-preview-installing URLs.
  • WeatherFX controller selection moved to Quick Drive weather selection for a more seamless integration, with dynamic WeatherFX controllers now capable of defining their own settings.
  • Drag and Time Attack modes combined into a single submenu, where CSP can also add new modes now (instead of them showing up in modules).
  • Python apps settings group moved to Assetto Corsa settings and renamed as such.
  • Option to hide tooltips from car and track selection dialogs.
  • Track map creation from geometry fixed.

Main CSP changes

  • Alternative soft lock implementation for steering wheels with FFB: unlike original, applies smoothly and accounts for steering velocity to try and make the boundary firm but not jumpy, and works with all wheels, although it might require some tweaking for different types of wheels.
  • It’s also now possible to use Lua to create custom FFB post-processing scripts (alternative soft lock initially was just that, now moved to C++ for slightly better performance, but its code is still available as an example). Those scripts can alter both FFB strength and damping.
  • Various tweaks for RainFX visuals, physics and AI behavior (more changes, are coming very soon):
    • AIs better adapt to rainy conditions depending on their level and aggression and choose safer trajectory during rain.
    • Tyres selection fixed. Also, if their default tyres are semislicks, they’ll switch to street tyres for rain.
    • Experimental option for AIs to drive around puddles.
    • There are still some issues with AIs occasionally braking too much before sharp corners on some tracks, fixing the issue.
    • Improved rain audio in default weather script.
    • Default rain audio volume changed to 100%.
  • Other AI tweaks:
    • Option for simple AIs to choose a less aggressive trajectory (disabled by default).
    • Option for AIs to act impatient if blocked.
  • VR:
    • Option for boosting spatial audio (available in VR tweaks, disabled by default): reduces minimum distance of some audio events to make their location more pronounced.
    • Mirroring stabilizer (available in VR tweaks, disabled by default): smooths out shaking in image mirrored on the main monitor for better spectating experience.
    • Vertical offset for custom VR mirroring.
  • New tone mapping functions have been added to YEBIS post-processing (accessible from built-in PP-filter editor), with an option for a PP filter to define their own unique tone mapping function as well.
  • DualShock/DualSense:
    • Option to try and block Steam from redefining them as Steam controllers breaking direct integration.
    • AC now can pick up devices connected live in case you forgot to wake up a controller before starting the race.
  • Apps list (on the right side of AC) update:
    • New icons for built-in apps, with more animated icons.
    • Tidying: some clean up, app names fixed, all development-related apps are moved to developer apps category, all setting-related apps are moved to settings category. Also, the original render stats app is removed with tidying enabled (can be disabled in GUI settings in the tweaks area). Note: new render app uses less CPU and GPU in its more compact form and now shows all the necessary information just as well, more on that a bit later.
    • Lua apps can specify their category as developer or settings.
  • Turning indicators:
    • Auto-cancellation when turning the steering wheel back is optional now and only applies to certain cars (set in car config, by default guessed based on car year and class).
    • Auto-activation rewritten to work more reliably.
  • Nice Screenshots module:
    • Steam integration:
      • Capture a proper screenshot without UI when the Steam hotkey is pressed (optional, enabled by default).
      • Store screenshots in the Steam screenshots gallery as copies or just move them there (optional, disabled by default).
    • Meta Tags stored in JPG screenshots improved to be more up-to-standard.
  • DXGI tweaks: DPI aware flag forcing AC to use resolution set in video settings with monitors with high DPI as well (use Render Scale of Graphics Adjustments module to scale AC up).
  • Graphics Adjustments: separate slider for render scale for making screenshots (screenshots might take longer to make if it’s different from main render scale value).
  • Drivers now can choose their own custom model to be shown online, while other drivers can choose if they’d want to see all, simulation-friendly or no custom models for other drivers at all. All models pass through moderation and first need to be added in a registry for things to work. Also, with this mechanism allowing to swap models live it should be possible to alter more things live later on.
  • FSR settings can be changed live.
  • Showroom mode: starts windowed by default, remembers its previous window size and position.
  • Cars previews generation using CSP:
    • AC runs in the background, takes pictures and closes.
    • Can make shots of up to 20 cars in a single run.
    • Best video and CSP settings apply automatically.
    • Supports all the latest render features and encrypted cars.
    • Tries to follow CM previews presets as closely as possible, although tone mapping options still might be off (YEBIS is very different in tone mapping to that mess I made for CM showroom with no prior experience).
    • Can be enabled in the latest CM version in “Content Manager/Showroom” settings (“Use CSP for final previews render”).
    • Resulting format is fully compatible with CM including “Update Previews” with its automatic selection tool.
  • Update for the new Photo app:
    • Depth-of-field moved to the Lens tab (previously CPL tab).
    • If accumulation DOF is enabled, a preview shader with more accurate representation will be used instead of YEBIS DOF (depending on YEBIS share sliders). This shader is not that nice, but it uses the same math accumulation DOF uses for accurattely highlighting blur radius. Also, a secondary checkbox in the Lens tab enables a focused area highlight helping to tune focus plane more precisely. This preview shader can be disabled in photo mode app settings.
    • Basic simulation for Tilt-Shift lenses: offset lens to the sides for panorama screenshots or for shots of buildings without perspective effect, and with accumulation DOF you can now twist and turn the focus plane the way you want.
    • Vignette slider is also added to the Lens tab.
    • Color correction tab got a new separate color grading slider. Also, automatic white balance has been updated and now a lot more accurate and has less tendency to misbehave.
    • FOV slider changed to Zoom with units similar to ones from modern phones (optional, can be disabled in apps settings).
    • Clip slider to get rid of nearby geometry like fences for high zoom shots.
  • Update for the new Render Stats app:
    • Details about physics CPU usage, late frames and FMOD CPU usage with extra details.
    • A graph to compare CPU and GPU consumption by different tasks relative to each other.
    • More information about CPU, memory and VRAM usage.
    • Detailed information about FMOD CPU and memory consumption.
    • Other threads show their timing along with the percentage of total frame time now.
    • Time it took to compute each car is shown in the other threads section (or in the physics tooltip).
    • Tips on how to gain some extra FPS by applying a few small tweaks with their relative visual impact.
  • New built-in app “CSP Debug” (as a replacement for old Python “Shaders Patch Debug” app):
    • Toggle driver visibility, open and close driver door.
    • Display debug physics lines, such as lines for tyres multiraycasting.
    • Disable vertex AO, show only vertex AO or normals (for debugging).
    • For debugging, show outlines of nearby light sources.
    • Offset time and change its speed.
    • Override current weather type (only for supported offline WeatherFX controllers, there is a library for seamless integration into a custom offline WeatherFX controller script).
    • Offset time, override weather type, wind and rain intensity in replays.
  • New built-in app “View & Video settings” allowing you to change some of video and view settings, such as world detail, MIP bias, PP quality, etc., on-fly.
  • New chat app shows a notification mark for unread messages even if closed (can be disabled in settings of the new task bar, use your mouse to click on the button in the upper right corner).
  • New post-processing script reprojecting image for a curved monitor or a series of curved monitors with the same dimensions and radius (or a combination of a curved and two flat monitors with different dimensions), supporting both single and triple render mode and overriding FOV for optimal coverage of the render area.
  • Rear view mirrors shaking in older cars on high speeds now also get a bit of vertical motion blur to be more similar to how things look in real life (optional).
  • Photo mode and PP filter editor now can use .CUBE color grading files too, converting them into 64×64×64 16-bit conversion tables to be applied in real-time quickly.
  • Blown tyres now glow and produce flames if heated too much.
  • Smoke and even flames for greatly overhead tyres (smoke starts at above 250° C).
  • New Small Tweaks options:
    • Hide damage and dirt from car textures.
    • Force AC to reconnect your devices on reappearing after being Alt-Tab’ed out of (might help with some Logitech wheels losing FFB).
    • Recolor default driver suit to be darker.
  • Nice Screenshots: option to stop heavy processing if current car is not controlled by AI or replay and moving fast, also there are options in Graphics Adjustments (enabled by default) canceling render scale and FSR for screenshots to keep quality high.
  • Built-in icons updated with more icons and increased resolution.

Fixes and optimizations

  • Various physics fixes and improvements.
  • New alternative implementation of AI spline lookup grid: more accurate with 1 m resolution, generating faster, about 30% faster, taking a lot less memory and a lot less disk space (120 KB vs 20 MB for Nordscheleife, 2 MB vs 230 MB for Shuto), with better support for AI splines self-intersecting at different heights.
  • Intensity of headlights on some of the mods fixed.
  • Fixed D-pad moving the mouse cursor twice per press with some wheels.
  • DualSense haptics configurations now load properly (previously that option had no effect).
  • Shadowed Wheels module in VR fixed.
  • Audio for blown tyres in replays fixed.
  • Another fix for orientation-based culling (was breaking semaphore on Drag track).
  • File system watching rewritten to reduce overhead, react faster and lose changes a lot less often.
  • On-screen rain drops no longer get stuck or consume FPS if there is no rain.
  • Servers can disable rain physics now (option was broken previously).
  • Smart Mirrors: adjusting mirrors FOV based on distance fixed.
  • Triple screen no longer breaks with strange glow outside of regions with lower quality FSR for sides.
  • Better handling of common AC errors, with options to solve some common problems.
  • Custom rendering modes (such as 360°) improved, with fixes for the starting camera and near clip distance.
  • Mirror camera reprojection improved, now with better handling of the reflected car itself (with real mirrors enabled).
  • App icons and user flags are packed into a single DDS atlas for faster loading and more optimal VRAM consumption.
  • IMGUI fonts: missing symbols “−” (minus sign) and “≈” are added to fonts atlases.
  • AC should no longer crash with scripts running an asynchronous task and being disposed before the task ends.
  • Pen and pencil integration (used in, for example, Paintshop app) now works with a custom render scale.
  • AC should crash less with misconfigured track audio, instead showing more informative error messages.
  • Order of custom physics tabs is fixed, plus a new option in the Small Tweaks module to fix the order even further.
  • Skinned meshes have their bounding spheres updated now to be able to use culling short time after AC loads (can be disabled in general settings in the “Optimization” section).
  • Human surface shader: eyes now follow the horizon if head is tilted.
  • Track map is no longer being created if missing by default, can be changed in general settings.
  • Issue with shadows breaking with sun being strictly vertically fixed.
  • Showroom mode: ground surface increased to 20×20 km.
  • Blurred shadows for accumulation screenshots fixed.
  • If a car doesn’t have SHORT_NAME set in car.ini, but has the latest version in the header, a regular name will be used instead.
  • If a KN5 file is missing a texture, there won’t be any spam of error messages anymore, just a warning during loading.
  • New memory-mapped file reader (which I’m using in more and more cases) no longer opens files in exclusive mode, allowing to edit them as well.
  • DDS loading improved: now generating MIPs asynchronously, falling back to the old method in case MIPs of DXT5-encoded textures are missing (still, please consider always adding MIPs). If a BC7-encoded texture is missing MIPs, they won’t be generated at all.
  • Small Tweaks scripts are now precompiled to load faster (source code is still available on GitHub).
  • Background threadpools now grow when needed and automatically shrink when unused to keep things simpler.
  • Refracting headlights occasionally looking black fixed.
  • New CSP apps appearing outside of a window with lowered resolution fixed.
  • Smoothing steering for AIs fixed.
  • F5 camera messing up LODs selection fixed.
  • Wipers are more quiet now.
  • Watching track skin directory (default) fixed, now textures are reloading live again (including .PSD ones next to .DDS if a codec is installed in the system).
  • YouTube app in Android Auto fixed.

Configs, physics and other things for content creators and server admins

  • New method of verifying integrity of important data using asymmetric encryption with a server plugin.
  • Setup items added by custom cars physics now can link to controllers the same as regular setup items.
  • Car configs:
    • Redefine min and max distances for audio events. Helpful for some quick tweaks if you’re using an existing audio bank.
    • Override human surface shader settings.
    • Override driver model and pit crew models and animations by ones stored locally within the car folder (please use cautiously, only if you need a unique model for a single car).
  • Toon shaders with outlines for some custom driver models.
  • Python functions added by CSP are stored in “extension/internal/python/functions.txt” and updated each time the CSP version changes.
  • Configs video.ini and system/cfg/graphics.ini are monitored for changes to apply some of them live.
  • New trees now can use tilt and tilt-variance values to align their direction with the direction of the surface below them. Also, tree lists now can add a low-frequency noise to their “variance” values with a third number for spread.

Lua-related stuff

  • New trees: option for Lua apps to reload trees live, including an ability to very quickly update a list with a few trees for live positioning.
  • New global functions: ac.isKeyPressed(), ac.isKeyReleased() (sometimes it’s just convenient to use them).
  • Some of the common WeatherFX functions, such as ac.getConditionsSet() or ac.getTimeZoneOffset(), are now available for all scripts.
  • Constructor rgb.new() now can take a HEX string and such and quickly set up colors.
  • New mat4x4.euler() function turning angles into a rotation matrix.
  • Cars audio not following the car fixed.
  • Shaders types for geometry shots fixed (still though, using .Shadows? It does look better for sure, but that is quite a mistake on my part, but I’ll fix it properly a bit later and keep things compatible too).
  • New Modes now can access game functions and specify the output to be shown in CM as a race result. Also, there are a lot more options now for new modes to control time, weather, wind, even customize loading screen.
  • Scripts with game API now can hide the Quick Pits menu and toggle apps hiding.
  • Apply any audio tweaks to car audio live with ac.CarAudioTweak.
  • Built-in JSON parser and serializer: JSON.parse(), JSON.stringify() (note: parser won’t throw any errors and instead try to process data and skip comments).
  • New stringify.binary(), stringify.binary.parse() and stringify.binary.tryParse() functions allow to serialize and deserialize tables in a binary format. Make sure resulting strings are handled by functions that are ready for strings containing \0 characters.
  • Shared events (ac.broadcastSharedEvent(), ac.onSharedEvent()) as well as background Lua workers now can exchange not just strings, but numbers, boolean values, nil and tables. Tables use binary serialization to make the exchange as fast as possible. Vectors and colors are also supported, both directly and as table values. Background workers can also return multiple values at once and run in their own dynamically growing threadpool to reduce the cost of starting a worker.
  • Functions ac.store() and ac.load(): add “.” as a prefix for a key for a hidden and faster entry.
  • Audio:
    • Lua scripts now can create a streaming audio source in-game, given they can feed it audio data fast enough (ideally I would recommend to use a background service for it, especially if you need lower latency).
    • FMOD audio events created with Lua: set minimum and maximum distance, override 3D cone settings.
    • Specify DSPs when creating audio from files or creating audio streams, alter doppler factor.
  • Car states: access differential preload and coast values, check the state of the driver door and if the driver is visible or not.
  • Scripts with access to physics API functions now can ask AIs to go to pits, change their tyres and control MGUK settings, tyre wear and override steering.
  • Any physics API affecting AIs now available to Lua apps, new modes and such without any “surface.ini” edits.
  • New physics.setAICaution() function for getting AIs to increase distance to cars in front of them.
  • Scripts now can block user messages in ac.onChatMessage() from appearing in the chat window.
  • Any scripts with access to car-controlling functions such as ac.setABS() and not limited to a single car now can use ac.setTargetCar() to target a different car, thus the same set of functions can be used by both car display and button scripts (controlling their own car) and by, for example, new race modes controlling any car.
  • New car-controlling function: ac.setBrakingLightsThreshold() to set braking amount after which braking lights turn on.
  • New UI controls: ui.notificationCounter(), ui.drawLoadingSpinner(), ui.drawDriverIcon(), ui.setDriverTooltip(), ui.setDriverPopup(), ui.mentionDriverInChat().
  • Draw inputs disabled with ui.pushDisabled() and ui.popDisabled().
  • Manipulate columns better with ui.getColumnWidth(), ui.pushColumnsBackground() and ui.popColumnsBackground() (last two can be used to draw a separator going across all columns, for instance).
  • UI functions called from Lua apps can load icons from DLL.
  • All UI functions now can use dynamic::screen and dynamic::hdr as image source to get an image from the screen.
  • UI functions drawing clipped text (such as ui.textAligned()) got an option to use ellipsis when clipping text.
  • New ui.drawTextClipped() and ui.dwriteDrawTextClipped() to draw some aligned clipped text (optionally with ellipsis) without advancing the cursor or adding an item, keeping things even faster.
  • New ui.drawSimpleLine() and ui.pathSimpleStroke() to draw a line or a few quickly without any antialiasing, ui.pathSmoothStroke() to draw a line with better antialiasing (in case it changes directions often).
  • Function ui.pushStyleVar() will no longer crash if there is a type mismatch, will automatically convert value and have type description in enum comments.
  • New ac.storageSetPath() function for all the scripts with I/O access allows two scripts to share the same storage and get notifications when settings change with ac.storageChanged().
  • Lua apps’ function os.runConsoleProcess() is more reliable now, allowing you to get callbacks when the process writes stuff to stdout/stderr asynchronously if needed.
  • New game API functions (available to Lua apps and new modes):
    • Alter driver model live: ac.packDriverModel(), ac.replaceDriverModel().
    • Change CPL camera settings.
    • Apply scene tweaks for something like pictures with ac.configureSceneTweaks().
    • Specify screenshot format in ac.makeScreenshot().
  • New modes got more options including ability to prepare a result to be shown in CM.
  • Car physics scripts: add torque, access tyre temperature, add extra tyre temperature inputs.
  • Scene API: create meshes and alter mesh vertices live, set blend, culling and depth modes for meshes.
  • A bunch of social-related functions: access and edit user tags (friend or hidden) for other drivers, get their username color, get their icon, override icons for other drivers (works with both new and original UI, there custom icons replace flags), show tooltips and context menus for drivers.
  • New CSP keyboard bindings are accessible from scripts, with an option to draw a control for editing option live.
  • Scripts with access to UI namespace (such as WeatherFX implementation or a post-processing filter script) can define new settings apps live.
  • Bytecode of most Lua scripts now gets cached into “assettocorsa/cache/lua” to speed up subsequent loading. Prefer to load required modules in the first few seconds of script’s lifespan, otherwise cache will be written and closed to save on memory.
  • During bytecode caching certain preprocessing is applied to speed things up and allow the use of proper “compile-time” inline consts and even const expressions using const() function.
  • Calling render functions in IMGUI UI callbacks, such as updating contents of extra canvas, no longer breaks everything.
  • Scriptable PP filters can override FOV with ac.setFixedFOV().
  • New functions ac.getTripleConfiguration() and ac.onTripleConfigurationChanged().
  • Property ac.getSim().isTimedRace is fixed.
  • New function ac.onFileChanged().
  • Drawing functions taking custom shaders got a parameter cacheKey allowing the use of the same shader in different configurations at once without interfering with caching.
  • Gameplay scripts can set the mouths of driver models open or closed.
  • Issue with INI serialization doubling slashes fixed.
  • Lua apps can be hidden online or offline with HIDDEN_ONLINE or HIDDEN_OFFLINE flags. There is also an API function ac.setAppWindowVisible() allowing to toggle app visibility live.
  • Few smaller optimizations for vectors and default libraries.
@Wanderkroete
Copy link

stereoscopic mirrors in VR are still broken. Black on right eye
ac-mirror-screenshot

@pastrioccio
Copy link

yes, the problem was on 115 too... how to solve it? why noboty talk about?

@Wanderkroete
Copy link

Many vr users have been reporting it. On patreon, discord and it has an official ticket in githubgithub .And yet it seems like it's not a thing of interest/priority with the developer 😔 At least there has not been any feedback/acknowledgement despite there were reactions to other issues that are solvable by the user

@pastrioccio
Copy link

All this is stupid, the 3d mirrors is a great thing and I can't go back

Many vr users have been reporting it. On patreon, discord and it has an official ticket in githubgithub .And yet it seems like it's not a thing of interest/priority with the developer 😔 At least there has not been any feedback/acknowledgement despite there were reactions to other issues that are solvable by the user

@pastrioccio
Copy link

Found the solution: Go to setting, assetto corsa, video - mirrors, and disable "High quality" it work for me with mirror resolution max too!

@MonstersOnParade
Copy link

If you disable stereo rendering for the mirrors it will also fix the right eye issue, though technically the image will be slightly off for one of your eyes

@Wanderkroete
Copy link

Yeah... it will look like a screen then instead of a mirror. And it affects the immersion a lot! AC is the only racing sim that I know that has mirrors with stereoscopic depth and it makes it awesome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment