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 KHR_animation_pointer in GLTF for animating custom properties #10164

Open
aaronfranke opened this issue Jul 10, 2024 · 0 comments
Open

Comments

@aaronfranke
Copy link
Member

Describe the project you are working on

I am working on making Godot suitable for games with real-time dynamically-loaded user-generated 3D content. For safety reasons, this means glTF files, since it's more sanitized to accept these than to accept arbitrary Godot scenes. Plus, the goal is to allow content to be engine-agnostic, not locking creators of this content into just using Godot, and to make it easy to create content in any non-Godot app, including Blender.

Describe the problem or limitation you are having in your project

Godot currently only supports the vanilla glTF animation system, which allows for animating position, rotation, scale, and blend shape weights. For other properties, such as the color of a light, the FOV of a camera, the albedo color of a material, the UV offset of a material, and more, you can't do it. However, there is a glTF extension that allows for animating many more properties: KHR_animation_pointer.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

Add support for importing and exporting glTF files with more advanced animations by implementing KHR_animation_pointer in Godot's GLTF module, allowing users to animate many more properties.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

I've already done so here: godotengine/godot#94165

khr_anim_ptr.mp4

Test project: gltf_khr_animation_pointer.zip

These test files were created by the Khronos group, not me. The source is here: KhronosGroup/glTF-Sample-Assets#106

If this enhancement will not be used often, can it be worked around with a few lines of script?

For the general case, no. It would take many thousands of lines of script. For a more narrow case, it could be done with less, but the goal here is to implement a system that is extendable and allows animating many properties.

Is there a reason why this should be core and not an add-on in the asset library?

This must be core to Godot Engine because it requires a lot of low-level hooks to do it right, and other extensions need to be able to build on these features.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant