question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

trimesh.exchange.load.load() breaks a glb file

See original GitHub issue

I execute just this code:

scene = trimesh.exchange.load.load(self.input_path, process=False)
file_name = 'test.glb'
full_path = join(self.store.directory, file_name)
glb_data = trimesh.exchange.gltf.export_glb(scene)
with(open(full_path, 'wb')) as glb_file:
    glb_file.write(glb_data)

origin: Screenshot from 2022-03-16 22-32-08 I got: Screenshot from 2022-03-16 22-32-25

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
mikedhcommented, Mar 18, 2022

Yeah unfortunately there’s no easy workaround other than supporting byteStride, PR’s welcome!

0reactions
gleb-ancommented, Mar 17, 2022

I updated my origin glb file: med_gas_2.zip But I lost materials and colors: Screenshot from 2022-03-17 21-47-18

Read more comments on GitHub >

github_iconTop Results From Across the Web

trimesh.exchange.gltf — trimesh 3.17.1 documentation
Load a GLTF file in the binary GLB format into a trimesh.Scene. Implemented from specification: https://github.com/KhronosGroup/glTF/tree/master/specification/ ...
Read more >
trimesh/gltf.py at main - GitHub
Python library for loading and using triangular meshes. ... return files ... Load a GLTF file in the binary GLB format into a...
Read more >
Saving textured GLB file in trimesh - python - Stack Overflow
I am trying to save a textured OBJ file as a GLB. ... mesh = trimesh.load("models/all/odm_texturing/odm_textured_model_geo.obj") mesh.show() ...
Read more >
trimesh - Bountysource
I'm trying to display a .glb file with Trimesh library. If I only do trimesh.load("model/path/"), it doesn't show all the elements on the...
Read more >
trimesh/Lobby - Gitter
data/simple.glb') scene_bounds = scene.bounding_box max_bounds ... export an mesh in STL format from your 3mf file, and then load this STL with Trimesh....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found