Jump to content

A Fix for the Occlusion Bug


Recommended Posts

In the process of troubleshooting our scrapping mod, Scrap Everything, my amazingly awesome co-author, Kuroitsune, has made what we feel is an important discovery. By some amazing magic, he has managed to fix the horrible occlusion bug that has been plaguing the mod for some time now. Kuroitsune has yet to fill me in with all the details, but I just couldn't wait and wanted to get the news out to the community ASAP. It is my hope that this can be applied to other mods that have such problems (of which I am sure there are many), so as to make our mods better as a whole.

 

I do know that it works by using the 'Update PreCombine/PreVis Timestamp' and(/or?) the No PreVis flag when Editing an area in the Cell View Window. Kuroitsune and I will continue to investigate the potential causes and effects of this, and will update you all as soon as we make any headway.

Link to comment
Share on other sites

Yes, I found a way around the occlusion bug that has been seen by users of our mod and other scraping mods. It does not require changing ini settings either. It's not a bug at all, the developers at some point created something called a UVD file, which my best guess is a Precombined Occlusion data file. There is one for almost every cell, and the game auto loads it unless you either; turn pre-culling off by setting the bUsePreCulledObjects to 0, using the No Pre Vis flag on the cells you don't want occlusion in, or simply nulling (00 00) the VISI field on the cell record in FO4Edit shown below.

 

If you want be able to scrap objects that are currently consumed by a Precombined Objects, you either had to; turn them off by setting bUseCombineObjects to 0, copying identical copies of those objects into your plugin, or deleting the XCRI field on the cell record in the cell you want to scrap without limits. But, removing the field does not work, you have to remove it, then add it again but leave it alone after that. It should look like what's shown below. This blocks the game loading any combined objects that have the cells FormID in it's name if the field is completely removed, and let's it load the references that would otherwise be deleted. One more thing, Physics Combined must also be nulled out (00 00) otherwise when you scrap those references, their collision will remain. If left alone, the game will load the Combined Physics with the cells FormID in it's name.

26903372605_c58232af9d_o.png

 

Now, to fix that damn reset bug.

Edited by Kuroitsune
Link to comment
Share on other sites

They actually seem to have put in an even easier "fix", although I wonder if selectively deleting entries from the references list (along with the associated combined meshes) would let you selectively disable combined meshes.

 

The fix, as used in Spring Cleaning (and from what I saw your mod as well), is simple: "copy as Override" a single record listed as one of the References in the XCRI sub-record (00194a4e, for example). That will do the exact same thing as zeroing out the VISI and PCMB fields and deleting the XCRI and XPRI sub-records (i.e. disabling combined objects and preculling in the cell in question). I don't think it will cause the cell reset bug if all the copied records are identical to master, but I'm not sure (I've had reports of the reset bug, but from what I remember every one who replied to requests for more info turned out to have another mod that was the culprit).

 

This workaround is disabled if you have bUseCombinedObjects=0 in your ini (so you'll get the occlusion bug you mention, if trying to use the fix I did), and your fix probably will still disable preculling in the cell even if they are using the ini edit, so that's good.

 

It's actually a bit of a pain, since I haven't yet found a way to disable this "feature", and interior cells tend to have issues when preculling is disabled (namely, preculling in certain spots, that seems to be caused by overly large room bounds because Bethesda). There are ways to purposefully disable the two settings (as you describe), but I haven't seen any mention of a way to keep this workaround from activating (this also results in newly generated uvd files for edited cells not being loaded by the game). I'd also like a way to get a mesh replacer to work on a combined object without having to uncombine them all if at all possible.

 

Of course, both the fix I mention and yours won't work if there is another mod that touches that cell and doesn't make use of one or the other (most likely accidentally, for mine).

Link to comment
Share on other sites

I understand from your posts that you found a way around the reset but, which is an engine bug as far as I know. I'd be curious what your fix is, and pretty sure a lot of modders would be too. I think artmoor could use it if it's an actual fix and not just a workaround :)

Link to comment
Share on other sites

Just turn your plugin into a master file.

 

It prevents the reset bug but the sprinting bug still remains. That bit might be related Cell Resource List cdx file, same as the reset bug, but until we can decode and modify those files all we can do is speculate.

That's not really an applicable fix. I don't want to make esm only for any mod that touches cells.. Hope they fix this damn thing.

Link to comment
Share on other sites

I was reading on the Bethesda.net forums the other evening and there is one of Bethesda's programmers responded to the reset issue as reproduced and they are looking at it. We should see something in a future update.

 

We can hope anyhow. By the way the fix above works well on the disappearing objects related to pre-Visibility. In the CK there is a checkbox to turn off Pre-Vis that just simply fixes it. I would not have gone looking if you hadn't found this fix. Thank You!

 

Robert

Link to comment
Share on other sites

This fix is all we have until they officially address this problem.

 

I'm beginning to think this isn't even a bug to begin with, same as the sprint bug, but a side-effect of missing information. I think the CDX file that comes with every official ESM contains extra information that the game uses to load cells. If the cell is modified in another file, that file must have a cdx of it's own or the game refers back to the original information in the cdx file causing the bugs we have.

 

Making the file an ESM only fixes the reset bug, we still get the sprinting bug and the issues with updating precombined meshes.

 

rdunlap - I'll let you know now that No Pre-Vis doesn't work the same way as it would on an esp. It'll cause the game to bug out and when you exit a cell with it on and look back at it the landscape and water will disappear. However, that could be an issue only I get because I'm doing s*ht with the game it shouldn't be doing in the first place. Having the VISI field in the cell record 00 00 does the same thing and I didn't encounter that bug using that method. Yet.

 

Turning the file into an ESM breaks my bypass for precombined meshes and unlocking the references replaced by such, but again I like abusing the game until it does what I want it to do and have gotten my bypass to work. Now you must keep the precombined data but only the precombined meshes list, the references list can be completely deleted without any issue. Once you've done that, the game loads both the references and the precombined meshes that are meant to replace them. All that's left to do now is dummy the nifs of those precombined meshes so they are either offset on the z axis so they disappear under the landscape or replace them with something like the XMarker. The latter wouldn't impact performance as much.

Link to comment
Share on other sites

Editing the nifs might work, but combined meshes are weird. If you open one up in nifskope (newest release can read them), it has plenty of BSTriShapes (with associated lighting shaders) and that sort of thing, even has the collision data. Absolutely nothing is visible though, and the file size is tiny compared to the combined size of the meshes they are comprised of. I'd honestly be worried about the game CTDing from editing the nifs, because Fallout 4 can be very picky about how different kinds of meshes are formatted (like static collection vs static, for instance). It might be possible to delete all the associated collision and "mesh" data in the nif without the game spazzing out, but that is something we'll need to test.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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