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

Suggestion: Sample with discrete/constant interpolation of scale 0↔1 #77

Closed
donmccurdy opened this issue Jul 16, 2021 · 9 comments
Closed

Comments

@donmccurdy
Copy link

In a thread on the three.js forums we've come to the conclusion that a significant number of viewers cannot display constant interpolation of scale, particularly scale 0↔1.

  • ✅ three.js
  • ✅ PlayCanvas
  • ❌ Babylon.js
  • ❌ Khronos Sample Viewer
  • ❌ Spark AR

The 'broken' three each show slightly different results — Spark AR doesn't appear to support constant interpolation at all, whereas Babylon.js plays the animation correctly once and then reaches a broken state when trying to loop it.

It's a useful technique for 'baking' simulations as flipbook-style animations, showing each mesh for a single frame, but does depend on correct support for animating scale with constant interpolation.

@DRx3D
Copy link
Contributor

DRx3D commented Nov 14, 2023

This has been untouched for over a year. Is there anything to do here?

If there is no response, then this issue will be closed by 27 Nov.

@bghgary
Copy link

bghgary commented Nov 15, 2023

Babylon.js has already fixed this, but a sample model could still be useful.

@javagl
Copy link
Contributor

javagl commented Nov 15, 2023

By "constant", you mean STEP interpolation?

There is a pending PR for the InterpolationTest at #26 . I could just change the values of the respective accessor...

  accessor10.setArray(new Float32Array([
    1, 1, 1, 
    0.5, 0.5, 0.5,  // Change to 0 0 0
    1, 1, 1, 
    0.5, 0.5, 0.5,  // Change to 0 0 0
    1, 1, 1
  ]));

if this is it...

@donmccurdy
Copy link
Author

Yes, thanks – STEP interpolation with scale is what I had in mind.

@javagl
Copy link
Contributor

javagl commented Nov 15, 2023

This is what the InterpolationTest could look like with a scale of 0:

Khronos InterpolationTestScale0

An archive with the GLB and the code (hand-edited output of gltfTransformifier) for generating it:

InterpolationTestFix0004_scale0.zip

If people agree, I can update #26 with this.

@donmccurdy
Copy link
Author

donmccurdy commented Nov 16, 2023

An archive with the GLB and the code (hand-edited output of gltfTransformifier) for generating it:

total aside, but that is a wild and beautiful solution 🤯

@javagl
Copy link
Contributor

javagl commented Nov 16, 2023

OT: The name was inspired by BCELifier. It's a very rough "proof-of-concept" for now, but I try to allocate some time to maybe turn it into something useful.

@javagl
Copy link
Contributor

javagl commented Nov 21, 2023

I have updated the PR at #26 (comment) with the latest state that was posted here, where the scale interpolations go down to (0,0,0). When this PR is merged, then this issue can probably be closed.

@DRx3D DRx3D transferred this issue from KhronosGroup/glTF-Sample-Models Dec 4, 2023
@javagl
Copy link
Contributor

javagl commented Mar 1, 2024

The current version of the InterpolationTest at https://github.com/KhronosGroup/glTF-Sample-Assets/tree/main/Models/InterpolationTest now includes a STEP interpolation that scales between 0.0 and 1.0, so I assume that this can be closed.

@javagl javagl closed this as completed Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants