Understanding precombined previs and why mods that disable them can cripple game performance
Contents taken from bethesda community forums. Post written by ANDREWCX (Aug 22, 2017):
https://bethesda.net/community/topic/86381/understanding-precombines-previs-and-why-mods-that-disable-them-can-cripple-game-performance
As this comes up a lot I’ve been asked by some users to pull together some information for console mod players on some of the most talked about components of Fallout 4’s optimization system and how mods interact with those. This is my personal understanding and is not official information.
One of the most common complaints I have seen about Fallout 4 is that it’s not optimized - that’s simply not true, FO4 is actually highly optimized to enable what it does to work on weaker hardware (it’s a simple fact that PS4 & XB1 are weaker hardware platforms than gaming PC’s). The issue is that many mods intentionally or unintentionally break this optimization and don’t warn users of this.
Fallout 4 utilizes two main optimization systems that are connected – Precombined Resources (generally referred to as precombines) and Precomputed Visibility data (generally referred to as Previs).
Precombines
Simply put, the game engine bundles together similar items within a cell (see below for more on cells) into a single item to reduce the processor load when rendering the environment (as the more items to render and keep track of the more load there is). Due to the demands on the system this can’t be done in real time so calls on pregenerated precombine data.
The downside of precombines is that these items become locked – you can’t use the standard scrapping functions of workshop mode to scrap a precombined item and you can’t change its textures – it’s locked into the shape and position it was when generated.
Not all items are part of precombines. Items you can pick up (junk, weapons, armor), blow up (exploding cars, gas cylinders), or interact with (doors, working chairs and beds, harvestable plants) and some animated items are never part of precombines (as only static fixed items can be part of these).
Most grass (but not all) is procedurally generated so isn’t part of a precombine, some ground clutter (small rubble and sticks) is also procedurally generated but much is static and part of precombines. Decals (squashed cans, paper etc that’s flat on surfaces) is almost always part of a precombine.
Bethesda also didn’t include certain scrapable items in precombines within settlements but did outside it. Trees inside settlements are often not in a precombine so they can be scrapped while the vast majority of those outside of settlements are precombined.
Alterations to items in a precombine in a cell will break ALL precombines in that cell but only those in that cell. The Bethesda
Creation Kit provides a tool that lets mod authors regenerate replacement precombines in cells where they are broken for XB1 and PC only (these are counted as external assets and blocked by Sony so it’s not possible to repair precombines on PS4). Breaking and replacing a precombine isn’t actually a bad thing – Bethesda did it themselves when altering the Fort Hagen Satellite Array for Automatron. Unfortunately the CK available to the community is far less efficient in producing replacement precombines than that used inhouse by Bethesda so these can easily be very large files.
Adding items to a cell does not disable or change precombines (or previs) only deleting or altering them does and then only if they are in a precombine.
There are a number of workarounds that allow certain things that are ordinarily done by disabling precombines to be done while preserving these however these are limited in scope and incredibly fiddly and time consuming for the author so are only used very rarely.
Previs
Previs information is actually more significant to game performance in many ways than precombines. In simple terms – previs data tells the game what items in the surrounding 3x3 cells you can’t see because they are blocked from view by other items. Using previs the game engine will not render anything you can’t see.
In wilderness areas there’s still a lot of things you can’t see from any one position (the back of objects, items that are partially under the ground, or partially overlap etc however it’s in the city that the real impact of previs is felt. With previs intact only a very small area of the 3x3 cell space is actually being rendered at any one time as there are buildings blocking most views. With previs disabled all surfaces of all items in that 3x3 area are being rendered – that’s a huge increase in the processor load and will almost always lead to significant fps drops or crashes.
Any edit that disables a precombine in a cell will disable previs in the full 3x3 area centered on that cell.
There are a number of other aspects to the game that are important in understanding these concepts:
NPC tracking
The game loads and tracks NPC activity in a 5x5 cell area – outside of this it doesn’t actually track the NPC’s at all. Inside that area it tracks them and their activities interactions even when you can’t see them (but it only renders them when you can see them or if previs is disabled). This is why you can hear combat from Hangmans alley when you can’t see it – it’s also why you can snipe raiders in Hyde Park from Jamaica Plains.
Because of the interaction of these systems mods that add high resolution items to NPC spawns that are visible (custom guns or armor), or that simply increase the amount of NPCs will cause an increased load that will be significantly magnify the impact of any disabled previs.
LOD
LOD is essentially the very long distance data – this is separate from the previs and is used when you are outside the 3x3 cell area to render large items far away – this can be trees in the distance, or the downtown skyline etc. It’s not a major performance issue but it’s useful
to know that LOD isn’t altered by adding items to a cell or even disabling precombines and deleting them – that’s why you’ll sometimes
get ghost buildings popping in and out in the distance as you approach amod edited area.
More on cells
The game world is divided into a grid of squares of equal size (in the outside world, interior locations vary in size). There are 2965
navigable cells in the Commonwealth, 937 in Far Harbor, and 516 in Nuka World – beyond those there are a large number of cells outside the
borders. Each cell is ~400 times the height of a character on each side.
Because cells are a grid they don’t line up exactly to things like settlements – most settlements therefore include parts but not all of
multiple cells.
Overall processor load
With all optimization in place Fallout 4 is designed to use far less than 100% of processor capacity in normal circumstances in order to
allow spare capacity for peak events – things like extreme weather effects, large groups of NPCs, special effects (lots of laser fire, blood etc) all push the load up.
What does this all mean to a player?
Basically it means that any mod that breaks any precombines and doesn’t replace them will impact performance whenever the player character is near that area. On high end PC’s this can just be mildly annoying, on consoles this can be so bad as to make the game unplayable.
Mods that regenerate replacement precombines (only a possibility on XB1 and PC) will have negligible impact on fps but may have a large file
size due to the precombines.
Mods that disable a small number of precombines strategically will have an impact on fps but this can usually be managed and is likely the
only way to achieve what the mod is doing.
Mods that disable precombines over most of the map (and therefore disable previs everywhere) are time-bombs – they may not appear to cause
a big issue but essentially what they are doing is taking up all the spare processor capacity just to render the environment – this means
that when you get one or more other events that add to load (weather, NPCs, effects etc) instead of being pushed up to a peak of 80-90% you’ll
be at 130%+ and get significant fps drops (and when these are severe enough full crashes).
So – which mods should players watch out for?
Any mod could intentionally or unintentionally disable precombines / previs just as they can change other records - one of the weaknesses of the creation kit is that its very easy to accidentally edit a record and not realize you've done so - experienced authors know how to test for and clean these 'dirty' edits but many newer authors, and those that are simply careless do not.
The mods that most commonly disable precombines on a large scale fall into a few categories (note that individual mods may be implemented
differently so not every mod in each category will necessarily disable precombine/previs in a significant way but many or most will so caution
should be exercised):
- Scrapping mods – mods that let you scrap everything everywhere typically are implemented by simply disabling precombines
across the entire map and dumping most items into a scrap list – this isquick for the author to produce but will cripple all but the most powerful gaming PC’s. Mods that enable scrapping of everything in settlements only have a smaller impact but will still create fps hits in surrounding areas. Scrap That Settlement uses a different technique that doesn’t disable the precombines but all other scrapping mods break precombines in the areas they allow scrapping items that are normally included in precombines. - Greenery mods – mods that introduce green trees (or some other non-grass foliage) across large areas of the game world do so
by breaking precombines. My SimpleGreen mods are careful to not do thiswhich is why they only change some trees in some areas and don’t turn the whole Commonwealth into a forest. Other green mods on XB1/PC may regenerate broken precombines but doing so will create a large file size (typically over 500MB if the change is across the whole map). - Clutter removers – mods that reduce visual clutter may break precombines – it will depend on exactly what clutter is removed –
if it’s only those items that are procedurally generated then it will be fine but if other small items like decals or static grass is removed that will break the precombine/previs. As a workaround you can use my SimpleWhite mods to see which items are procedurally generated and which aren’t – SimpleWhite removes all grass and procedurally generated trashfrom the ground surfaces that it places snow on to get a cleaner look but doesn’t change static items so any grass or trash you see with SimpleWhite active is likely to be static rather than procedurally generated. - Texture replacers – texture replacers can be implemented in several ways. On PS4 these are highly likely to break
precombines in order to get the altered texture to display. On XB1/PC there are a number of approaches that can be taken - if a straight override approach is taken (where the mod essentially replaces each texture file with an identically named file in an identical file structure) then this won't break precombines however if another approachis taken (material swap etc) then precombines will need to be broken in order for these changes to display. Unfortunately there's no way a console user can tell these methods apart by looking in-game so it's important to carefully review everything the author has provided and do some testing in-game with just that mod enabled looking for the signs of disabled precombines/previs. Even texture replaces that are described as "optimizers" should be treated with caution - a lower resolution texture implemented by breaking precombines will damage performance far more than the savings from the less detailed graphics.
Authors are a very diverse group so there’s no one answer to this question. In general though it’s usually one of the following:
- Breaking precombines/previs is the only way the author knows how to achieve a particular outcome that’s important to the mod working as
envisaged. It may be that breaking precombines/previs is the only way anyone can achieve this or it may be that there are other ways but they are either too complex or too time consuming to be practical for that author. - The author is simply unaware of precombines/previs and the impact breaking them can have, especially to console players. This
is actually fairly common with Bethesda.net authors – console modding has brought many new authors into modding and there’s a lot to learn so it’s natural some won’t be fully aware of these issues. - The author chooses to ignore the issue because they don’t see it as a problem. Unfortunately, most authors tend to create mods on
high end computers where breaking precombines/previs is more of a mild annoyance than a game breaking issue – some of these authors have chosen to upload mods to console without consideration for console performance. - And finally a few authors have chosen to ignore this simply because they wanted to produce a mod that would attract more attention
than existing mods by making larger scale changes without the accompanying larger file size regenerated precombines would require.
Having a mod that breaks Precombines / Previs can cause other mods to display content they ordinarily wouldn’t. In the example of my
SimpleGreen mod, it’s setup to change various dead trees to living trees however it only changes a fraction of the trees of each model as to
change all of them would require a largescale breaking of the precombines in the majority of game cells. Those changes though are
still there as a potential for all cells so if you have another mod that breaks the precombines in a cell with valid dead trees SimpleGreen will
cause them to display as living – this may lead you to believe that SimpleGreen is altering the location and causing lag when it’s actually
just acting as a visual indicator that another mod has done so (and since the damage has already been done by the other mod having SG trees
isn’t going to make things worse in any event!).
5 comments
Sorry for my English, this is an auto-translation
few warn you or take seriously care of the related problems.
so i recommend to read this and about draw calls and to understand both also as a mod user if you want to prevent a fo4 performance nightmare.
"Because of the interaction of these systems mods that add high resolution items to NPC spawns that are visible (custom guns or armor), or that simply increase the amount of NPCs will cause an increased load that will be significantly magnify the impact of any disabled previs."
Are you referring to material swaps here as you do further down? If not, why would external assets equipped on NPCs in the forms of weapons, armor, and apparel break precombines and previs?