webglstudio.js icon indicating copy to clipboard operation
webglstudio.js copied to clipboard

Requesting support for gltf, glb

Open KnightCoder opened this issue 5 years ago • 7 comments

I've noticed that you support obj files only for 3D models. However, gltf and glb are support widely for WebGL. Compared to these, an obj file is heavier as well. Hence, consider supporting gltf and glb file formats as well.

Alternatively, an option to convert obj to light weight gltf/glb files. That way at least the published version will have light weight gltf and glb files.

KnightCoder avatar Apr 23 '20 22:04 KnightCoder

I know well gltf, I support it in all my engines. The problem is that WebGLStudio asumes that a resource is a single file, and gltf are two files (json and bin) so supporting it will imply a big reestructuring of the code, and I dont have much time now.

Is something I have in my TODO list from long time ago.

jagenjo avatar Apr 23 '20 22:04 jagenjo

Is that same for GLB as well? AFAIK, it is a single file however it is a binary format.

KnightCoder avatar Apr 23 '20 22:04 KnightCoder

Is there any javascript library to parse glb?

jagenjo avatar Apr 23 '20 22:04 jagenjo

I understand. I will also look for one and share it with you.

But, the importance of a light weight file format is significant for supporting WebGL on browsers and mobile phones.

Thank you @jagenjo

KnightCoder avatar Apr 23 '20 23:04 KnightCoder

@jagenjo I found this GLTFLoader in ThreeJS. I am not sure how much helpful this will be but still sharing.

KnightCoder avatar Apr 24 '20 07:04 KnightCoder

@jagenjo here are a few glTF/glb parsers that you may refer: https://github.com/KhronosGroup/glTF-Sample-Viewer https://github.com/cx20/gltf-test https://github.com/google/filament

KnightCoder avatar Apr 25 '20 16:04 KnightCoder

@jagenjo support for glb would be huge and I think it would be sufficient to only support glb instead of glb and glTF. If you could point me into a direction I could start working on an importer

ThorstenBux avatar May 31 '20 20:05 ThorstenBux