I would like to thank the following individuals for contributing to, influencing, or otherwise informing this guide, and everyone who replied to the original thread and provided feedback:
- Blick Mondoo
Chapter 1 – A Summary of the Problem
Introducing The Triangle of Death
One of the more common areas of the game to encounter CTDs (crashes to desktop) and other gameplay issues when using Sim Settlements is the area of Sanctuary, Abernathy Farm, and Red Rocket, commonly referred to around here as The Triangle of Death. In order to understand why these crashes are occurring, we need to look at some of the core mechanisms Fallout 4’s engine uses to create the world around your character, how these core mechanisms are commonly circumvented when we mod our games, and what effects this can have on game stability.
First, we need to talk about triangles.
Triangle Rasterization and the Settlement Build Limit
Fallout 4 uses what's called Triangle Rasterization to render objects on the screen. Everything you see in the game is made up of a bunch of tiny connected triangles. The engine uses triangles because they are simpler to draw than other shapes, and in terms of geometry, every shape can be split (roughly) into triangles, but a triangle can only be split into other triangles. The settlement build limit measures the number of triangles the engine is trying to render in the settlement. Our computers, and the engine itself, can only render so many triangles in a given location at a given time AND still run all of the scripted functions it needs at the same time. Unfortunately, some of the tricks developers use to make more complicated scenery in games, like occlusion planes (which prevent anything behind them from rendering, thus saving precious processing power), cannot be used in free-built settlements and RotC cities.
However, players and mod authors quickly figured out ways to trick, bypass, and outright disable the settlement build limit, and it is a common practice to do so for people who build settlements extensively. With good reason, too, since the build limits on most cells fill almost immediately if you do any kind of building that involves decoration or custom objects. When the RotC city plans were created, the designers continued this practice and, in nearly all cases, radically exceeded the settlement build limits of the settlements the cities were housed in. This is particularly a problem in the area of Sanctuary, Abernathy Farm, and Red Rocket. Two of these three settlements (Sanctuary and Abernathy Farm) are large, and their vanilla build limits are much smaller than their physical sizes should be able to support. Thus, it is very tempting, and often necessary, to circumvent their budgets to get a logical, good looking, and good feeling build result.
uGrids to Load and uExterior Cell Buffer
The entire Fallout 4 map is divided into what are called Cells. To understand them and why they matter, you need to be aware of the settings "uGrids to Load", which is a game setting that tells the engine how many cells to fully render around the cell your character is in, and "uExterior Cell Buffer", which is a game setting that tells the engine how many cells to keep loaded in memory at any given time. The default values are uGrids to Load = 5 and uExterior Cell Buffer = 36. Whenever you pass a cell boundary, the game attempts to de-render/dump from memory this overlapping area and moves the loaded/rendered grid to center it on the new cell you are in.
The problem is that, standing in Sanctuary, an up to 36 cell area around your character is being loaded into memory, and everything contained in the 5x5 grid of cells centered around you is actually being rendered in-game. Depending on what direction you entered Sanctuary from, Abernathy Farm and Red Rocket are mostly within those ranges, and if the build limits have been exceeded in those locations as well... hopefully you see where this is going.
It's worse when you are moving, and worst when you are sprinting/riding a vertibird, as you are forcing the game to load, render, unload, and de-render that 5x5 cell area around your character pretty quickly. Also, these settlements themselves include multiple cells within the buildable areas, meaning moving around in them can cause you to change cells and trigger new load/render calculations. Add in the lack of performance tweaks that are necessarily excluded to allow players/RotC to build objects into the game world, all of the script calculations necessary to run the settlement systems in the background, the settler AI, and any other game scripts that are running in the background, and you can quickly cripple even the most capable computer.
Cell Borders and Moving in Settlements: Example 1
This is an example of the Fallout 4 cell map:
In this example, you are standing in the cell where Carla idles in front of the player's old house in Sanctuary. Depending on how you entered Sanctuary, a good bit of the area of the image could be part of the uExterior Cell Buffer area, and nearly the whole island is within the uGrids to Load area:
Now, let’s simulate you running to the Sanctuary end of the bridge:
Notice how the uGrids to Load area around you, which again is the area the game is graphically rendering, now encompasses most of Red Rocket, and has started to brush against the edge of Abernathy Farm, significantly increasing the number of triangles the game needs to try to render, as well as likely starting a number of script function calls which rely on cell load to trigger their firing (we'll cover this part in a moment).
Precombined Meshes and Previsualization Data (contributed by damanding, wim95, and GamerPoets)
Scrap Everything, which I love to death, exacerbates this problem greatly by removing the precombined meshes in the settlement cells, which normally function vaguely like "compressed" versions of the normal textures (that isn't entirely accurate, and I'm over-simplifying) and require less memory to load and then render graphically. With them off, ALL of the objects are rendered separately, adding a truly staggering number of things for the game to render, increasing the problem a lot.
Mod author damanding has written a guide on the Nexus forums which covers the technical details behind how the precombined mesh and previsualization systems work, available here: https://forums.nexusmods.com/index....ptimization-and-performance-systems-explained if you would like to know more.
There is also a short YouTube video by Michael at GamerPoets which gives a user friendly explanation the precombined mesh and previsualization systems, available here:
Mod author wim95 has created a test patch which re-generates the precombined meshes in Sanctuary, Abernathy Farm, and Red Rocket for users who are using scrapping mods like Scrap Everything, available here: https://simsettlements.com/site/ind...ata-in-triangle-of-death-with-scrap-mod.6923/ if you would like to test it.