vault backup: 2023-11-07 19:30:47

This commit is contained in:
BlueRose 2023-11-07 19:30:47 +08:00
parent 66fe7b2504
commit 5dfde64414
2 changed files with 15 additions and 3 deletions

View File

@ -94,6 +94,14 @@
"lastUpdated": 1699348599323
}
}
},
"遍历所有骨骼复制SourceGlobalPose到CurrentGlobalTransforms取得对应骨骼的Index以及父骨骼Index。跳过根骨骼": {
"遍历所有骨骼复制SourceGlobalPose到CurrentGlobalTransforms取得对应骨骼的Index以及父骨骼Index。跳过根骨骼": {
"currentFile": {
"count": 1,
"lastUpdated": 1699350988289
}
}
}
}
}

View File

@ -91,12 +91,16 @@ TargetRootTransform.SetRotation(Rotation);
遍历所有骨骼链并执行FChainEncoderFK::EncodePose()与FChainDecoderFK::DecodePose()。
FChainEncoderFK::EncodePose()
1. 遍历所有骨骼根据骨骼链Index得到BoneIndex之后将对应骨骼的WorldSpace Transform赋予到对应骨骼链Index的CurrentGlobalTransforms中。
2. Resize CurrentLocalTransforms其长度与SourceBoneIndices相同。
3. FillTransformsWithLocalSpaceOfChain()
1. 遍历所有骨骼复制SourceGlobalPose到**CurrentGlobalTransforms**
2. Resize CurrentLocalTransforms
3. FillTransformsWithLocalSpaceOfChain() 转换成LocalSpace数据。
1. 遍历所有骨骼链取得对应骨骼的Index以及父骨骼Index。跳过根骨骼
2. 计算相对Transform后放入对应ChainIndex的OutLocalTransforms中。
4. 根据ChainParentBoneIndex将父骨骼Transform赋予给ChainParentCurrentGlobalTransform。
FChainDecoderFK::DecodePose()
1. 更新IntermediateParentIndices的所有Index的父骨骼WorldSpace Transform。用来更新重定向后哪些不属于骨骼链的骨骼的WorldSpace Transform。在InitializeBoneChainPairs() -> InitializeIntermediateParentIndices()中初始化)
2. 从根骨骼开始重定向以保证最后结果不会发生偏差。计算了Source/Target InitialDelta、Target 根骨骼 Transform后将两者相乘最后应用给所有Source骨骼链。
3. 如果禁用FK重定向则返回当前WorldSpace Transform并且return。
4.