Jump to content
⚠ Known Issue: Media on User Profiles ×

Fallout 4 Optimization and Performance Systems Explained


Recommended Posts

I have probably dumb question, but I like to ask it anyway: if I replace an object reference with a copied (base) object, then does this will break precombines/previs?

For example, there is an object reference to a bed. I made a copy of the (base) object, let's take NpcBedGroundSleep01 "Mattress" [FURN:0002FBF9] from Fo4 and named it as my_NpcBedGroundSleep01. After that via xEdit I have changed "Name - Base" of the object reference from NpcBedGroundSleep01 to my_NpcBedGroundSleep01. Note that my_NpcBedGroundSleep01 contains only "cosmetic" changes, like another set of keywords, but the NIF is the same as for original record NpcBedGroundSleep01.

Do I need to rebuild precombines in this case or not? Thanks.

 

Update:

1. I have figured out that there is a case, when there is no need to rebuild precombs/previs. If an object references has not referenced by a parent cell/location (in XPRI/XCRI records), then it is not a part of precomb. This object ref would just be rendered in the game at runtime.

 

2. It is also clear, that if there are no changes to NIF, then there is no need to rebuild precomb. But the question about regenerating previs data is still open: do uvd files contain any information about the base object (not just NIF related data), so if the reference to the base object would changed then previs would be broken?

Edited by gh0stwizard
Link to comment
Share on other sites

  • Replies 589
  • Created
  • Last Reply

Top Posters In This Topic

You can also tell if a reference is part of a precombined mesh by looking at where it says "Placed Object" in the left pane of xEdit. If it is listed with brackets (i.e. [Placed Object] instead of Placed Object), it is part of a precombined mesh. If there are no brackets, it is not. Things like Furniture records and Activators should never be part of a precombined mesh, as a precombined mesh is just the visual component and cannot be interacted with in any way.

 

For vis: once it is generated, it doesn't care about the record. So unless you move something that was used for occlusion culling (like the privet hedges, or large buildings), you are fine. If you don't move or change the visual .nif and are just changing how you interact with it, you are definitely fine.

Link to comment
Share on other sites

XPRI is filled when you generate previs. I don't think it is actually used in-game, though I could be wrong, but previs will definitely work fine if the XPRI is empty, so if it is used in-game it is just a minor optimization thing that makes the optimization of previs (occlusion culling) slightly better.

Link to comment
Share on other sites

 

Fallout 4 is very RAM and CPU depending. Your graphics card is not that important.

 

Yeah, I guess I just dont care about the occasional stutter.

Its true tho that Fallout 4 likes fast RAM, which I have now plenty of. Altho I never got my game to use more than 4.5GB RAM ever, but that may change now with Buffout 4 memory manager patch.

 

Still wondering though, why does the game not use hardware accelerated occlusion culling? That's been supported since DirectX 9 and I suspect an RTX card would excel at doing this in real time. But I guess the answer is probably: Consoles. The lowest common denominator, meh. That, and Beth seems to prefer slapping Previs on top, just to gloss over many bugs - especially in indoor cells. The roombounds/portals are usually a complete mess in vanilla game indoor cells, so if you disable previs w/o further manual intervention, you're going to get an epileptic seizure from stuff flickering in and out of existence. And then there's the Object Fade Glitch that hits in densely populated outdoor cells w/o precombines/previs.

 

"Fixing it???? Naaaaaaa.... Jus' click this button and the bug is gone." - Yeah, right. Bah, I hate this crap with a passion!

Link to comment
Share on other sites

  • 2 months later...

XPRI is filled when you generate previs. I don't think it is actually used in-game, though I could be wrong, but previs will definitely work fine if the XPRI is empty, so if it is used in-game it is just a minor optimization thing that makes the optimization of previs (occlusion culling) slightly better.

 

I think it is, but I don't know how or why its used. If you generate previs any adjacent cells not within that cluster can sometimes have XPRI records added to them. I don't know what causes some to be added, but removing previs records for the center adjacent cluster cell mostly works. In this case I updated previs for POICC07. A XPRI record was added to AbernathyFarmExt. While within the POICC07 that refs mesh were not rendered and it required updating previs for AbernathyFarmExt for it to be seen in within POICC07. See: https://imgur.com/a/gaBTSez

Link to comment
Share on other sites

  • 2 months later...
  • 2 months later...

Hi, can anyone give me some advice on getting the automated precombine/previs command line functions to work?

 

I have been able to use the precombine command in powershell: .\CreationKit.exe -GeneratePrecombined:<plugin> clean all

 

