Jump to content

Fallout 4 Optimization and Performance Systems Explained


Recommended Posts

OK. Yeah I am in Sanctuary right now. But I did see a slight increase in performance. Will test in other places and post again. Potato PC BTW. However if precombineds could be turned off in specific areas where it is not needed it could still help some couldn't it? Like areas outside of the city that do not have as much to render? I only tried this because someone suggested it on their mod page. I fully realize I will need it for most areas- just messing around.

Link to comment
Share on other sites

I can guarantee this is B.S. even in sanctuary. I have disabled that setting in the ini file as well when I first started messing with the system, and as Ziegfelding(A Bethesda developer) had warned, it dropped performance to a crawl on my system, and made the game unplayable. That ini setting is for testing purposes only, and is highly NOT recommended for use in game. The whole point of the Precombine/Previs system is to improve performance by reducing the number of meshes needing to be rendered. There is no way that turning this system off improved performance on your system.

 

in fact, Here are the man's words:

 

"It sounds like this actually is behaving as expected. Not sure what information is out there on this so here's an overview.

There are two systems new to F4 to help with performance: precombination and previs.

Precombination works by analyzing ref 3D for a cell and merging like geometries across similarly located refs into a different set of NIFs. For example if you had 3 refs to RockWithLichen and 1 ref to RockWithNoLichen tucked together in the corner of a cell, precombination would merge all 4 rock geometries together and all 3 lichen geometries together into a single NIF named for the combination key for that corner of the cell (eg: "Meshes\PreCombined\0000DBBB_01B8656E_OC.NIF"). The cell would store the form IDs for those combined refs so it would know not to load 3D for those NIFs in game since their 3D will already be baked into the combined NIFs.

Previs is precomputed visibility data and it is calculated using the precombined NIFs. It builds a visibility graph of which non-mobile uncombined refs and combined geometries are visible from different points which we then use in game for preculling the scene. This data is stored for a 3x3 collection of cells in the UVD files (eg: "Vis\Fallout4.esm\0000DBB9.UVD").

