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

Implement support for glTF as an interchange format (import/export, Khronos/OMI extensions) #2778

Open
aaronfranke opened this issue Aug 19, 2024 · 0 comments
Labels
enhancement Suggested addition of a new feature. triaged This issue has been assessed

Comments

@aaronfranke
Copy link

aaronfranke commented Aug 19, 2024

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 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. Some extensions that I have in my head that haven't been developed yet are extensions for vehicles and an extension 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

@aaronfranke aaronfranke added the enhancement Suggested addition of a new feature. label Aug 19, 2024
@shiftyscales shiftyscales added the triaged This issue has been assessed label Aug 19, 2024
@shiftyscales shiftyscales removed their assignment Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Suggested addition of a new feature. triaged This issue has been assessed
Projects
None yet
Development

No branches or pull requests

2 participants