Difference between revisions of "Precombined References"
imported>Qazaaq (Added categories) |
(Added paraphrased Game Bug info from PJM's Previsbines Deep Dive for quick reference as well as links to StarHammer's Modern Precombines GitHub and PJM's Previsbines Deep Dive Article.) |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
There are two systems new to Fallout 4 whose shared goal is to help with performance: precombination and previs. | There are two systems new to Fallout 4 whose shared goal is to help with performance: precombination and previs. The modding community has coined the word Previsibines for these systems. | ||
== New Systems == | == New Systems == | ||
Line 37: | Line 37: | ||
Although these settings can cause performance issues, these settings can be used to test whether an issue is related to a plugin or precalc data. | Although these settings can cause performance issues, these settings can be used to test whether an issue is related to a plugin or precalc data. | ||
== LAND Records Notes == | |||
Altering [[Landscape]] data in a [[Cell]] appears to turn off precombination. In fact, anything that changes a LAND record on a cell appears to do it. | |||
References will need to be re-combined after adjusting LAND records prior to publishing to mitigate any potential performance issues. While it should be considered a Best Practice in regards to editing and optimizing cell data, this is especially important where consoles are concerned as they do not have the processing fidelity required to handle the additional system strain. File size and compatibility will have to be the trade offs for a smoother experience. | |||
== Game Bug == | |||
Do not create interiors or new worldspaces in an ESL or ESL-flagged plugin. You will not be able to create precombined data for them. | |||
== See Also == | |||
* [https://diskmaster.github.io/ModernPrecombines/ Modern Precombines] | |||
* [https://www.nexusmods.com/fallout4/articles/4316 Previsbines Deep Dive] | |||
[[Category:Game Systems]] | [[Category:Game Systems]] |
Latest revision as of 06:29, 12 October 2023
There are two systems new to Fallout 4 whose shared goal is to help with performance: precombination and previs. The modding community has coined the word Previsibines for these systems.
New Systems[edit | edit source]
Precombination[edit | edit source]
Precombination works by analyzing 3D reference data for a cell and merging like geometries across similarly located references into a different set of NIFs. For example, if you had three references to "RockWithLichen" and one reference to "RockWithNoLichen" tucked together in the corner of a cell, precombination would merge all four rock geometries together and all four lichen geometries together into a single NIF named for the combination key for that corner of the cell (e.g., Meshes\PreCombined\0000DBBB_01B8656E_OC.NIF
.) The cell would store the Form IDs for those combined references, so that the cell would know to not load 3D for those NIFs because their 3D will have already been baked into the combined NIFs.
Previs[edit | edit source]
Previs is precomputed visibility data that is calculated using the precombined NIFs. Previs builds a visibility graph of which non-mobile uncombined references and combined geometries are visible from different points, which is then used in the game for preculling the scene. This data is stored for a 3x3 collection of cells in the UVD files (e.g., Vis\Fallout4.esm\0000DBB9.UVD
.)
How Precombination and Previs Work Together[edit | edit source]
When we detect a change to a reference used in any of that process during a plugin load, we disable both systems for that area. Most changes would invalidate the precreated NIFs, so the game errs on the side of caution and just turns off precombination, and because the game cannot unmerge precreated NIFs, anything that turns off, or partially disables, precombination must also turn off previs.
Newly added references are fine, however. They are not prebaked into any NIFs and aren't in the combined lists, so they aren't affected. They are also treated by the previs system as dynamic objects, so although their visibility isn't calculated as optimally as it could be, the system at least is not shut down. But not every change can be adding something new.
Solutions[edit | edit source]
- The solution to this which was used in the DLC is to just recreate new precombination and previs data for the changed cells. Bethesda used an automated process for this, but the
PreCombine Geometry
items in the World menu should work as well to generate new local combined NIFs and stamp new combination data onto the cells. - The Visibility menu contains options for recreating UVD files with your changes. Ensure that you generate vis data for neighboring cells, too, since it contains information about what can be seen across cell boundaries.
The challenge for modders is in handling mods with overlapping areas since only one set of precombined/previs data can exist. For DLC, Bethesda just stayed away from areas that other DLC touched, but that won't work for modders. One possible solution for modders is to combine mods in a way that the precalc data is merged together.
Replacing NIFs[edit | edit source]
When a NIF is changed out from under an existing reference, that reference doesn't know it was changed, so precombination isn't disabled. Poking that reference, or any other combined reference in the cell, to get it into the plugin will disable precombined data though, and when the game tries to load the actual 3D for the reference, the game finds the new model and loads that model correctly. For similar changes to base objects, there is a Clear Affected Cells For PreCombine Data
option in the Object Window right-click menu that should wipe the combined data from any cell containing that base object.
Development Notes[edit | edit source]
Ideally, references would have been combined at run time, so that the developers and modders would not have to worry about it. However, this was not feasible due to memory restrictions and load time/streaming concerns.
Related INI Settings[edit | edit source]
The Fallout 4 team used two Initialization File settings during development to disable these systems completely:
[General] bUseCombinedObjects=0 bPreCulledObjectsEnabled=0
Although these settings can cause performance issues, these settings can be used to test whether an issue is related to a plugin or precalc data.
LAND Records Notes[edit | edit source]
Altering Landscape data in a Cell appears to turn off precombination. In fact, anything that changes a LAND record on a cell appears to do it.
References will need to be re-combined after adjusting LAND records prior to publishing to mitigate any potential performance issues. While it should be considered a Best Practice in regards to editing and optimizing cell data, this is especially important where consoles are concerned as they do not have the processing fidelity required to handle the additional system strain. File size and compatibility will have to be the trade offs for a smoother experience.
Game Bug[edit | edit source]
Do not create interiors or new worldspaces in an ESL or ESL-flagged plugin. You will not be able to create precombined data for them.