blender_niftools_addon icon indicating copy to clipboard operation
blender_niftools_addon copied to clipboard

.nif models' errors when importing from Wildlife Park 3

Open diszxchat opened this issue 3 years ago • 3 comments

@niftools/blender-niftools-addon-reviewer -

Before creating a new issue, ensure that

  • [ ] Read the user documentation.
  • [ ] Check that the issue hasn't already been reported.
  • [ ] Read through the list of Helpful resources links on the right-hand side.
  • [ ] Talk with the developers to ensure its a valid issue

The issue will get closed off immediately as invalid if

  • [ ] Looking for support where the forums, chat or documentation is more appropriate.
  • [ ] Goes off topic, loses focus or turns into a discussion.
  • [ ] Removing parts of the template the issue.

Fill out the template below to the best of your ability, including .blend files, nifs, logs; help us to help you.

Issue Overview

Some of the models from Wildlife Park 3 have issues with being imported over, which seems to be from the geometry. The importing of skeleton works as it is but the geometry does not. The meshes/geometries, except the base model mesh, along with skin weight are not imported over. The intended result is suppose to have the "editable poly" inside of the "scene root" already. (This applies to the base game only, DLCs have yet to be examined)

Version Information

Blender Niftools Addon Version Info

0.0.13

Blender Version Info

3.0.0

Platform information

Windows 11 (64-bit)

Context

Warning error log produced when imported Several missing geometries, including skin weight

Steps to Reproduce

  • Import a specific vanilla animal mesh from Wildlife Park 3 (base game)
  • A warning log will be produced when importing

List of files that produces the error: puma.nif and grizzlybearbaby.nif

Expected Result

A successful import without any error logs, "editable poly" and other geometries with skin weight are inside/a child of "scene root".

Actual Result

An error appears when imported, causing some of the geometries along with the skin weight to be missed out. "Editable poly" is not within the "scene root".

Possible Fix

Screenshot

wlp3importerror

Here are the missing "geometries" I'm talking about, model in .obj exported and imported to blender: wlp3referenceobj

Logs and Files

Info Bar Output

Python: Traceback (most recent call last):
  File "C:\Users\User\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\io_scene_niftools\operators\nif_import_op.py", line 127, in execute
    return NifImport(self, context).execute()
  File "C:\Users\User\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\io_scene_niftools\nif_import.py", line 132, in execute
    self.import_root(root)
  File "C:\Users\User\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\io_scene_niftools\nif_import.py", line 160, in import_root
    b_obj = self.import_branch(root_block)
  File "C:\Users\User\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\io_scene_niftools\nif_import.py", line 236, in import_branch
    b_child = self.import_branch(n_child, b_armature=b_armature)
  File "C:\Users\User\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\io_scene_niftools\nif_import.py", line 236, in import_branch
    b_child = self.import_branch(n_child, b_armature=b_armature)
  File "C:\Users\User\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\io_scene_niftools\nif_import.py", line 201, in import_branch
    return self.objecthelper.import_geometry_object(b_armature, n_block)
  File "C:\Users\User\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\io_scene_niftools\modules\nif_import\object\__init__.py", line 132, in import_geometry_object
    self.mesh.import_mesh(n_block, b_obj)
  File "C:\Users\User\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\io_scene_niftools\modules\nif_import\geometry\mesh\__init__.py", line 94, in import_mesh
    self.mesh_prop_processor.process_property_list(n_block, b_obj)
  File "C:\Users\User\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\io_scene_niftools\modules\nif_import\property\geometry\mesh.py", line 81, in process_property_list
    name = prop.name.decode()
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe4 in position 6: invalid continuation byte

location: <unknown location>:-1

Console Output

# Blender 3.0.0, Commit date: 2021-12-02 18:35, Hash f1cca3055776
bpy.data.materials["Material"].node_tree.nodes["Image Texture"].interpolation = 'Smart'  # Property
bpy.context.space_data.bookmarks_active = 0  # Property
bpy.ops.object.editmode_toggle()  # Operator
bpy.ops.object.editmode_toggle()  # Operator
Dev: Sys variable not set  # Info
Executing - Niftools : Blender Niftools Addon v0.0.13(running on Blender 3.0.0, PyFFI 2.2.4.dev3)  # Info
Importing C:\Users\User\Downloads\NifSkope_2_0_2018-02-22-x64\model\puma.nif  # Info
NIF file version: a020000  # Info
Reading file  # Info
Game set to 'CIVILIZATION_IV', but multiple games qualified  # Warning
Importing data  # Info
Scale Correction set to 0.10000000149011612  # Info
Importing data for block 'Scene Root'  # Info
Importing data for block 'hd'  # Info
Importing data for block 'Editable Poly'  # Info
Importing mesh data for geometry 'Editable Poly'  # Info
Python: Traceback (most recent call last):
  File "C:\Users\User\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\io_scene_niftools\operators\nif_import_op.py", line 127, in execute
    return NifImport(self, context).execute()
  File "C:\Users\User\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\io_scene_niftools\nif_import.py", line 132, in execute
    self.import_root(root)
  File "C:\Users\User\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\io_scene_niftools\nif_import.py", line 160, in import_root
    b_obj = self.import_branch(root_block)
  File "C:\Users\User\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\io_scene_niftools\nif_import.py", line 236, in import_branch
    b_child = self.import_branch(n_child, b_armature=b_armature)
  File "C:\Users\User\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\io_scene_niftools\nif_import.py", line 236, in import_branch
    b_child = self.import_branch(n_child, b_armature=b_armature)
  File "C:\Users\User\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\io_scene_niftools\nif_import.py", line 201, in import_branch
    return self.objecthelper.import_geometry_object(b_armature, n_block)
  File "C:\Users\User\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\io_scene_niftools\modules\nif_import\object\__init__.py", line 132, in import_geometry_object
    self.mesh.import_mesh(n_block, b_obj)
  File "C:\Users\User\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\io_scene_niftools\modules\nif_import\geometry\mesh\__init__.py", line 94, in import_mesh
    self.mesh_prop_processor.process_property_list(n_block, b_obj)
  File "C:\Users\User\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\io_scene_niftools\modules\nif_import\property\geometry\mesh.py", line 81, in process_property_list
    name = prop.name.decode()
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe4 in position 6: invalid continuation byte

location: <unknown location>:-1

Blend File

Not needed. The error can already be produced from the start of the new scene.

Nif File

wlp3pumagrizzlybearmodel.zip

Similar Known Issues

Uncertain

Additional Information

diszxchat avatar Jan 10 '22 14:01 diszxchat

It's an encoding issue - the string names contain German 'umlaut' characters ä, ö, ü etc, but not in the expected UTF8 encoding. Instead they appear to use ISO/IEC 8859-1 aka Latin-1 OR windows-1252. lionMlä#

HENDRIX-ZT2 avatar Feb 02 '22 17:02 HENDRIX-ZT2

Ah, thank you. That solves half of the issue. This wouldn't be applicable to the other model (baby grizzly bear), correct? The other model has more than 8UV Maps (the limit), from what the error is trying to say. Any ways to bypass it or limit the number of UV maps?

diszxchat avatar Feb 03 '22 04:02 diszxchat

That is going to be a limitation of our format description/file reading library. The guys are working on an overhaul for it atm.

neomonkeus avatar Feb 03 '22 10:02 neomonkeus