Consider (again) this model
simple.zip
And the resulted exported file
SimpleAnimPose.zip
It's been exported checking the "force sample animation" option.
In the animations/samplers section you can see that each input points to a different accessor. If you look at those accessors, they look similar, but each one points toward a different bufferView. Those buffer views, in turn, points to the same buffer, but with a different byteOffset each time, meaning that the data is duplicated in the bin file too.
If I check the data when loading the files it is strictly identical from one input to another.
This is perfectly valid in a spec point of view, so that's not really a bug, but maybe an enhancement. It would greatly reduce the files size if this data was reused.
If you force sampling, for all 3 bones translate, rotate and scale are sampled and created:
3 * 3 = 9, so that is the reason why there are 9 inputs.
The data looks similar, as in this simple case, the values are identical, as the original animation data is identical.
It makes no sense to scan animation data, if they can somehow be reused. For a complex model, they will probably never match and also the export would take too long.
On the other hand, I think this scanning to see if data can be reused would make sense as part of gltf-pipeline. @Nehon if you would like to suggest this as an enhancement there, that we should create sparse accessors where possible, that would be great. 馃檪
I don't get it... I'm talking about the input that is most likely time.
How sampling the times between 0 and 30 frame at 30 frames a second can be different from one time to another?
I'm not talking about translation rotation and scale data.
Look at this model from the gltf2.0 examples
https://github.com/KhronosGroup/glTF-Sample-Models/blob/master/2.0/BrainStem/glTF/BrainStem.gltf
For each animation, All the samplers have the same input.
EDIT: I was answering to @UX3D-nopper
@donmccurdy I will.
Ah okay, now I understand:
If, and only if the animations are forced sampled, the time buffer should just be reused.
Okay, got you wrong. So, I reopen and mark this as an enhancement.
Most helpful comment
@donmccurdy I will.