An Introduction to Khronos Group’s glTF and ANARI

This month, I’ve had the pleasure of speaking with Khronos Group about their glTF 3D Models and new ANARI API which was just announced earlier this month. Now, these are two unrelated technologies, but they’re both in the news this month. Khronos Group and the Smithsonian announced a collaboration with the goal of proliferating easily accessible 3D models of museum pieces; as for ANARI, it was just created after some months of inquiries on whether or not such a technology would be useful.

What is glTF?

Let me start with glTF, which is basically a format for 3D models. The concept of glTF isn’t perhaps as grand as Vulkan, another one of Khronos Group’s technologies that we covered earlier this year, but I think glTF has been underrated, so underrated that version 2.0 has been around since June 2017 and I first heard about it this month. It’s hard to get people excited about 3D models, but trust me, this is actually some really interesting stuff.

Khronos Group wants to make glTF the JPEG of 3D visuals; it was the JPEG file format that really allowed for the proliferation of 2D visuals over the internet. The JPEG file format is so good at compression, quality, and portability that it has become a foundation of the internet.

Can glTF become the JPEG of 3D visuals?

I lack the expertise to definitively answer this question, but from what I discussed with Patrick Cozzi, with who I talk about glTF this month, I think glTF has a good shot, at least a better chance than any other format. glTF enjoys some distinct advantages: portability and compatibility, efficient transmission and rendering, and further extensions to enhance the base glTF core.

Portability and compatibility is, for me, the most interesting aspect of glTF. glTF can be put in practically anything, from web browsers, to Power Point presentations, to games, and more. If it supports 3D, you can probably use glTF, and this is because glTF is cross platform and API neutral. Imagine just dropping a 3D model into a Power Point presentation like you would a 2D image. You actually don’t even need to imagine, because you can already do that. It’s that simple.

And it also works right in web browsers. This demo on Khronos Group’s website is really impressive because it just works (usually). I have had very infrequent issues getting it to load and perform well, but as of writing it works just fine. What really impressed me, though, was this model of a space shuttle that has 50 million triangles. Quality is low when zoomed out (which is intentional, not a technical limitation), but when zoomed in as much as possible, it’s evident that this glTF model as a great deal of quality. During my talk with Patrick, I actually had to put the space shuttle model away because I was too fascinated with it. As a kid, I was impressed with 2D flash games that worked in my browser. Now it’s 3D models with orders of magnitude more quality and detail.

glTF is also very efficient in terms of quality and size, and this really enables that portability I described earlier. Software support is only one half of the problem, the other half is making sure it runs well. glTF is so efficient that the drone demo I linked to earlier actually even works on my smartphone, which has a mere Snapdragon 625, a Qualcomm processor sporting one of the weakest GPUs of its generation when it launched in 2016. Now, it did lag quite a bit and it did slow down my entire phone, but it is still impressive that glTF runs on one of the lowest end SoCs that came out 4 years ago. As graphics get more and more powerful (especially in laptops and phones), I have no concerns whatsoever that glTF will run into performance issues despite its high quality.

Additionally, there are also some extensions like Draco and Universal Textures that help with compression, because keeping file sizes small is always a good thing. Textures stored in JPEG and PNG files have to be fully decompressed when put into GPU memory, but with Universal Textures, full decompression is unnecessary. Especially for bigger projects, good compression is a necessary thing to have.

Speaking of extensions, you can, of course, have extensions with glTF, like the aforementioned compression extensions. glTF has a well defined core upon which you can add extensions that are more suited for your goals.

By the way, that collaboration between Khronos Group and the Smithsonian already has results, and you can check it out here.

What is ANARI?

ANARI is rather technical and scientific but I still find it pretty interesting. It is basically Khronos Group’s solution for different standards and applications used for visualizing scientific data. Like the Vulkan API, ANARI aims to simplify the matter of software and compatibility specifically within the field of science, but ANARI doesn’t work directly with the hardware itself, just software.

In the hardware to software hieracrhy, ANARI works in between the rendering API and the end application. The idea is that ANARI can permit the existence of several different applications by simplifying and joining together the APIs and renders that interact with the hardware. Or, in Khronos Group’s own words, “rather than specifying the details of the rendering process, an Analytic Rendering API would enable a visualization application to simply describe the relationship between objects in a scene to be rendered and leave the details of the rendering process to a backend renderer.”

I talked to Neil Trevett about ANARI, and I asked him if he was worried about simply creating another standard rather than unifying existing standards. Specifically, I brought up this XKCD comic and it turns out the team behind ANARI, formerly known as the Khronos Analytic Exploratory Group, was actually acutely aware of this comic and sought not to bring about that kind of situation. Khronos Group was actually approached by several companies and organizations to bring ANARI into existence because such a solution was in high demand in 2019.

One important thing led to the creation of ANARI: ray tracing. To be clear, ANARI isn’t necessary for ray tracing to exist within the field of science, nor is ANARI primarily focused on delivering ray tracing. The main concern however was what applications would support ray tracing and what applications wouldn’t. Demand for a common foundation between scientific applications had already existed, but ray tracing greatly increased it, because ray tracing is really useful in visualizing scientific data, like the position of atomic or subatomic particles.

What really interests me about glTF and ANARI is how they bring all these different organizations and kinds of software together. That is something that has always impressed me with Khronos Group, and it is becoming pretty clear to me that the industry is trending towards more open source software and more simple and compatible technology. This is a victory both for developers and the people who end up using the final product.

More Stories
ASUS Acknowledges 5700 Cooling Issues, Says AMD’s Recommendations Mislead Strix Design
Do NOT follow this link or you will be banned from the site!