
glTF Interactivity Specification Released for Public Comment
Today, the Khronos 3D Formats Working Group is pleased to announce that the glTF 2.0 Interactivity Extension (KHR_interactivity) specification draft is available for public review and feedback before ratification. This new extension uses behavior graphs, enabling content creators to add logic and behaviors to glTF assets, with a focus on safety, portability and ease of implementation.
The draft specification is now available on the Khronos GitHub page, and the Khronos 3D Formats Working Group is seeking input from all members of the glTF community, including content creators, application developers, and digital content creation tool implementers.
Making Interactive glTF Experiences Portable and Reusable
Artists and developers have always been able to create interactive experiences by integrating glTF assets into 3D viewers such as Babylon.js, Three.js, <model-viewer>, and more, by writing custom code specific to the target viewer. This approach is effective, but can mean that experiences only work in their native ecosystem, and are not easily repurposed or used by a third party. The glTF Interactivity Extension allows content creators to specify interactivity within glTF itself, independent of the viewer technology, making it possible for interactive assets to be re-used across multiple third-party eCommerce sites, applications, XR experiences, immersive games and more.
Using KHR_interactivity, content creators can provide self-contained interactive assets, such as product configurators or informational product demonstrations, that work in ecosystems that they don’t control, i.e., in places where they would not be able to write their own JavaScript or other code.
The current draft specification enables content creators to add behaviors to a glTF asset and define what should play in response to various actions. This initial specification will be updated over time to include additional specific action triggers, and Khronos is also actively working on approaches to incorporating audio and video into interactive glTF assets.
Behavior Graphs: A Flexible Approach
KHR_interactivity uses behavior graphs to define an asset’s response to events, including changes in its appearance and behavior. Behavior graphs define a series of interconnected nodes that represent interactions and behaviors and are widely used by the world’s leading gaming and metaverse engines. The glTF KHR_interactivity extension carefully balances the high levels of interactivity and expressive power that is possible with these engines, together with the limited execution model of a wide range of viewers, e.g. web-based 3D experiences and eCommerce, that require the set of possible outcomes to be sandboxed.
KHR_interactivity In Action
The video demonstration above shows a 3D sofa that bounces in a looping 3D animation, spinning and displaying a new variable whenever you click it. This animated 3D asset has three event flows:
- Start of the Graph: This initiates a 'bouncing' animation for the sofa, where it smoothly moves
up and down once. Then, the custom event “loop_floating_sofa” repeats the bouncing animation
continuously, creating an endless loop.
- Fabric Clicked: When the fabric part of the sofa is clicked, the sofa undergoes a 360-degree
rotation.
- Next Variant: During rotation, the sofa material switches to the next available variant.
The result is a self contained, sandboxed interactive model that can be deployed anywhere.
Learn More and Get Involved
The 3D Formats Working Group is eager for the glTF community’s input on the draft specification before its expected ratification in the third quarter of 2024.
- Review the draft specification on the Khronos GitHub Branch: glTF 2.0 Interactivity Extension Specification
- Provide feedback by raising an issue on the Khronos Github pull request: KHR_interactivity #2293
- For a deeper look at the design intent behind KHR_Interactivity, check out the Khronos webinar Delivering Interactive Experience with glTF.
- Explore the glTF Interactivity Graph Authoring Tool, a work-in-progress DCC React App for authoring and viewing KHR_interactivity behavior graphs on glTF assets.
Content creators, artists, implementers, and engine developers can also share their insight with Khronos on Discord, the Khronos Discussion Forum, Stack Overflow or X.
Any company can get directly involved in the development of glTF and other Khronos standards by becoming Khronos members. Learn more at khronos.org/members.