CesiumGS / obj2gltf

Convert OBJ assets to glTF
Apache License 2.0
1.71k stars 307 forks source link

-s, --separate not working #75

Closed devxkh closed 7 years ago

devxkh commented 7 years ago

the command -s doesn't create a buffer.bin file from the included mesh in the obj file. example obj file

devxkh commented 7 years ago

hmm seems like seperation works only with non binary -b

mramato commented 7 years ago

Order shouldn't matter, can you paste the command line you were using that caused the problem?

emackey commented 7 years ago

Actually I think it's correct that .glb files are self-contained and don't support -s.

Perhaps we need a console message to that effect, if I'm right about that.

mramato commented 7 years ago

Actually I think it's correct that .glb files are self-contained and don't support -s.

I just checked with @lilleyse, glb files can be separate as well, so this is a bug if order matters.

emackey commented 7 years ago

glb files can be separate as well

Interesting. I believe it, I guess nothing prevents it. We don't have a single sample of it, anywhere in Cesium or Khronos published sample models, as far as I know.

Anyway I'm re-opening this, for the command-line order problem as described by @mramato.

lilleyse commented 7 years ago

So I think this behavior is actually expected. The shaders/textures are still written separately but the geometry buffer is embedded in the binary body of the glb. A separate .bin doesn't offer any advantage for binary gltf, so the tool just doesn't handle it (speaking of gltf-pipeline here).

I also checked that the order of commands doesn't matter.