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

buffers corrupted during convert #10

Closed
pieper opened this issue Jan 31, 2018 · 3 comments
Closed

buffers corrupted during convert #10

pieper opened this issue Jan 31, 2018 · 3 comments

Comments

@pieper
Copy link

pieper commented Jan 31, 2018

I have gltf (1.0) files with data uris that load correctly in aframe, but when I run them through your converter the glb is not correct.

$ ./gltf2glb.py -o ~/slicer4/latest/scenes/tumor/mrml.glb ~/slicer4/latest/scenes/tumor/mrml.gltf

Both data files are here:
https://github.com/pieper/scenes/tree/master/tumor

And here are two pages that load the two different models:

https://pieper.github.io/scenes/tumor/index.html
https://pieper.github.io/scenes/tumor/index-glb.html

image

I will probably be updating my exporter to gltf 2 to use the latest aframe and maybe that will help but thought I would report this anyway.

@KermMartian
Copy link
Contributor

Steve, may I ask you to please test #9 and let me know if that resolves the issues for you? Thanks in advance.

@pieper
Copy link
Author

pieper commented Feb 1, 2018

Thanks for getting back to me - that branch didn't work for me (output below). Perhaps that PR expects only gltf 2 data but mine is gltf 1.0.

In any case I did a workaround to create binary uri resources so my use case is solved. Also I realized that the byteLength parameter on some of my buffers was incorrect (this didn't cause a problem for threejs but maybe it impacted your converter?).

In any case you can feel free to close this issue or use the data I linked above for testing if you want.

$ ./gltf2glb.py -o ~/slicer4/latest/scenes/tumor-testing/mrml.glb ~/slicer4/latest/scenes/tumor-testing/mrml.gltf 
Traceback (most recent call last):
  File "./gltf2glb.py", line 239, in <module>
    main()
  File "./gltf2glb.py", line 146, in main
    buf_type = buf.get("type",None)
AttributeError: 'unicode' object has no attribute 'get'

@KermMartian
Copy link
Contributor

This tool no longer generates GLBs from GLTFs; closing.

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

No branches or pull requests

2 participants