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

glTF loader #8

Open
milcktoast opened this issue Aug 31, 2016 · 6 comments
Open

glTF loader #8

milcktoast opened this issue Aug 31, 2016 · 6 comments

Comments

@milcktoast
Copy link

Maybe this is out of scope for this module, but having a built-in glTF parser/loader would be useful. Three.js, BabylonJS, Cesium, PEX, .. have such loaders.

@vorg
Copy link

vorg commented Dec 26, 2016

I've written a gltf loader (no animations support yet, regl version is about to be pushed) https://github.com/pex-gl/pex-gltf and can assure you that its way beyond regl and even resl. Parsing the json, loading the resources and constructing the buffers is only the beginning. What you need next is:

  • some kind of scene graph to reconstruct transformation matrices based on parent/child relationships
  • materials support with understanding of uniform semantics and some default shaders
  • cameras
  • skinning, animations etc
  • physically based rendering pipeline (coming soon to gltf via extensions, but only on material level)

@vorg
Copy link

vorg commented Dec 26, 2016

I think the question would be whats the intended use? Regl doesn't even have a mesh format. I think the most regl-way would be to get a list of objects with properties matching regl command syntax as much as possible eg { attributes, vert, frag, modelMatrix, parentIndex } that then could be consumed by the application as it wishes.

@donmccurdy
Copy link

Looks like someone wrote a loader: https://github.com/gamedev-js/regltf

Haven't had the chance to look too closely yet; the example is failing with errors that indicate some dependencies might be broken.

@zzmp
Copy link

zzmp commented May 2, 2018

Has anyone made any more headway here, or have plans to?

@donmccurdy
Copy link

donmccurdy commented May 2, 2018

No plans here but would be excited to try a loader out if anyone is working on it :). I think I agree with @vorg above — glTF uses abstractions that aren't within scope for regl, so treating the glTF file as a library of meshes and materials seems pretty reasonable. The PBR pipeline mentioned above has (in glTF 2.0) replaced the GLSL materials from glTF 1.0. glTF 2.0 will eventually also support GLSL through the KHR_techniques_webgl extension, but (outdated) we expect the vast majority of glTF 2.0 models to use WebGL-agnostic materials: metal/rough PBR, spec/gloss PBR, and unlit materials.

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

5 participants