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

Constant interpolation ignored, even with all keyframes using it #2365

Open
Orso2p2n opened this issue Sep 29, 2024 · 2 comments
Open

Constant interpolation ignored, even with all keyframes using it #2365

Orso2p2n opened this issue Sep 29, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@Orso2p2n
Copy link

Describe the bug
When exporting a scene with actions that use only constant keyframes, the exported gltf still uses LINEAR interpolation.

To Reproduce
Steps to reproduce the behavior:

  1. Download the example file.
  2. Observe that all the keyframes of the "idle" action use constant interpolation
  3. Export in GLTF with Animation mode on "Actions".
  4. Open model in gltf viewer.
  5. Observe that the animation still uses linear interpolation.

(Alternatively, export the model using glTF Separate, and open the .gltf in a text editor to see that it still uses "interpolation: LINEAR" for most of the samplers)

Expected behavior
According to #2137, having all the keyframes use constant interpolation should export using STEP.

Screenshots
The animation in Blender:
blender_y55n067eUP

The animation in gltf viewer:
firefox_Vf8NuxFWWK

.blend file/ .gltf (mandatory)
character.zip

Version

  • OS: Windows 10
  • Blender Version: 4.1.1
@julienduroure
Copy link
Collaborator

Hello,

Most (didn't check every individual channels, but some of them) channels that become "LINEAR" are some bone channels that are not animated in your model.

CONSTANT are kept as STEP, but for not directly animated bones (like any deformation bones) are currently exported as LINEAR, as we don't have any interpolation information.

An enhancement that can be done is to let the user choose what interpolation should be used when sampling not animated bones

@julienduroure julienduroure added the enhancement New feature or request label Sep 30, 2024
@Orso2p2n
Copy link
Author

Thank you for your answer!

Is there a way for me to work around this problem, without having to replace all the instance of "LINEAR" by "STEP" in the gltf file every time i export?

I tried adding a keyframe with constant interpolation for every channel, and setting those channels' extrapolation mode to Constant Extrapolation, to no avail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants