我正在看说明书,但我不能理解取样器的特性。
这就是我的动画
"animations" : [
{
"channels" : [
{
"sampler" : 0,
"target" : {
"node" : 0,
"path" : "translation"
}
}
],
"name" : "00001_2780.datAction",
"samplers" : [
{
"input" : 9,
"interpolation" : "CUBICSPLINE",
"output" : 10
}
]
},
{
"channels" : [
{
"sampler" : 0,
"target" : {
"node" : 1,
"path" : "translation"
}
}
],
"name" : "00002_2780.datAction",
"samplers" : [
{
"input" : 9,
"interpolation" : "CUBICSPLINE",
"output" : 11
}
]
}
],我无法理解的是,第一个样本的值是9和10,第二个样本的值是9和11。
我们在说明书中所拥有的就是
https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#animations
Each of the animation's samplers defines the input/output pair: a set of floating point scalar values representing linear time in seconds; and a set of vectors or scalars representing animated property. 这让我更加不清楚。
是否有更详细的解释输入/输出值是什么以及它们代表什么。例如,如果我将输入从9改为99、9.9或0.9或0,会发生什么情况。这将如何改变动画?
谢谢
发布于 2019-07-30 06:10:17
这里的数字9和10是glTF访问器索引ID值。如果您解码访问器索引9,您将找到动画的每个关键帧的时间列表。如果您解码访问器10,通常您会希望找到关键帧的值列表。但由于这是CUBICSPLINE,访问器10将包含每个关键帧的切线、值和外切线.
研究这样的glTF文件的一种方法是使用glTF工具扩展VSCode。您可以右键单击输入或输出值,然后选择Go To Definition来获取所述访问器,然后再次选择Go to Definition对其进行解码。(免责声明,我是glTF工具的贡献者)。
https://stackoverflow.com/questions/57260396
复制相似问题