This generates the precombined nifs as expected and also CombinedObjects.esp.

 

I was planning on using the copy version info script in order to merge back in the records into the plugin I'm attempting to generate for, but when I look at the CombinedObjects.esp in xEdit, I get tons of cell records with XCRI records which look like this:

 

 

 


RrRxDY6.png

 

 

 

As you can see, the "Meshes Sorted" records look to be fine, but the "References Sorted" all have errors. The script which copies version info will work and let me copy the Meshes Sorted into the plugin I'm generating for, but not the References (which is as expected considering they have unresolvable errors). What could I be doing wrong here, anyone know how to fix this?

Link to comment
Share on other sites

Hi, can anyone give me some advice on getting the automated precombine/previs command line functions to work?

 

I have been able to use the precombine command in powershell: .\CreationKit.exe -GeneratePrecombined:<plugin> clean all

 

This generates the precombined nifs as expected and also CombinedObjects.esp.

 

I was planning on using the copy version info script in order to merge back in the records into the plugin I'm attempting to generate for, but when I look at the CombinedObjects.esp in xEdit, I get tons of cell records with XCRI records which look like this:

 

 

 

 

 

 

 

As you can see, the "Meshes Sorted" records look to be fine, but the "References Sorted" all have errors. The script which copies version info will work and let me copy the Meshes Sorted into the plugin I'm generating for, but not the References (which is as expected considering they have unresolvable errors). What could I be doing wrong here, anyone know how to fix this?

 

I am guessing that the plugin you used to generate precombineds is a .esp plugin. If so, you need to add the ESM flag to that plugin using xEdit before generating, otherwise the CK will rip it out of the masterlist, causing the issue you are seeing. The problem is caused by the CK not liking non-ESM masters.

 

You'll want to leave that flag until you also generate previs, but can remove it once you are done (and since you are just adding a flag and not changing the extension, no need to worry about the masterlist pointing to the wrong file name).

 

 

The fact that the built in version info script worked for you is another bit of support for that being the problem, since the copy shipped with xEdit only works when the two plugins have the same masterlist. Thankfully, that requirement is artificial (put in there by zilav at the request of the person who asked for the script, per my discussion with him), so you can remove that requirement and it will work fine. Here is a tweaked version of the script without the "same masterlist" requirement:

 

 

 

{

Copy Version Control Info inside Record Header between plugins.

Apply script to destination records, then select the source plugin.

Both plugins must have the same masters list, records are matched by FormIDs.

}

unit CopyVCInfo;

var

fromPlugin: IInterface;

 

//==================================================================================

function Process(e: IInterface): integer;

var

frm: TForm;

clb: TCheckListBox;

i: integer;

r: IInterface;

begin

// plugins selection window for the source plugin to copy from

if not Assigned(fromPlugin) then begin

frm := frmFileSelect;

try

frm.Caption := 'Select plugin to copy from';

frm.Width := 420;

clb := TCheckListBox(frm.FindComponent('CheckListBox1'));

// add files except the current one

for i := 0 to Pred(FileCount) do

if not SameText(GetFileName(e), GetFileName(FileByIndex(i))) then begin

clb.Items.AddObject(GetFileName(FileByIndex(i)), FileByIndex(i));

Inc(i);

end;

// get the first checked file

if frm.ShowModal = mrOk then

for i := 0 to Pred(clb.Items.Count) do

if clb.Checked then begin

fromPlugin := ObjectToElement(clb.Items.Objects);

Break;

end;

// if nothing is checked then abort

if not Assigned(fromPlugin) then begin

Result := 1;

Exit;

end;

finally

frm.Free;

end;

end;

// copy VC info

r := RecordByFormID(fromPlugin, FixedFormID(e), False);

if Assigned® then begin

SetFormVCS1(e, GetFormVCS1®);

SetFormVCS2(e, GetFormVCS2®);

end;

end;

end.

 

 

 

Basically, you just remove these two sections:

//==================================================================================
// list of masters of a plugin
function MastersList(aFile: IInterface): string;
var
  masters: IInterface;
  i: integer;
begin
  masters := ElementByName(ElementByIndex(aFile, 0), 'Master Files');
  for i := 0 to Pred(ElementCount(masters)) do
    Result := Result + GetElementEditValues(ElementByIndex(masters, i), 'MAST') + #13#10;
end;
  

and

            if not SameText(MastersList(GetFile(e)), MastersList(fromPlugin)) then begin
              AddMessage('Masters do not match between plugins!');
              fromPlugin := nil;
            end;
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...