Closed sp0ng3Bob closed 2 days ago
The BoxAnimated
has a single animation with two channels
.
The first channel affects the rotation
.
It refers to sampler:0
, which defines
input
with values [1.25000, 2.50000]
(these are the times)output
with ... two quaternionsThe second channel affects the translation
It refers to sampler:1
, which defines
input
with values [0.00000, 1.25000, 2.50000, 3.70833]
(these are the times)output
with ... four translation vectorsIn the BoxAnimated model the input of the translation path is as follows: [1.25, 2.5, 0, 1.25]
This does not seem to be the case. Could it be that you are not extracting the right values for the accessor/bufferView
here?
The "challenge" in this case (or what the README.md of this model refers to) is that the two channels of the animation cover different time ranges. One channel goes from 1.2
to 2.5
. The other one goes from 0.0
to 3.70833
(whereever that value came from š ).
When you play this animation, you might want to imagine it as follows: Take the "smallest start time" and the "largest end time" of all channels, and let the time proceed between this start and end time. And in-between, you apply the animation that is "covered" by the respective channel - R
for rotation, T
for translation here:
0.0 1.25 2.5 3.70833
| | | |
------------------------------
RRRRRRRRRRR
TTTTTTTTTTTTTTTTTTTTTTTTTTTTTT
Wow. Yes. I am defenitley pulling the wrong values. That's incredible. Didn't even think about this.
I am really glad. Thank you for your time. Was stuck on this one for a week š¬.
Thank you for the feedback. It was indeed very helpfull. My animation logic was actually working, I will solve the parsing problem tomorrow.
Maybe another short hint: Depending on your IDE and preferences, you might consider the https://marketplace.visualstudio.com/items?itemName=cesium.gltf-vscode for VSCode. It allows browsing through glTF and inspecting the data, which can help for debugging stuff like this.
(The https://github.com/javagl/JglTF/tree/master/jgltf-browser offers a similar functionality, but... hasn't been updated for quite a while...)
Hi, I was reading the specification for the glTF 2.0.1. As someone would. I don't really understand what is going on, but on the pdf's page 90, under the animation.sampler.input section it says that the values in the time accessor are increasing. Apparently always. But then the model BoxAnimated comes along and in its readme it says:
First of all I wanna say that I tried many different things to sync the animations. Then at the end I thought of some normalised input times. So I did that, but the animation still colides or is somehow out of sync. (This was just a side info)
So, the thing that I wanna ask is: In the BoxAnimated model the input of the translation path is as follows: [1.25, 2.5, 0, 1.25]. So isn't this in conflict with the specifications? I really don't know anymore.
Enlighten me, please. I am done. Cheers.