Wednesday, March 27, 2013

How I got involved in glTF and Khronos

glTF is the GL Transmission Format - for WebGL, OpenGL ES, and OpenGL. It's currently a work-in-progress.

I've thought about adding 3D models to Cesium, our WebGL virtual globe engine, for a while. My plan was to convert COLLADA, a widely-used XML-based interchange format, to something directly consumable by a WebGL engine. For example, polygon primitives would be triangulated into indexed triangle lists, shaders for materials would be pregenerated, and geometry would be stored in binary to be directly feed to WebGL, and so on. This is a very common practice in the 3D engine world - assets are stored in a fairly verbose format suited to modeling tools, and then processed into a format more palatable to the engine as part of a content pipeline.

I was designing yet another asset format, but mine was different, of course! I was tailoring it to WebGL and carefully designing the content pipeline so assets would be fast and trivial to render. I was exposing the content pipeline through an SDK, command-line tool, and REST API. Yes, mine was different.

Well, I wasn't alone with these ideas - they're not exactly original anyway. In fact, something very similar, called WebGLTF at the time, was demoed at SIGGRAPH last August by Fabrice Robinet and Brandon Jones. I took note.

For a while I declared that I could write a model renderer in our engine in one sitting. In a Sunday hackathon, I did just that. Using the COLLADA2JSON converter and the then WebGLTF JavaScript loader, and with help from Matt Amato, we put the famous COLLADA duck model in the orbit of the International Space Station around Earth. Here and there, Tom Fili and I improved on this mostly by COLLADA optimizations to the content pipeline, which allowed VT MAK to build a simulation app to demo at ITSEC.

I quickly declared that the folks working on WebGLTF were creating exactly what I envisioned. Even better, they were doing it as part of Khronos, the group that publishes my favorite open-standards including OpenGL, WebGL, and COLLADA. So instead of me designing yet another asset format, I could just use theirs and reap the benefits of their code and broader content support. Win. Then it got better; they asked me to help design the spec. Win. Then it got better again. In the spirit of transparency and early community feedback, the kind folks at Khronos allowed us to make the spec available well before we are actually done. Win. Even better, all the spec discussion now happens in the open as GitHub issues. Win.

As you probably guessed, we renamed WebGLTF to glTF, the GL Transmission Format - for WebGL, OpenGL ES, and OpenGL. Admittedly, it's very WebGL biased at the moment. Now I'm just trying to balance spec work with actual implementation work...

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.