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
386 stars 104 forks source link

BSSkinBoneTrans error during import of a vanilla Fallout 4 skinned mesh #612

Closed cityrobo closed 11 months ago

cityrobo commented 11 months ago

@niftools/blender-niftools-addon-reviewer -

Before creating a new issue, ensure that

The issue will get closed off immediately as invalid if

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

Issue Overview

[Provide a general introduction to the issue and why it is relevant to this repository] Error importing skinned mesh from Fallout 4 base game, specifically Dogmeat.nit, but it happens with all the other nif files out of the Meshes\Actors\Dogmeat\CharacterAssets path in the Fallout4 meshes archive as well

Version Information

Blender Niftools Addon Version Info

[Provide version information for the Blender Niftools Addon the issue occurs with, available in Blender in the Add-On section] blender_niftools_addon-v0.1.0-2023-06-20-43341a10

Blender Version Info

[Provide information on which version of Blender the issue is seen] 3.6.4

Platform information

[Provide a brief overview of what OS your running on] Win10

Context

[Provide more detailed information to the issue itself and why it is relevant] I want a skinned model of Dogmeat for animation purposes. making a new rig from an obj created through nifskope sounds like a horror story to me.

Steps to Reproduce

[Ordered list of the steps required for recreating the issue, including settings]

.

Import Dogmeat.nif, extracted from the original Fallout4 meshes archive file.

Expected Result

[Describe what you expected to have resulted from this process] Import dogmeat mesh and armature

Actual Result

[Describe what you currently experience from this process, and thereby explain the bug] Error appears, and only the armature is imported without bones and also no meshes

Possible Fix

[Optional, suggest fixes, improvement or reasons for the bug might have occurred] Don't know. Tried looking at the python code my but python-foo isn't great and my IDE sucks lol

Screenshot

[If relevant, include a screenshot]

Logs and Files

[Provide logs file generated during the error as well as the blend and nif files are related to the issue] blender_debug_output.txt

Info Bar Output

[Output from the Info View, available at top of Blender viewport, drag to expand] Its completely blank but with a red tinted background? but clicking on it gives me the error text below in a new window so IDK what I should think of that.

Console Output

[Set the logging level to 'Debug' and attach the output of the console. Enable via Window -> Toggle Console] Python: Traceback (most recent call last): File "C:\Users\Cityrobo\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\io_scene_niftools\operators\nif_import_op.py", line 134, in execute return NifImport(self, context).execute() File "C:\Users\Cityrobo\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\io_scene_niftools\nif_import.py", line 131, in execute self.import_root(root) File "C:\Users\Cityrobo\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\io_scene_niftools\nif_import.py", line 159, in import_root b_obj = self.import_branch(root_block) File "C:\Users\Cityrobo\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\io_scene_niftools\nif_import.py", line 207, in import_branch b_obj = self.armaturehelper.import_armature(n_block) File "C:\Users\Cityrobo\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\io_scene_niftools\modules\nif_import\armature__init__.py", line 226, in import_armature self.store_bind_matrices(n_armature) File "C:\Users\Cityrobo\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\io_scene_niftools\modules\nif_import\armature__init__.py", line 173, in store_bind_matrices self.bind_store[bonenode] = self.get_skin_bind(bonedata.get_transform(), geom, n_armature) AttributeError: 'BSSkinBoneTrans' object has no attribute 'get_transform'

Blend File

[Attach the blend file if the issue is reproducible] it happens on a new launch, on every launch. no specific blend file needed.

Nif File

[Attach input or output files, samples of what the expected output should be and reproducing the issue]

Similar Known Issues

[Reference any known issues - https://github.com/niftools/blender_niftools_addon/issues] #598

Additional Information

[Anything else you feel is relevant] Not sure if I can include the Dogmeat.nif for testing. I feel like that would be a copyright violation. I will provide it if asked, though.

cityrobo commented 11 months ago

@Candoran2 I guess I could try ticking off that last box by asking a developer if this is a valid issue? you seem to be the most active developer, looking at other issue reports in this project, so I'm sorry if this ping is uncalled for.

Candoran2 commented 11 months ago

I don't have the dogmeat nif (since I don't have Fallout 4), but based on the logs it's the same issue as the #598 you linked. If it is, then it should be fixed in the next release.

You could try out (most of) the new release with this file: blender_niftools_addon-v0.1.1-2023-10-29-5f4b77ee.zip

cityrobo commented 11 months ago

This new version did indeed fix the issue.

I am curious if it is normal that the armature is completely flattened out though. all the bones are in no relation to each other, there is no hierarchy to speak of.

I am wondering if that is just how it is in game or if it has some other reason.

Candoran2 commented 11 months ago

I am curious if it is normal that the armature is completely flattened out though. all the bones are in no relation to each other, there is no hierarchy to speak of.

I am wondering if that is just how it is in game or if it has some other reason.

This is how they are stored in the nif. If you want the bones in a hierarchy, you'll need to first import skeleton.nif with the "Skeleton Only" process option. That will create an armature with the bones in the correct hierarchy. Then, with the resulting armature selected, import your nif with the "Geometry Only" process option. That will bind the geometry of the nif to the armature from skeleton.nif instead of creating its own bones.