hexabits / nifskope

Other
246 stars 55 forks source link

Feature Request: Export / unpack Starfield .mesh files #75

Closed JMPZ11 closed 2 days ago

JMPZ11 commented 6 months ago

Requesting the ability to save / export / unpack mesh files used by Starfield .nifs directly from NifSkope. Anything would be great - unpacking them into the Data folder (so the Blender plugin can read them), exporting them all, exporting them only for a given geometry, or even an individual mesh.

The workflow to modify a Starfield .nif is quite excruciating. SF1Edit to get the filename of the .nif. BsArchPro to extract the .nif. Nifskope is obviously capable of reading anf extracting the meshes from the ba2s, as it uses them to render the object... but as far as I can tell, there is no mechanism to export. So, we must copy the mesh filenames out of the four possibly LODs (to be comlete) and paste them into BSArchPro again, one at a time for each mesh.... Then we can open the mesh in blender.

The blender plugin can only open a nif directly if all the meshes are extracted as loose files, and unless I'm doing something terribly wrong that is a practical impossibility for even simple objects.

I'm hoping that since NifSkope must read them, it could be relatively easy (compared to, you know, adding the support in the first place which is just amazing and thanks a ton) but it would save modders a TON of time. Again, unless i'm doing it wrong. Thanks!

fo76utils commented 6 months ago

I added this feature in a different fork (see commit), a build that includes it can be downloaded here.

However, it only extracts one file at a time right now: you can right click on an applicable path (.mesh file, material as the name of a BSLightingShaderProperty or BSEffectShaderProperty block, or a texture file), then on "Extract File", and choose where the file should be extracted. It will be placed under the correct sub-directories (geometries, textures, etc.) that are automatically created if needed. Starfield materials can also be saved in JSON format.

I could look into expanding the feature so that it recursively scans the entire NIF for possible files to be extracted, that option should probably be added under "Spells" on the main menu bar.

fo76utils commented 6 months ago

Recursive extraction is now implemented as well in this build.

JMPZ11 commented 6 months ago

Holy cow, this is amazing! I destroyed a weeks worth of effort by unwrapping all the mesh UVs according to blender plugin guide... And created a picasso. I've also been avoiding all the LODs because of the tedium - this could change everything, testing now!

JMPZ11 commented 6 months ago

I cannot possibly thank you enough for the recursive extract. This is a game changer - I can actually use the nif blender plugin... I might not have to do each mesh one at a time. Order of magnitude decrease in effort. Thank you so much!

Now if we could only crack open that darn collision blob, we almost won't need CK (joking of course - I'm new at this and don't know what I'm looking forward to)

JMPZ11 commented 2 days ago

This is great, and has been the game changer I hoped. Thanks again!