diff --git a/.obsidian/plugins/various-complements/data.json b/.obsidian/plugins/various-complements/data.json index 1c7646c..8031886 100644 --- a/.obsidian/plugins/various-complements/data.json +++ b/.obsidian/plugins/various-complements/data.json @@ -94,6 +94,14 @@ "lastUpdated": 1699348599323 } } + }, + "遍历所有骨骼,复制SourceGlobalPose到CurrentGlobalTransforms;取得对应骨骼的Index以及父骨骼Index。(跳过根骨骼)": { + "遍历所有骨骼,复制SourceGlobalPose到CurrentGlobalTransforms;取得对应骨骼的Index以及父骨骼Index。(跳过根骨骼)": { + "currentFile": { + "count": 1, + "lastUpdated": 1699350988289 + } + } } } } \ No newline at end of file diff --git a/03-UnrealEngine/Animation/UE5动画重定向核心逻辑笔记.md b/03-UnrealEngine/Animation/UE5动画重定向核心逻辑笔记.md index ce31050..0ba8bbc 100644 --- a/03-UnrealEngine/Animation/UE5动画重定向核心逻辑笔记.md +++ b/03-UnrealEngine/Animation/UE5动画重定向核心逻辑笔记.md @@ -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.