Jump to content

Photo

Fallout 4 Optimization and Performance Systems Explained

precombines occlusion previs roombounds portals preculling

  • Please log in to reply
529 replies to this topic

#501
ExcerptNovela

ExcerptNovela

    Journeyman

  • Supporter
  • Pip
  • 49 posts

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:

 

Spoiler

 

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?

 

Thanks, that did the trick!

 

I have a different issue now. I wasn't thinking about how the "Merge Overrides into Master" copies the record exactly as is. In CombinedObjects.esp there is only XCRI data (which is to be expected). Is there a script included that I've missed which can automate the copying of a specific type of element from multiple records back into a master file?

 

What I was hoping to do was: Copy Version Info on all generated cells (this works now) and then -> Merge Overrides into Master. This overwrites records like regions, grids, max height, water, etc... so that will not work for my purposes. I need something more specific.

 

My knowledge of Delphi is very limited, but I suppose I can look through the xedit wiki if I have to find what I need to change in the merge script, unless someone has already written one or there is one I've missed somewhere.



#502
ExcerptNovela

ExcerptNovela

    Journeyman

  • Supporter
  • Pip
  • 49 posts

I fixed up a version of the Merge overrides in Master to work for this purpose. All that was required was to edit out two sections and add a check to not copy the Data flags (because the plugin has to be flagged as an ESM, I'm assuming this is why the flags are compressed, such as the HasWater flag).

 

The edit starts at line 34:

    // special treatment for record header
    //if s = 'Record Header' then begin
    //  // copy flags
    //  SetElementNativeValues(m, 'Record Header\Record Flags', GetElementNativeValues(e, 'Record Header\Record Flags'));
    //  Continue;
    //end;
    
    // get the same element from master
    e1 := ElementByName(m, s);

    // element exists in override but not in master, add and copy it
    if not Assigned(e1) then begin
      if Pos(' - ', s) = 5 then s := Copy(s, 14); // leave only subrecord's signature if present
      e1 := Add(m, s, True);
      ElementAssign(e1, LowInteger, e2, False);
      Continue;
    end;

    // element exists in both master and override, detect conflict
    c := ConflictAllForElements(e1, e2, False, IsInjected(m));
    // copy it into master if data is different, add check to make sure we are not copying the Data flags
    if (c >= caConflictBenign) and (Signature(e1) <> 'DATA'then
      ElementAssign(e1, LowInteger, e2, False);
  end;

  // remove elements from master that don't exist in override
  //for i := Pred(ElementCount(m)) downto 0 do begin
  //  e1 := ElementByIndex(m, i);
  //  if slElems.IndexOf(Name(e1)) = -1 then
  //    Remove(e1);
  //end;


#503
WapperJaw

WapperJaw

    Enthusiast

  • Members
  • PipPip
  • 168 posts

  I wanted to delete this post

Attached Files


Edited by WapperJaw, 18 September 2021 - 10:56 PM.


#504
WapperJaw

WapperJaw

    Enthusiast

  • Members
  • PipPip
  • 168 posts

The CK and xEdit does not tell us which cells concerning this issue need to be repaired. Meaning no errors fix this ... etc!

 

However ... xEdit gives us a clue that objects in the cell with brackets highlighted in yellow background in green fonts gives us a clue to repair the cells. Items with no brackets are not meshed with other objects so no need to repair the cell.

 

Here is an example grid of my Spectacle Island mod to help see what I want to do. Now don't get me wrong love the tool but the question basically is, is xEdit trustworthy in this issue? I know what to look for in the game if a cell needs to be repaired ... but what if I repaired a cell that did not need repaired ... what are the clues to look for?

 

 

Attached Files



#505
VIitS

VIitS

    Resident poster

  • Premium Member
  • 2,940 posts

If you have a CELL in a mod with no REFRs that have brackets, precombineds are not broken and, unless it adds a ton of stuff in a busier area of the game (like in/near the city), there is no point touching those precombineds. That said, it is very unlikely a mod will add enough things to affect performance (even in the middle of the city) without breaking precombineds. 

 

 

If the mod touches ANY REFRs with brackets, the precombineds and previs for the 3x3 square of CELLs that CELL is in will be broken. For some areas, it is not a big deal, but for others having those precombineds and previs broken will have a significant impact. Doesn't matter if they show as yellow, red, or green in xEdit, it will break them. 

 

 

That said, you only need an updated previs timestamp for any CELL with the bracketed REFRs. Even though the CK will update the timestamp for all 9 cells when you regenerate the previs, the way that the game determines if it should break previs or precombineds is by comparing the timestamp in the VISI and PCMB subrecords in xEdit, to the Version Control Info 1 subrecord (in the record header) for all bracketed REFRs nested in that specific version of the CELL*. If any of those VCI1 subrecords have a timestamp more recent than the PCMB/VISI subrecords, or any are missing the timestamp (shows in xEdit as none**), previs and precombineds for that CELL will be disabled. 

 

Which means, if you update previs, you can then remove any CELL that has no child REFRs and for which the only change is to the VISI timestamp, leaving only the cell(s) that prompted the need for fixing previs. 

 

*so it doesn't matter if other mods that load earlier have bracketed REFRs, if the winning version of the CELL doesn't have any precombineds and previs won't be disabled. Which would actually caused problems in the form of undoing changes those mods made to those REFRs, but that is not relevant for a mod you ware working on for release

**Copying records in xEdit will wipe out that subrecord, because preserving it can cause problems with the Version Control system, and that was the only thing the subrecord was used for prior to FO4. Resaving the plugin in the CK will set the current date for any records missing a date.

 

 

If you are curious, the way xEdit determines which REFRs to put in brackets, it looks at the XCRI subrecord. REFRs in that subrecord are not actually loaded in-game when precombineds are enabled, it only loads the precombined meshes (also listed in the XCRI subrecord). 



#506
WapperJaw

WapperJaw

    Enthusiast

  • Members
  • PipPip
  • 168 posts

VIitS

 

Thanks 



#507
gentester

gentester

    Faithful poster

  • Premium Member
  • 2,047 posts

Just wanted to ask a noob question  - landscape changes. Are landscape changes something I need to include in a redone precombine/previs? I have a couple of cells in the mod I am working in which are next to cells where I DO need to regenerate but the only changes in the cell itself is landscape and navmesh. I assume navmesh doesn't enter into the equation at all - but unsure about landscape. I don't think it will need it but unsure. Anyone know this one and can let me know would be appreciated : :smile:



#508
VIitS

VIitS

    Resident poster

  • Premium Member
  • 2,940 posts

Landscapes are not considered for or a part of precombineds. I don't think they are considered for previs (occlusion culling), but could be wrong there.  



#509
gentester

gentester

    Faithful poster

  • Premium Member
  • 2,047 posts

thanks VlitS, well I guess its try it all ways till I get what works :)



#510
WapperJaw

WapperJaw

    Enthusiast

  • Members
  • PipPip
  • 168 posts

Having an Issue myself …

 

But concerning Landscape … I’m currently repairing this issue with my Spectacle Island mod. I created 2 testing mods, one where I repaired only cells with objects with brackets, and another mod where I repaired also objects with brackets and where there were only landscape changes in my grid above repairing all cells. The one where I repaired all cells had objects flickering in and out as I moved around them but they’re normal objects that can be reposition or scrapped. One you reposition them they stop flickering in and out.

 

The Mod I created with only objects with brackets repaired those cells only I did not have any issues at all … tell today. After it appeared the mod was working as intended, I thought I create a video testing performance, Unrepaired vs Repaired … etc. But then today the dam mod is acting the same.

Scrapping mod is uninstalled and my fallout4.ini file bUseCombinedObject=1.

 

Anybody know why this is happening?

 

Anyway ... there only a few objects ... going to try just disabling\sink and redo the repair tell I find an answer ... 


Edited by WapperJaw, 01 October 2021 - 01:01 AM.






Also tagged with one or more of these keywords: precombines, occlusion, previs, roombounds, portals, preculling

IPB skins by Skinbox
Page loaded in: 1.166 seconds