niftools / blender_niftools_addon

The Blender Niftools Addon is a Blender add-on to enable import and export of NetImmese File Formats including .nif, .kf, .egm.
http://www.niftools.org
Other
385 stars 104 forks source link

Please add support for Fallout 4/76 Nif Files #405

Closed bizzclaw closed 2 years ago

bizzclaw commented 3 years ago

Is your feature request related to a problem? Please describe. Whenever you try to import a Nif file from Fallout 4 or 76, you get an error like this

Fallout 4 Nif Import Error

niftools:INFO:Dev: Sys variable not set
niftools:INFO:Executing - Niftools : Blender Niftools Addon v0.0.3(running on Blender 2.83.0, PyFFI 2.2.4.dev3)
niftools:INFO:Importing B:\Fallout_4_Extracted\Data\Meshes\Actors\MirelurkQueen\CharacterAssets\MirelurkQueen.nif
niftools:INFO:NIF file version: 14020007
niftools:INFO:Reading file
Traceback (most recent call last):
  File "C:\Users\bizzc\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\io_scene_niftools\operators\nif_import_op.py", line 121, in execute
    return NifImport(self, context).execute()
  File "C:\Users\bizzc\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\io_scene_niftools\nif_import.py", line 74, in execute
    self.load_files()  # needs to be first to provide version info.
  File "C:\Users\bizzc\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\io_scene_niftools\nif_import.py", line 144, in load_files
    NifData.init(NifFile.load_nif(NifOp.props.filepath))
  File "C:\Users\bizzc\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\io_scene_niftools\file_io\nif.py", line 64, in load_nif
    data.read(nif_stream)
  File "C:\Users\bizzc\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\io_scene_niftools\dependencies\pyffi\formats\nif\__init__.py", line 1297, in read
    self.header.read(stream, data=self)
  File "C:\Users\bizzc\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\io_scene_niftools\dependencies\pyffi\object_models\xml\struct_.py", line 373, in read
    attr_value.read(stream, data)
  File "C:\Users\bizzc\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\io_scene_niftools\dependencies\pyffi\object_models\xml\array.py", line 303, in read
    elem.read(stream, data)
  File "C:\Users\bizzc\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\io_scene_niftools\dependencies\pyffi\object_models\common.py", line 668, in read
    % (length, stream.tell()))
ValueError: string too long (0x465F5C3A at 0x00000044)

location: <unknown location>:-1

location: <unknown location>:-1

Fallout 76 Nif Import Error

niftools:INFO:Dev: Sys variable not set
niftools:INFO:Executing - Niftools : Blender Niftools Addon v0.0.3(running on Blender 2.83.0, PyFFI 2.2.4.dev3)
niftools:INFO:Importing B:\Fallout_76_Extracted\meshes\actors\mirelurkqueen\characterassets\mirelurkqueen.nif
niftools:INFO:NIF file version: 14020007
niftools:INFO:Reading file
Traceback (most recent call last):
  File "C:\Users\bizzc\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\io_scene_niftools\operators\nif_import_op.py", line 121, in execute
    return NifImport(self, context).execute()
  File "C:\Users\bizzc\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\io_scene_niftools\nif_import.py", line 74, in execute
    self.load_files()  # needs to be first to provide version info.
  File "C:\Users\bizzc\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\io_scene_niftools\nif_import.py", line 144, in load_files
    NifData.init(NifFile.load_nif(NifOp.props.filepath))
  File "C:\Users\bizzc\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\io_scene_niftools\file_io\nif.py", line 64, in load_nif
    data.read(nif_stream)
  File "C:\Users\bizzc\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\io_scene_niftools\dependencies\pyffi\formats\nif\__init__.py", line 1297, in read
    self.header.read(stream, data=self)
  File "C:\Users\bizzc\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\io_scene_niftools\dependencies\pyffi\object_models\xml\struct_.py", line 373, in read
    attr_value.read(stream, data)
  File "C:\Users\bizzc\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\io_scene_niftools\dependencies\pyffi\object_models\xml\array.py", line 293, in read
    raise ValueError('array too long (%i)' % len1)
ValueError: array too long (1275068416)

location: <unknown location>:-1

location: <unknown location>:-1

the issue seems to be with the length of arrays/strings so I'm not sure if that's something that can be overcome. Maybe it has something to do with Fallout 4/76 being 64bit? I know that nifskope is able to fully open Fallout 4 and 76 Nif Files, and the nif files when viewed in the editor have their rigging and materials preserved, there is just no way to export them to any format other than OBJ, meaning rigging data is lost.

Describe the solution you'd like When Importing a nif file From Fallout 4 or 76, it should import and work just like something from Skyrim or Fallout 3.

Describe alternatives you've considered The only alternative is to use 3DS Max, a proprietary program that, while you used to acquire a student license to create mods with, can no longer do so without being part of an officially recognized school program.

Additional context If Fallout 76 ever gets true modding support like what we've been promised, being able to import nif files to edit them is going to be essential. As for Fallout 4, people have been using 3DS Max up until now. However, it is no longer easily possible to acquire a student license for 3DS Max, making it impossible to work with Fallout 4 nif files unless you already managed to get a license, but these will expire soon. This will make it impossible for modders to import and modify Fallout 4 nif files for mods without paying excessive prices for 3DS Max.

The truth is, Blender is just better to work with. It has more community support, and the existence of plugins allowing people to use it with Fallout 4 will finally allow people to move away from 3DS Max finally. This tool is still being updated, and I think the Fallout 4 modding community will be greatly boosted if blender was able to be used with its file format. I can only imagine that since the nif files for Fallout 76 aren't that much different, having a head start on support before we get full modding support will allow the modding scene to flourish quickly.

From what I've seen based on PRs related to this issue from a couple of years ago, there need to be certain changes with other dependencies to allow this to be possible. I'm not sure what specifically needs to be done and If these changes still have yet to be made, but if it is now possible, it would be amazing if this issue could be looked at again. Either way, thank you very much for continuing to support this plugin regardless of compatibility with future versions of nif.

BenCzaczkes commented 3 years ago

Could not have said it better my self

BetaBugJack commented 3 years ago

So I keep getting this message whenever I try to import a .nif file attached to my Fallout 4 game.

ERROR

neomonkeus commented 3 years ago

@BetaBugJack Fo4 is currently not supported. This is a feature request, which while on the roadmap requires a large amount of changes to the libraries that are used to read the formats.

bizzclaw commented 3 years ago

Thank you so much for considering this for the roadmap! Even if it ends up being too much work, I really appreciate that you're interested in supporting Fallout 4. I really think it will be major For the Fallout 4 modding scene.

GrafPanzer commented 3 years ago

Just want to endorse this request. Currently, Fallout modders must convert .nifs to .objs to edit them in Blender. It's not ideal.

landkart1 commented 3 years ago

i created account just to endorse this.. please please add support for fallout 4 nif files T T

Sutorcen commented 3 years ago

This also happens with Skyrim SE Nif files. Using version 0.0.6 with blender 2.92.0

image

neomonkeus commented 3 years ago

The block types that failed above are all under the umbrella of this issue, which is also why #433 was closed as a duplicate.

Claw256 commented 3 years ago

Hi, I'm glad that this feature is on the roadmap for the future. Is there any update to the progress of implementing this?

vladbarcelo commented 3 years ago

When working with Skyrim SE, you can use SSE NIF Optimizer. Use the LE option and run the optimization on your meshes.