Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New issue related to importing #94

Open
CrumbledEnvy238 opened this issue Apr 3, 2024 · 1 comment
Open

New issue related to importing #94

CrumbledEnvy238 opened this issue Apr 3, 2024 · 1 comment

Comments

@CrumbledEnvy238
Copy link

Describe the bug

I try to import the front of a articulated bus mod I made, and it doesn't load up into blender, all that loads up is the dum gelenks and another part, in omsi 2 loads up just fine just not in blender, so if I wanted to add any modifications, I can't
proofbug

To Reproduce

Everything relevant has been provided

Expected behaviour

I expected the entire front of the model to be imported to blender

Screenshots

I have provided the relevant screenshot of what gets imported.

Additional context

I will provide the error message here
Python: Traceback (most recent call last):
File "C:\Users#\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\Blender-O3D-IO-Public_init_.py", line 133, in execute
io_o3d_import.do_import(self.filepath, context, self.import_x, self.override_text_encoding, self.hide_lods)
File "C:\Users#\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\Blender-O3D-IO-Public\o3d_io\io_o3d_import.py", line 110, in do_import
o3d = o3dconvert.import_o3d(o3d_bytes)
File "C:\Users#\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\Blender-O3D-IO-Public\o3d_io\o3dconvert.py", line 220, in import_o3d
bone_list, off = import_bone_list(packed_bytes, off, l_header, bonus_header[0] & 1 == 1)
File "C:\Users#\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\Blender-O3D-IO-Public\o3d_io\o3dconvert.py", line 159, in import_bone_list
nb = import_bone(buff, offset, long_triangle_indices)
File "C:\Users#\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\Blender-O3D-IO-Public\o3d_io\o3dconvert.py", line 85, in import_bone
weights.append(struct.unpack_from("<If" if long_triangle_indices else "<Hf", buff, offset=offset))
struct.error: unpack_from requires a buffer of at least 33717 bytes for unpacking 6 bytes at offset 33711 (actual buffer size is 33712)

@jem-suu
Copy link

jem-suu commented Jun 7, 2024

I've also had this issue with a mesh that I've assigned armatures to (not a gelenk) but it may be to do with how the mesh was originally exported.

Most of my meshes were exported with Road-Hog123's exporter and it produces a similar error and stops importing once it reaches that specific model
image

  File "C:\Users\Jem\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\Blender-O3D-IO-Public\__init__.py", line 133, in execute
    io_o3d_import.do_import(self.filepath, context, self.import_x, self.override_text_encoding, self.hide_lods)
  File "C:\Users\Jem\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\Blender-O3D-IO-Public\o3d_io\io_o3d_import.py", line 110, in do_import
    o3d = o3dconvert.import_o3d(o3d_bytes)
  File "C:\Users\Jem\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\Blender-O3D-IO-Public\o3d_io\o3dconvert.py", line 220, in import_o3d
    bone_list, off = import_bone_list(packed_bytes, off, l_header, bonus_header[0] & 1 == 1)
  File "C:\Users\Jem\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\Blender-O3D-IO-Public\o3d_io\o3dconvert.py", line 159, in import_bone_list
    nb = import_bone(buff, offset, long_triangle_indices)
  File "C:\Users\Jem\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\Blender-O3D-IO-Public\o3d_io\o3dconvert.py", line 85, in import_bone
    weights.append(struct.unpack_from("<If" if long_triangle_indices else "<Hf", buff, offset=offset))
struct.error: unpack_from requires a buffer of at least 186123 bytes for unpacking 6 bytes at offset 186117 (actual buffer size is 186122)

But another bus exported using the old-fashioned .x format and .x to .o3d converter has no problems, and imports all the models without an issue, even assigning what I assume to be the correct vertex groups:
image

There might be a difference in how RH's exporter deals with vertex groups compared to how the .x converter does it, and the plugin can't deal with importing the vertex groups.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

2 participants