KhronosGroup / glTF-Blender-IO

Blender glTF 2.0 importer and exporter
https://docs.blender.org/manual/en/latest/addons/import_export/scene_gltf2.html
Apache License 2.0
1.48k stars 316 forks source link

`KHR_animation_pointer` from hook #2285

Open marwie opened 1 month ago

marwie commented 1 month ago

Describe the bug TRS animation should be converted to KHR_animation_pointer but it's not

To Reproduce Steps to reproduce the behavior:

  1. Open blendfile
  2. Export and enable Animation Pointer / Convert TRS
  3. See glTF is not converted

Expected behavior Animation is using KHR_animation_pointer for TRS

Screenshots image

image

.blend file/ .gltf (mandatory)

KHR cube.zip

Version

    "animations":[
        {
            "channels":[
                {
                    "sampler":0,
                    "target":{
                        "node":0,
                        "path":"translation"
                    }
                }
            ],
            "name":"CubeAction",
            "samplers":[
                {
                    "input":4,
                    "interpolation":"LINEAR",
                    "output":5
                }
            ]
        }
    ]
marwie commented 1 month ago

Is there documentation on what can now be animated and how to export? I've briefly tested exporting a material color animation without success.

khr tests.zip

julienduroure commented 1 month ago

Hello, I agree that documentation still need to be enhanced.

As you can see in your screenshot, the animation pointer panel is greyed when using the "Action" animation.

Because of Blender animation data model (for now), you can't export easily animation pointer data without a full bake mode: "NLA track" or "Scene".

marwie commented 1 month ago

Ah this should maybe be visible in the UI or tooltip.

Is it possible to export animations using the KHR animation extension from an extension (by invoking the exporter methods directly)? I assume this is also limited by the animation data model?

julienduroure commented 1 month ago

Renaming this task to follow the enhancement about animation from extension