Stationeers is benefiting from the work we're doing across RocketWerkz. Building our other games with the BRUTAL game development framework has given us new ways to tackle performance, and this update brings those benefits to Stationeers.
If you are happy with our development, please consider supporting us by purchasing a DLC. Your support makes our updates possible.

https://store.steampowered.com/app/4842920/Stationeers_Supporters_Metallic_Spray_Paints
Terrain Performance

Terrain Meshing is now significantly faster when traversing and mining. This frees up CPU resources so they are available for other simulation jobs. This will largely address poor performance when mining or moving across terrain due to the CPU previously being over loaded with terrain work. Terrain Rendering on the GPU also received some improvements.
An in-depth research session on how to more efficiently mesh and render voxel terrains led to some performance improvements that we've applied to Stationeers.
Material Sampling
Optimizing how we sample terrain textures led to a large reduction in texture fetches in the terrain shader. Profiling revealed a 10-20% FPS boost in GPU-constrained scenarios.
Brick Prefill
Previously the marching cubes algorithm would step over each node in the terrain data to build the terrain mesh. This meant over 1000 octree look-ups for each 8x8x8m terrain chunk. We've added a new system that samples the required data in fraction of the number of calls and puts that into a pre-allocated "brick" of memory. The marching cubes function now steps over that brick and runs around 4x faster.
When traversing terrain, preparing the next set of terrain meshes on CPU threads would previously take around 55ms - this has now dropped down to 15ms - and frees up CPU resources for other systems.
Terrain Meshing
In addition to optimizing the frequently called terrain functions, we optimized the Main thread portion of terrain meshing to reduce terrain pop-in time. This is the part where the mesh data is parsed to Unity to be uploaded to the GPU. Previously this work was spread across multiple frames and in my test case took on average 40ms which was spread across 10 frames (players would see the terrain slowly loading in). Now the work can be completed around 4ms and is generally done within a frame.
One block of native memory is now used to store the meshing result, the main thread copies this to the GPU mesh then frees it. Previously this work generated around 2MB of garbage and now it generates 10KB, further reducing garbage collection stutters.
-Matty

BRUTAL
The research behind these changes came out of our work on other games built with our inhouse BRUTAL game development framework. This isn't the first time that work has made its way into Stationeers. For the Multiplayer Update, our Enterprise team, responsible for the BRUTAL framework, built a new RakNet package that exposed the full RakNet API to us directly via C#, including its debug tools.
BRUTAL is now open source, and as detailed in Dean’s post in the /r/gamedev subreddit it’s the framework Kitten Space Agency, Art of the Rail, Torpedia and Gruntz are built on. It also helped Ludeon Studios and their Waylith engine ditch Unity and achieve huge performance gains in Rimworld’s recent 1.7 patch. The source for the BRUTAL framework is available on GitHub if you want to have a look or use it in your own projects: github.com/ahwootech/BRUTAL

Upcoming Changes
Low orbit is still in progress. The goal is to have your space station and surface base in the same level, with crewed rockets and the pressurized crew modules we've shown previously getting you between them. More maps are also being worked on. Neither has made it into this update, and we'll share more as they get closer.

Torpedia
Another team at RocketWerkz has been working on Torpedia, a single-player submarine colony sim built on BRUTAL. You build and upgrade your submarine, explore the ocean from the surface down into the deep trenches, and keep your crew alive and working, each of them with their own needs, skills and moods.
Torpedia will be available soon on Ahwoo, where we'll keep developing it with players ahead of its full release on Steam.

Change Log 0.2.6429.27802
- Changed Texture Sampling optimization to the terrain shader. Previously both terrain Textures would get sampled per pixel regardless of blend value. Now If the blend value is 1 or 0 (i.e only one texture type) we only sample the one texture. This reduces the number of texture fetches from 22 to 14 in many cases. Profiling revealed a 10-20% improvement in Frame-rates in GPU bound scenarios on an empty world.
- Changed how the data is gathered for the terrain meshing function, Massively speeding up terrain mesh generation. Previously the marching cubes function would tap the oct tree each step when calculating vertices and then again when calculating Normals. Now a single prefilled 11x11x11 "Brick" is parsed into the marching cubes function. The pre fill is done in bulk and requires many less iterations through the octTree. Result: Preparing Terrain step on load is now 2x faster. The Marching Cubes function now runs around 3x faster.
- Optimized Main thread portion of Terrain Meshing to reduce terrain pop in time. This is the part where the mesh data is parsed to Unity to be uploaded to the gpu. Previously this work was spread across multiple frames and in my test case took on average 40ms which was spread across 10 frames (players would observe this as terrain slowly loading in). Now the work can be completed around 4ms and is generally done within the frame.
- Fixed Terrain Meshing for mesh workers thrashed the Garbage Collector. One block of Native memory is now used to store the meshing result, the main thread copies this to the Gpu mesh then frees it. Previously this work generated around 2MB of GC and now generates 10KB.
- Measured Threaded Performance Improvements from previous commit. The per thread average for generating the terrain mesh vertex data (Marching cubes) dropped to 15ms from 55ms, a 70% performance improvement. The overall all result of this work should be a much more responsive terrain system and less frame-stutter when traversing terrain.