Implement support for glTF as an interchange format (import/export, Khronos/OMI extensions) #2778
Labels
New Feature
A new addition, whose complexity hasn't been evaluated yet
triaged
This issue has been assessed
Is your feature request related to a problem? Please describe.
The status quo of 3D content development (Unity, Unreal, Godot, VRChat, Resonite, etc) is to use an engine-specific or even game-specific format. This means that, beyond the basics (mesh and skeleton data), a lot of content cannot be easily ported from one platform to another, as it requires a lot of work to set up game objects.
For example, if you import a chair into VRChat/Resonite/etc, you typically would get only the mesh but can't interact with the chair, and you would need to do additional work to inform the game of how players should sit in the chair.
The same problem applies to many other situations. Let's say you want to import a boom box into Resonite. You'd bring in a 3D model, but all it will do is sit there and look like a boom box. To actually use it, you'd need to attach an audio emitter to it, add physics shapes, make it a rigid body, define its mass, and so on.
Describe the solution you'd like
My proposed solution is to use glTF plus extensions from Khronos, OMI, and more as a a general-purpose engine-agnostic 3D asset interchange format.
OMI has been developing glTF extensions for this purpose. We have extensions for things like physics shapes (boxes, spheres, etc), physics bodies (dynamic, kinematic, mass, velocity, etc), audio emitters (playing MP3 or WAV files globally or at a specific point in the world), gravity, seats, spawn points, and more. You can find the repo with OMI's extensions here: https://github.com/omigroup/gltf-extensions/tree/main/extensions/2.0
The glTF extensions are built upon the glTF format as a base, which can be thought of as an open standard replacement for FBX files, while glTF with extensions may one day replace Unity packages, or at least reduce the amount of engine-specific setup needed after importing a 3D model file.
Khronos, the creators of glTF, are also working on extending glTF. The lights extension allows for lights to be exported from Blender. Some other interesting extensions worth mentioning are KHR_animation_pointer, allowing for any property to be animated (light color, camera FOV, and more), and KHR_interactivity, allowing for engine-agnostic scripting using behavior graphs (like visual scripting).
Most of the extensions I mentioned above have been implemented in Godot Engine (mostly by me). Here's a list of extensions and their implementation status in Godot Engine.
Officially in Godot Engine:
GODOT_single_root
extension godotengine/godot#81851KHR_animation_pointer
for animating custom properties godotengine/godot#94165KHR_node_visibility
in the GLTF module godotengine/godot#93722Godot Plugins:
This is an ongoing effort, the glTF format itself is very new (the 2.0 version that everyone uses is only about 7 years old), OMI is only 3 years old, and several of these extensions are not yet finalized.
Also, if there is anything important missing that would be helpful for a Blender/etc -> Resonite pipeline, feel free to propose new extensions. One extension that I have in my head that haven't been developed yet is one for skybox/environment settings.
Describe alternatives you've considered
The alternative to glTF would be to use another open format (not recommended because that would cause fragmentation) or to use an engine-specific or game-specific format (not recommended for the reasons listed at the top).
If using a game-specific format, this would mean that Resonite needs to implement support for importing from many platforms, instead of just implementing import of glTF+extensions and having the other platforms export to this format. Ultimately I believe the effort will be better spent if we have a pipeline of Resonite, Blender, Godot, etc being able to share content via glTF + OMI/etc extensions, instead of separately implementing pipelines for Blender -> Resonite, Godot -> Resonite, Unity -> Resonite, VRChat -> Resonite, etc (and potentially, the reverse of all of those, and all other possible combinations...).
Additional Context
See the discussion in #2335
Khronos glTF core spec (posting for completeness but you probably don't need to look at this) https://github.com/KhronosGroup/glTF/tree/main/specification/2.0
Khronos glTF extensions https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos
Khronos-reviewed vendor extensions https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Vendor
Khronos WIP interactivity/scripting extension KhronosGroup/glTF#2293
More vendor extensions, unreviewed and work-in-progress https://github.com/KhronosGroup/glTF/pulls
VRM specification https://github.com/vrm-c/vrm-specification (note: original documents are written in Japanese, the English version can be hard to read) and see issue #7
OMI extension plugins for Godot (anything not in the engine) https://github.com/omigroup/omi-godot
And I'll post again for redundancy the link to OMI's extensions https://github.com/omigroup/gltf-extensions/tree/main/extensions/2.0
Requesters
@aaronfranke @madjin and everyone else at @omigroup
The text was updated successfully, but these errors were encountered: