您将如何从 .fbx 文件中读取动画?我为此使用Java和OpenGL,但这与这个问题不太相关。我查看了几个不同的来源,但找不到任何有关 .FBX 文件格式的信息。
我的模型加载器当前加载名称、索引、顶点、法线、骨骼名称、骨骼权重和骨骼矩阵。但是我很难理解如何从这里阅读动画。
我可以假设这是文件的动画部分。
;Takes and animation section
;----------------------------------------------------
Takes: {
Current: "ArmatureAction"
Take: "ArmatureAction" {
FileName: "ArmatureAction.tak"
LocalTime: -1924423249,105843278750
ReferenceTime: -1924423249,105843278750
;Models animation
;----------------------------------------------------
Model: "Model::body" {
Version: 1.1
Channel: "Transform" {
Channel: "T" {
Channel: "X" {
Default: 0.000000000000000
KeyVer: 4005
KeyCount: 1
Key:
1924423250,0.000000000000000,L
Color: 1,0,0
}
Channel: "Y" {
Default: 0.000000000000000
KeyVer: 4005
KeyCount: 1
Key:
1924423250,0.000000000000000,L
Color: 0,1,0
}
Channel: "Z" {
Default: 0.000000000000000
KeyVer: 4005
KeyCount: 1
Key:
1924423250,0.000000000000000,L
Color: 0,0,1
}
LayerType: 1
}
Channel: "R" {
Channel: "X" {
Default: 90.000002504348856
KeyVer: 4005
KeyCount: 1
Key:
1924423250,90.000002504348856,L
Color: 1,0,0
}
Channel: "Y" {
Default: -89.999995674159678
KeyVer: 4005
KeyCount: 1
Key:
1924423250,-89.999995674159678,L
Color: 0,1,0
}
Channel: "Z" {
Default: 0.000000000000000
KeyVer: 4005
KeyCount: 1
Key:
1924423250,0.000000000000000,L
Color: 0,0,1
}
LayerType: 2
}
Channel: "S" {
Channel: "X" {
Default: 1.000000000000000
KeyVer: 4005
KeyCount: 1
Key:
1924423250,1.000000000000000,L
Color: 1,0,0
}
Channel: "Y" {
Default: 1.000000000000000
KeyVer: 4005
KeyCount: 1
Key:
1924423250,1.000000000000000,L
Color: 0,1,0
}
Channel: "Z" {
Default: 1.000000000000000
KeyVer: 4005
KeyCount: 1
Key:
1924423250,1.000000000000000,L
Color: 0,0,1
}
LayerType: 3
}
}
}
Model: "Model::head" {
Version: 1.1
Channel: "Transform" {
Channel: "T" {
Channel: "X" {...............................
请好心人解释一下这是如何格式化的?帮助表示赞赏!