niftools / pyffi

PyFFI is a Python library for processing block structured files.
http://www.niftools.org/pyffi
Other
49 stars 27 forks source link

Optimiser : Chair meshes get skipped #11

Open neomonkeus opened 10 years ago

neomonkeus commented 10 years ago

I recently did a complete mesh optimization (vanilla + SI), and found out that all chair meshes were skipped. My conclusion: Any file that contains "hair" in the filename will get skipped. That's why the script skips all "chair" meshes. Simple temporary renaming of the mesh does the trick, but one has to be aware of this limit when working with large number of meshes.

.. same goes for "hood", "helmet" and "emperor". Helmet - skips _gnd meshes and static helmet meshes. Also, there are helmets that are not used with egms, so those should be safe too. hood - _gnd meshes, and any path containing "hood" (like dark brotherhood) emperor - Makes script skip whole "clothes\upperclass\emperor\" subfolder. There are probably more problematic filters.

The optimizer aims to be conservative and avoids anything that might cause trouble. You can edit the list of keywords that cause nifs to be skipped: it's in the file C:\Program Files (x86)\PyFFI\utilities\toaster\oblivion_optimize.ini Does this help?

Well, I've already did that and it got the job done. So, is there any detailed listing of which vanilla meshes are not to be optimized? It's obvious that meshes with egm/tri files must be skipped, but there are helmets that don't use egm/tri files (ones that obscure the face, so no face-fitting is done). Those are safe to optimize, to the best of my knowledge.

The ini file is supposed to be that list :-) If you disable everything, it will automatically skip all meshes which have a tri or egm file attached to them. The problems occur when you have installed a mod with a nif that refers to an egm file in a bsa file - the script cannot detect this. Hence the failsafe heuristics (which are obviously overly conservative!). If you run the optimizer on a fully extracted folder (all bsa files etc.) then it should be quite safe. Does that explain?

I think there should be 2 lists. One that lists all the known (as in vanilla) mehses that have BSA-d EGM/TRI counterparts.. but with full paths, and not keywords, and a second list with all the keywords.. Just a thought.

I see - but IMO two lists would just make things confusing. What I think is needed is a way to specify keywords that also match parts of paths. Turning this into a feature request...

kormgar commented 10 years ago

One possibility might be to update the corresponding egm / tri files with any vertex index and/or tri list changes immediately after the nif was optimized.

I was just working on a seam cutter for an updated version of Seam Mender that requires very similar functionality. In a nutshell, I've written a routine for Seam Mender that allows it to automatically add or delete vertices to allow it to automatically merge dissimilar seams.

The piece I'm working on right now is code to automatically update any associated egm or tri files with the modified indices and tri list.

I'll let you know how it goes and post the code.

neomonkeus commented 10 years ago

@kormgar this is actually a migrated issue from sf.net.

I am not sure what the .TRI & .EGM format support is like with pyffi, so that would need investigating. I think the main issue here was the pattern matching came up with false positives so meshes which were say were ignored.