When we detect a change to a ref used in any of that process during a plugin load we disable both systems for that area. We don't know what you did to the rock but most changes would invalidate the precreated NIFs so we err on the side of caution and just turn it off. Because the one rock you edited has been merged with the other rocks near it we can't just remove that one rock. (We *may* be able to just remove that key though. I'll have to look into it to verify we never combine a single ref across multiple keys. That might be a possible optimization.) But anything we do which turns off (or even partially disables) precombination needs to turn off previs.

Newly added refs are fine. They are not prebaked into any NIFs and aren't in the combined lists so they aren't affected. They also are treated by the previs system as dynamic objects so while their visibility isn't calculated as optimally as it could be they, it at least doesn't have to shutdown the system. But not every change can be adding something new.

The solution to this which we used in DLC is to just recreate new precombine and previs data for your changed cells. We use 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 including your changes. Make sure you generate vis data for neighboring cells too since it contains info about what can be seen across cell boundaries as well. The difficulty I imagine modders will run into is with mods in overlapping areas since only one set of precombined/previs data can exist. For DLC we just make sure we stay away from areas other DLC touched but that won't work for modders. I think we'll probably end up with a lot more combination mods (mods A, B, and C all make changes to Sanctuary so once those are locked down someone merges them together into ABC_Optimized with all the combined precalc data for all 3 mods).

The situation in your bridge example, if I'm understanding correctly, is just changing the NIF out from under an existing ref. The ref doesn't know it was changed so it doesn't disable precombined data so the bridge shows up unchanged. Poking that ref (or any other combined ref in the cell) to get it into the plugin disables precombined data and when we try to load the actual 3D for the ref it finds the new model and loads correctly. Which is what I'd expect. For changes to base objects like that, there is a "Clear Affected Cells For PreCombine Data" option in the object window right-click menu which should wipe the combined data off any cell containing that base object.

Ideally we would do all this combination at run time so devs and modders didn't have to worry about it, but that just wasn't feasible due to memory restrictions and load time/streaming concerns.

Hope this helps.

PS: we had two INI settings we used in development to disable these systems completely (bUseCombinedObjects=0 and bPreCulledObjectsEnabled=0). I just gave them a quick try here and they seem to still work but as you'd expect they can cause performance issues. But when modding it can be a way to test if the issue is something wrong with the plugin or just fighting against precalc data."

Link to comment
Share on other sites

OK maybe I didn't see an increase in performance, but I didn't see a drop in it either. I am not going to argue that it is needed- because it is. I was looking at a mod that adds trees and the author said that to see more trees in game to add that line to your ini. Now why would he say that? And this is a fairly popular mod; Commonwealth Conifers.

Link to comment
Share on other sites

OK maybe I didn't see an increase in performance, but I didn't see a drop in it either. I am not going to argue that it is needed- because it is. I was looking at a mod that adds trees and the author said that to see more trees in game to add that line to your ini. Now why would he say that? And this is a fairly popular mod; Commonwealth Conifers.

No clue why he would tell people to do that, but he wouldn't be the first modder that skimmed a post in a thread somewhere, and ran with suggesting something they misread.

Link to comment
Share on other sites

I'm curious how the game handles building in settlements. Specifically, when you build a wall or shack- does it have any kind of occlusion culling? I mean the game treats it as a solid object. Will need to look in wire-frame to see. I have noticed in interiors that the sliding doors do have occlusion planes I guess is what you call them. When looking down a corridor and then closing a door. Maybe this could be a good way to help in larger interiors that impact performance significantly?

Link to comment
Share on other sites

Previs has a dynamic component which I'm still investigating, but supposedly this works for moveable statics and settlement objects etc (examples to generalize what it does).

 

Now on my longest save I have a 3 story concrete building in sanctuary, standing behind it gives me a better draw call rate but moving out to the road shows a rise therefore drop in fps (its a busy settlement). But I would not saying conclusively this is because if previs etc as it could just be the location and angle I'm facing. I haven't really tested this so much but that's one current observation I can give you.

Link to comment
Share on other sites

OK. Now I am thoroughly confused about this issue with using pre- combined system or not. Viits himself has commented on this very thread about using the Scrap Everything mod as a sort of general patch for other mods that might conflict using the combined system. On the top of the mod page they say to add that line to your Fallout ini. But then you two tell me there is no way the game will run well without it. WTF? Who is right and who is wrong here? Why are they saying it is necessary for the mod to work correctly? Could someone please clear this up once and for all. :huh:

Link to comment
Share on other sites

OK. Now I am thoroughly confused about this issue with using pre- combined system or not. Viits himself has commented on this very thread about using the Scrap Everything mod as a sort of general patch for other mods that might conflict using the combined system. On the top of the mod page they say to add that line to your Fallout ini. But then you two tell me there is no way the game will run well without it. WTF? Who is right and who is wrong here? Why are they saying it is necessary for the mod to work correctly? Could someone please clear this up once and for all. :huh:

The mod page says to use it ONLY if you use a mod like Conquest and want to be able to scrap the world. There are also a number of warnings about performance impact.

 

The mod disables it on a cell-by-cell basis as needed for the vanilla (base+DLC) settlements. It doesn't have much of an impact in places like Sanctuary for the most part, for a decent computer. Having the ini edit active WILL have a performance impact in certain parts (like the city), and adding the second ini edit (killing previs) will often drop fps to the 10-25 range in the city.

 

It is possible (potentially), if you have some very aggressive "optimization" mods, for disabling precombineds in a given cell to improve your performance, but it is very, very unlikely*. Disabling previs is guaranteed to reduce performance, usually significantly more than disabling precombineds. The reason that mod author made that recommendation presumably is due to their mod editing vanilla tree records, and so disabling precombineds lets the dead vanilla trees that are in precombined meshes (many of which will be some of those 1-2 mesh precombineds) use the new meshes. Personally, I never recommend using the ini edit, because it is too indiscriminate.

 

*It would require most/all the precombineds to be 1-2 mesh nifs, and likely the "optimized" meshes would be noticeably lower poly

Link to comment
Share on other sites

Admittedly I am using only 2k textures on almost everything. Since I have never seen my game at ultra settings I could not say much about a difference in quality. But with the first ini. edit I am seeing a slight improvement in performance in every area including downtown around Diamond City and further east towards the library so far. Here is a screenshot at 1600x900 resolution; note that in these areas I normally can only manage about 18-20 fps. And please try not to laugh at my wooden pc. :tongue: I have also tried this in DC and did not see a difference in performance. Edit: Interiors are where performance suffers the most. But that is still mostly the lighting.

 

Link to comment
Share on other sites

I've just experienced a weird one in Concord. I came across a cell I recently regenerated where I cannot sprint, but upon checking if previs was turned off I get the following:

 

Screen_Shot89.pngNotice the glass:

 

Screen_Shot90.png

Game crashed shortly after. Having a look to see what is wrong with this cell.

 

EDIT - missing image.

 

EDIT 2 - Yep there's a couple of cells I missed in BTI that have the No Previs flag. Still interesting about the glass though, and why Previs remained on.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...