vault backup: 2023-08-08 16:55:00
This commit is contained in:
parent
e51f5c0ef0
commit
40bed23a56
@ -54,5 +54,37 @@ MeshBoneIndex是当前的骨骼网格体用到的骨骼的Index。
|
|||||||
我们在动画节点里面一般通过FBoneReference来操作骨骼。BoneRefrence会通过BoneName获得3个骨骼索引。如果传入的是BoneContainer,那`BoneIndex`保存的是MeshIndex,如果传入的是Skeleton的话,那`BoneIndex`保存的是SkeletonIndex。
|
我们在动画节点里面一般通过FBoneReference来操作骨骼。BoneRefrence会通过BoneName获得3个骨骼索引。如果传入的是BoneContainer,那`BoneIndex`保存的是MeshIndex,如果传入的是Skeleton的话,那`BoneIndex`保存的是SkeletonIndex。
|
||||||
Epic网站上也有一篇文章作为参考[[1]](https://zhuanlan.zhihu.com/p/611398524#ref_1)。
|
Epic网站上也有一篇文章作为参考[[1]](https://zhuanlan.zhihu.com/p/611398524#ref_1)。
|
||||||
|
|
||||||
# c++
|
# FAnimNode
|
||||||
|
- Initialize_AnyThread:用于初始化数据,初始化ComponentPose、AlphaBoolBlend、AlphaScaleBiasClamp。
|
||||||
|
- CacheBones_AnyThread:用于缓存Pose。
|
||||||
|
- GatherDebugData:获取Debug数据。
|
||||||
|
- Evaluate:
|
||||||
|
- EvaluateSkeletalControl_AnyThread
|
||||||
|
- IsValidToEvaluate
|
||||||
|
|
||||||
|
# VMC4UE
|
||||||
|
- Initialize_AnyThread:调用InitializeBoneReferences()
|
||||||
|
- InitializeBoneReferences:初始化了之后需要用到BoneReferences、InitialBones。
|
||||||
|
- CacheBones_AnyThread:**重写函数**,ComponentPose.CacheBones()。
|
||||||
|
- Evaluate:无实现
|
||||||
|
- **EvaluateSkeletalControl_AnyThread**:核心逻辑。
|
||||||
|
- 判断VRMMapping是否经过初始化,如果没有则调用BuildMapping(),主要是将节点设置的VRMMapping.BoneMapping数据传递给`TMap<FName, FName> BoneMappingSkeletonToVMC`。
|
||||||
|
- 调用UVMC4UEBlueprintFunctionLibrary::GetStreamingSkeletalMeshTransform()
|
||||||
|
- 开启StreamingSkeletalMeshTransform的线程读写锁。
|
||||||
|
- 计算根骨骼Transform。
|
||||||
|
- 获取FComponentSpacePoseContext.Pose与BoneContainer的引用,开始遍历所有骨骼(使用BoneIndex)。
|
||||||
|
- 根据BoneIndex,从`TArray<FBoneReference> BoneReferences`获取BoneName。
|
||||||
|
- 根据BoneName,判断BoneMappingSkeletonToVMC是否
|
||||||
|
- 容错处理,
|
||||||
|
- IsValidToEvaluate
|
||||||
|
- BuildMapping:
|
||||||
|
|
||||||
|
成员变量作用:
|
||||||
|
- `TArray<FBoneReference> BoneReferences`:
|
||||||
|
- `TMap<FName, FName> BoneMappingSkeletonToVMC`:
|
||||||
|
|
||||||
|
|
||||||
|
### VRMMaping的作用
|
||||||
|
|
||||||
|
|
||||||
|
## GetStreamingSkeletalMeshTransform
|
Loading…
x
Reference in New Issue
Block a user