Giter Site home page Giter Site logo

gltf2glb's People

Contributors

cdeguise avatar elfprince13 avatar kermmartian avatar spatialhast avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gltf2glb's Issues

The glb file size is bigger than the size of gltf file

I had used this tool to transform .gltf file to .glb file.

conmand line as: python gltf2glb.py -e -c input_file

But I find the glb file size is bigger than the size of gltf file.

image

I feel so confused. Is it right?

I had embedded resource(.bin .glsl .jpg) in .gltf file.

buffers corrupted during convert

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.

gltf2glb.py no longer functions (and is no longer needed)

gltf2glb.py is coded against a GLTF schema which does not appear to be generated any longer by COLLADA2GLTF. Happily, COLLADA2GLTF now has native support for GLB export, so we should be able to just remove this file and keep the container formats.

gltf to b3dm

HI,

Thank for your tools!

I have converted a gltf to b3dm file with success but when i use threejs GLTF loader to parse the b3dm file, i got this error:

GLTFLoader.js:980 Uncaught (in promise) TypeError: Cannot read property 'binary_glTF' of undefined
at GLTFLoader.js:980
at _each (GLTFLoader.js:592)
at GLTFLoader.js:978
at

Do you have any idea what is problem?

p/s : I can visualize my gltf file with this online demo without problem (please see attached file)
LYON_1ER_00033.zip

https://gltf-viewer.donmccurdy.com/

My gltf file has 21.4KB but the converted b3dm file takes 187KB, is it possible?

Thank for your reply!

Use numpy arrays instead of Python lists for working with data in-memory

Besides the performance benefits (and interoperability benefits for client code), this will obviate the need nestedListToBin as a byte-buffer view of the array can be obtained with the .data attribute. Additionally, numpy arrays are endian-aware, so we can still check if the array is big endian and get a vectorized conversion with .newbyteorder if needed.

May be helpful if paired #13.

syntax error

Hi, when I tried this tool, I got this syntax error:

  File "gltf2glb.py", line 237
    print b3dm_json
                  ^
SyntaxError: invalid syntax

Any idea?

JSON for instance semantics example

Hi, thanks for the great tool
is there any example how the JSON for instance semantics should look like ?
I didn't found how it should look like
and for example when I try some example I got errors like this one
ValueError: invalid literal for int() with base 10: 'id'

Example of the batch table data?

I have a question regarding the use of gltf2glb for converting gltf files to b3dm:
Should the batch table be like a json string denoting the attributes of the features, like this following one?

{   "id" : [0, 0, 0, 1, 1, 1, 2, 2],
    "color" : ["yellow", "white", "white", "green", "blue", "red", "black", "white"]   }

And if I'm understanding it correctly, each value of an attribute corresponds to one of the techniques specified in the gltf file?

Also, currently I have .gltf files that contain no information regarding the batch id.
Would it be possible that I use a batch table containing the batch ids (as in the json string I showed above that says "id") and convert the .gltf files to their .b3dm counterparts?

Refactor FeatureTable and BatchTable

a) FeatureTable should not inherit from BatchTable, but both should probably share a base-class.
b) Terminology that is specific to client formats (e.g. "global" vs "instance-wise" vs "point-wise") should not be part of the generic class interface; however, we need to make sure it supports the sub-tables for extensions and extras.
c) There is no need for any mutation. Each *Table instance should be constructed from a single collection that represents the entire table, and handle encoding that collection into the separate JSON and binary buffer portions. The result should be treated as effectively immutable.

b3dm

I tried to use it to transform gltf to b3dm, but failed. Some errors shown on the console.
Uploading 捕获.JPG…
Is the order I typed right?
please tell me the right way to use the tool. Thank you !

gltf2glb

How does gltf2glb provide gltf2glb functionality?

"It has evolved to remove its first component (gltf2glb.py)"

You had one job!

/entitled rant

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.