什么是 GLTF 动画采样器 input/output 值?
What are the GLTF animations sampler input/output values?
我正在阅读规范,但我无法理解采样器的属性。
这是我的动画
"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.
这让我更不清楚了。
关于什么是 input/output 值及其代表什么,是否有更详细的解释。例如,如果我将输入从 9 更改为 99 或更改为 9.9 或更改为 0.9 或更改为 0,将会发生什么情况。这将如何更改动画?
谢谢
这里的数字 9 和 10 是 glTF 访问器索引 ID 值。如果解码访问器索引 9,您将找到动画的每个关键帧的时间列表。如果解码访问器 10,通常您会期望找到关键帧的值列表。但由于这是 CUBICSPLINE
,访问器 10 将包含每个关键帧的入切线、值和出切线。
研究这种 glTF 文件的一种方法是使用 glTF 工具 VSCode 扩展。您可以右键单击输入或输出值并选择 Go To Definition 以找到有问题的访问器,然后再次选择 Go To Definition解码它。 (免责声明,我是 glTF Tools 的贡献者)。
我正在阅读规范,但我无法理解采样器的属性。
这是我的动画
"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.
这让我更不清楚了。
关于什么是 input/output 值及其代表什么,是否有更详细的解释。例如,如果我将输入从 9 更改为 99 或更改为 9.9 或更改为 0.9 或更改为 0,将会发生什么情况。这将如何更改动画?
谢谢
这里的数字 9 和 10 是 glTF 访问器索引 ID 值。如果解码访问器索引 9,您将找到动画的每个关键帧的时间列表。如果解码访问器 10,通常您会期望找到关键帧的值列表。但由于这是 CUBICSPLINE
,访问器 10 将包含每个关键帧的入切线、值和出切线。
研究这种 glTF 文件的一种方法是使用 glTF 工具 VSCode 扩展。您可以右键单击输入或输出值并选择 Go To Definition 以找到有问题的访问器,然后再次选择 Go To Definition解码它。 (免责声明,我是 glTF Tools 的贡献者)。