Editing Precombined References

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 4: Line 4:


=== Precombination ===
=== Precombination ===
Precombination works by analyzing 3D reference data for a cell and merging like geometries across similarly located references into a different set of [[Model File | 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., <code>Meshes\PreCombined\0000DBBB_01B8656E_OC.NIF</code>.) 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.
 
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., <code>Meshes\PreCombined\0000DBBB_01B8656E_OC.NIF</code>.) 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 ===
=== Previs ===
Previs is precomputed visibility data that is calculated using the precombined [[Model File | 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., <code>Vis\Fallout4.esm\0000DBB9.UVD</code>.)
 
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., <code>Vis\Fallout4.esm\0000DBB9.UVD</code>.)


== How Precombination and Previs Work Together ==
== How Precombination and Previs Work Together ==
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 [[Model File | 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.
 
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.
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 ===
=== Solutions ===
* 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 <code>PreCombine Geometry</code> items in the World menu should work as well to generate new local combined [[Model File | NIFs]] and stamp new combination data onto the cells.
 
* 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 <code>PreCombine Geometry</code> 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 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.


Line 21: Line 25:


=== Replacing NIFs ===
=== Replacing NIFs ===
When a [[Model File | 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 <code>Clear Affected Cells For PreCombine Data</code> option in the Object Window right-click menu that should wipe the combined data from any cell containing that base object.
 
When a NIF is changed out from under an existing refreference, 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 <code>Clear Affected Cells For PreCombine Data</code> option in the Object Window right-click menu that should wipe the combined data from any cell containing that base object.


== Development Notes ==
== Development Notes ==
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.
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 ==
== Related INI Settings ==
The Fallout 4 team used two [[Initialization File]] settings during development to disable these systems completely:
 
The Fallout 4 team used two INI settings during development to disable these systems completely:


<pre>
<pre>

Please note that all contributions to the Fallout4 CreationKit Wiki are considered to be released under the Creative Commons Attribution-ShareAlike (see FalloutCK:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)