0 of 0

File information

Last updated

Original upload

Created by

Quarn and Kivan and Arthmoor and PrinceShroob - Pherim

Uploaded by


Virus scan

Safe to use

About this mod

A patch for some meshes from the Unofficial Patches which can decrease performance by causing excessive draw calls.

Permissions and credits
As of November 2021, this fix has been incorporated into the Unofficial Patches! This means there should be no reason any more to install this mod, as this problem only existed in earlier versions of the patches, but not in the vanilla game. However, the QTP3 patch has not been updated, yet.

What is this and why should I care?

Short version:
This mod fixes an issue present in some of the meshes from the Unofficial Patches for Oblivion, Shivering Isles, and the DLC, which can decrease performance in certain places due to excessive draw calls caused by NiTriStrips with more than 1 strip. Draw calls are commands from the CPU to the GPU to draw a 3D shape, and therefore increase CPU load. As Oblivion can only effectively use a single CPU core, additional draw calls almost certainly affect performance negatively. The meshes were fixed by optimizing them with Pyffi. As I don't know if the UOP will get updated at some point to fix these meshes, and not everybody can be expected to use Pyffi themselves, I decided to upload this patch for the Unofficial Patches.

Sniff can be used to detect problematic meshes (Find several strips), however, sometimes only the collision meshes are affected, which is fine, since they are not drawn and therefore don't cause draw calls. I might add patches for other mods in the future or provide a list of mods with problematic meshes, if I don't have permission to upload a fix. I have decided against uploading fixes for specific mods, at least for now. It would be impossible to make sure that the Pyffi optimized meshes all work correctly, especially for larger mods.

Update: The fastest, easiest and potentially safest way to fix the issue is with Sniff itself, as it can convert NiTriStrips into NiTriShapes. This also works with things Pyffi cannot optimize, like Hair. Still, always backup your files!

So far, I found:

(BSA) means that the mod uses a BSA to store its meshes, and it needs to be unpacked to edit them. You can just unpack the problematic meshes and use the fixed versions as replacers, so you don't have to re-pack the BSA again.
Obviously, I can't check every mod out there that has meshes. But I'm going to check all mods that I use myself. However, it looks like the issue exist in a lot of big and popular mods, and I won't be able to check them all.

If you think you have found mods with this issue, please let me know!

Epic Wall of Text version:

I recently stumbled over a blog post of someone who had noticed that in some places of the game, his FPS were significantly lower than they should be, particularly Cheydinhal near the gate, and he discovered that in this particular spot, the number of draw calls was extremely high, in the tens of thousands. My first reaction was "That can't be true!", and I went to check for myself. Surprisingly, I by using ReShade, which can display the current draw calls, I found that he was right, I also had huge amounts of draw calls in this area, but much fewer (less than 10%) in other, similarly detailed cells. For some reason, each individual house caused over 5000 draw calls, which is absolutely insane. If you are unaware of what draw calls are and why they are so bad: In short, every time an object is drawn on screen, the CPU has to give the command to draw this object to the GPU, which then draws it on the screen (one Object is NOT an entire nif file, but each individual part it consists of - more on that later). Therefore, draw calls increase the CPU load, and as Oblivion can only use a single CPU core, additional draw calls almost certainly decrease performance.

I was determined to find out what exactly was causing this, and after a short investigation it became clear that this only happens if the Unofficial Patch is installed. Yes, THE Unofficial Patch. A quick search in the comments showed that some people had already reported performance issues in Cheydinhalt, but they were always told that it could not be the UOP causing this, and that the meshes had been sufficiently optimized a long time ago.

However, I noticed that the meshes in Question used NiTriStrips instead of NiTriShapes for their geometry, and the NiTriStripsData in these particular meshes had "Num Strips" values of, well, more than one. What does that mean, you ask? Well, I try to keep it simple: Basically, there are two ways in Oblivion a 3D shape can be drawn: NiTriShapes and NiTriStrips. NiTriShapes are simply shapes consisting of triangles, nothing special about them. NiTriStrips however (as far as I know) organize these triangles into "strips", which supposedly is more "optimized" than NiTriShapes, however, if that ever made any difference, it doesn't any more, as far as I can tell. Even worse, one NiTriStrips can consist of any number of individual strips (not any number, but up to as many as it has triangles, in which case each strip only contains a single triangle), and here is the catch: EACH of these individual strips causes one draw call. Normally, one NiTriShape causes one draw call, the same is true for NiTriStrips with Num Strips = 1 (I am not sure if there even is any difference between a NiTriShape and a NiTriStrips with just 1 strip, as far as the engine is concerned). Some of the affected meshes have several thousand strips in a single NiTriStrips, each with only a single-digit number of triangles.

As far as I'm aware, this problem occurs if a model is exported from Blender 2.49b with the nif plugin (which is STILL the most functional Blender plugin for Oblivion, unfortunately, as exporting collision geometry does not work in newer versions, at least for me) and "Stripify Geometry" is checked, but NOT "Stitch Strips". It is very important to either enable both options or none (as NiTriStrips with just one strip probably don't perform any different than NiTriShapes, checking none would be perfectly fine - edit: more recent tests seem to suggest that NiTriShapes perform slightly faster) to avoid this issue.

One more thing of importance is that in the vanilla game, it depends on the version of the game whether NiTriShapes or NiTriStrips with single strips are mostly used for visible geometry (apparently, the retail versions used NiTriShapes, but the Steam and GOG GOTY versions use NiTriStrips), but NiTriStrips with multiple strips are ONLY used in Collision meshes, which are not drawn and therefore don't cause any draw calls. In this case, it might even improve performance, as it seems logical to me that only one strip has to be used for collision detection any time something collides with the object, and not the entire collision mesh. However, as I am (so far) unable to make collision geometry with multiple strips myself, I could only test vanilla models agains modded ones with just one strip in their collision meshes. I might do that some time.

So, how can this issue be fixed? Well, first I used Sniff to detect which models actually had this issue (a total of 71 in the Unofficial Oblivion Patch, and a few more in the SI and DLC patches), then I used Pyffi to optimize them. This converted all NiTriStrips into NiTriShapes, eliminating the problem. However, Pyffi, as other tools as well, is not perfect and may actually make the meshes unusable by the game, which can lead to crashes, so it should be used with caution.

It is highly recommended to use a mod manager to install this. Mod Organizer 2 and Wrye Bash will probably work best, I don't know about Vortex, as I don't use that myself. Make sure this mod is installed/loaded AFTER the Unofficial Patches, and that their files get overwritten.

Manual installation is not recommended.

Any mod that changes the same meshes will be incompatible, however, it is possible that they don't have this issue and overwriting will be safe. I intend to check popular mods for this issue and report and conflicts I find here.
So far, I have confirmed the following mods to be unaffected (no fix necessary):

The Creators of the Unofficial Patches and all other mods I might upload patches for
zilav for Sniff
Amorilia for Pyffi