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

SaveGLB doesn't embed images #418

Closed
hybridherbst opened this issue Apr 28, 2019 · 6 comments · Fixed by #644
Closed

SaveGLB doesn't embed images #418

hybridherbst opened this issue Apr 28, 2019 · 6 comments · Fixed by #644

Comments

@hybridherbst
Copy link
Collaborator

hybridherbst commented Apr 28, 2019

When running these two lines right after another

// save gltf + bin
exporter.SaveGLTFandBin(Path.Combine(wwwPath, sceneName), sceneName);
// save glb file directly
exporter.SaveGLB(Path.Combine(wwwPath, sceneName), sceneName);

I get very different output. Save gltf+bin produces gltf,bin and images with a total size of ~3MB; save glb stores, well, a single GLB file (as expected) which is only 30KB and doesn't work in any viewer.

Expected: I would expect the output of SaveGLB to be identical to what an external GLB packer produces when putting the files in, e.g. https://glb-packer.glitch.me/

Is there anything I need to configure to even get images to be stored inside the GLB?
(tested with both the latest release version and the latest master)

@andreasplesch
Copy link

Could be due to #393 if you see the shader value null message in the console.

@hybridherbst
Copy link
Collaborator Author

No, I already added the Resources folder manually. There's no error message logged at all, the export runs through without errors - just a tiny glb is exported.

@hybridherbst
Copy link
Collaborator Author

hybridherbst commented Apr 29, 2019

Upon some further investigation I'd say this is the bug:
calling

// save gltf + bin
exporter.SaveGLTFandBin(Path.Combine(wwwPath, sceneName), sceneName);
// save glb file directly
exporter.SaveGLB(Path.Combine(wwwPath, sceneName), sceneName);

results in a tiny GLB (and no error message),
while ONLY calling

exporter.SaveGLB(Path.Combine(wwwPath, sceneName), sceneName);

(and not exporting the GLTF before) results in a proper GLB file.

@andreasplesch
Copy link

Ok. It sounds like something which could be narrowed down by stepping through with the debugger.

@AdamMitchell-ms
Copy link
Contributor

@soraryu or @andreasplesch , do either of you have time to investigate and possibly send a pull request with a fix?

@andreasplesch
Copy link

Sorry, not currently.

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

Successfully merging a pull request may close this issue.

4 participants