动画共享插件

Choose your operating system:

Windows

macOS

Linux

动画共享插件提供了一种创建共享动画系统的方法,可以减少一群Actor所需的动画工作总量。基于 主姿势组件 系统,动画共享插件使用一组动画状态桶,为其评估动画实例。然后,生成的姿势被转移到所有构成这个桶的子组件。

下图提供了系统工作原理的高级细分:

单击图像显示全视图。

  1. 单独群集Actor(AActor)

  2. 作为动画共享设置一部分的UAnimationStateProcessor实例

  3. 使用动画共享设置进行初始化的运行时管理器

  4. 用户设置的状态(命名的枚举)

  5. 以骨架网格体组件形式出现的状态的运行时表示

  6. 用于与子骨架网格体组件共享动画的主姿势组件系统

在下面的示例视频中,带有骨架网格体组件的蓝图将循环通过几个动画状态。还将显示一组单独的Actor,其中每个Actor的动画状态是根据蓝图中骨架网格体组件的动画状态确定的。

启用动画共享插件

为了使用动画共享,您需要在 编程(Programming) 部分下的 编辑(Edit)> 插件(Plugins) 菜单中启用动画共享插件:

单击图像显示全视图。

启用插件后,需要重新启动编辑器。

动画共享设置资源

动画共享设置(Animation Sharing Setup) 资源包含将在指定Actor之间共享的所有信息。您可以在 动画(Animation) 类别下的 内容浏览器(Content Browser) 内创建一个动画共享设置资源。

AnimSharingSetup.png

在动画共享设置资源中,您可以定义以下属性:

NewAnimSharingAsset.png

骨架设置

通过单击 + (加号)可以添加多个骨架及其相应的设置。当您有多个骨架和骨架网格体时,这是非常有用的,这些骨架和骨架网格体将在动画共享期间由动画驱动。

属性

说明

骨架(Skeleton)

要复制的骨架资源。

动画分享设置特定于指定骨架。

骨架网格体(Skeletal Mesh)

要复制的骨架网格体。

这仅用于调试姿势。

用于混合的动画蓝图(Animation Blueprint for Blending)

作为 AnimSharingTransitionInstance 的子项的动画蓝图。

您必须创建并设置其中之一来处理状态之间的混合。此外,每次需要混合时,都会生成一个并运行以处理增加成本的转换。

用于叠加动画的动画蓝图(Animation Blueprint for Additive Animation)

作为 AnimSharingAdditiveInstance 的子项的动画蓝图,用于叠加动画。

动画共享设置(Animation Sharing Setup) 资源中,还需要将 动画状态(Animation State) 设置为 按需(On Demand) ,并启用 叠加型(Additive) 选项。

状态处理器类(State Processor Class)

确定Actor所处状态时使用的接口类。

需要设置此参数以添加动画状态。

动画状态(Animation States)

这是一个数组,包含Actor可以处于的所有状态。每个状态都有自己的桶。

动画状态

AnimationStateSection.png

一旦在 骨架设置(Skeleton Setup) 中定义了 状态处理器类(State Processor Class) ,就可以根据其中的状态为每个 动画状态(Animation State) 定义以下属性。

属性

说明

状态(State)

定义您希望数组的索引包含用于哪个状态的信息。

这是从状态处理器类和分配的动画状态枚举继承的。

动画设置(Animation Setups)

这使您能够定义每个状态的动画信息,例如要播放哪个动画序列、要使用哪个动画蓝图来回放动画序列、随机实例的数量(如果需要),以及是否为特定平台启用了设置。

按需(On Demand)

不管这种状态是否按需分类,这意味着您可以在需要时启动一个唯一的动画。这将为每个按需动画生成一个唯一的实例。

当达到最大值时,它会对齐到最近的动画。

叠加型(Additive)

状态是否是叠加型状态。

必须启用按需,且您将需要叠加型动画蓝图来处理混合。

混合时间(Blend Time)

混合到状态时的混合时长。

并发实例的最大数量(Maximum Number Of Concurrent Instances)

将为状态(特定于平台)创建的实例数。

需要曲线(Requires Curves)

该动画是否需要曲线或变形目标才能正确地为从组件工作。

可延展性设置

ScalabilitySettingsSection.png

可延展性设置(Scalability Settings)部分提供了以下属性:

属性

说明

使用混合过渡(Use Blend Transitions)

动画是否应该执行混合以从一种状态过渡到另一种状态。

混合显著性数值(Blend Significance Value)

显著性值与过渡是否应该混合有关。

并发混合的最大数量(Maximum Number Concurrent Blends)

可以同时运行的混合数。

每一个超过这个限制的动画都会对齐到最近的动画。

Tick Significance Value

显著性管理器 配合使用。任何超过指定值的内容都不tick。

动画分享状态处理器

AnimationSharingStateProcessor 类是一个专用的蓝图类(或者可以使用原生C++类),用于确定当前处于什么状态。要创建此类蓝图,请为 AnimationSharingStateProcessor 类创建一个新蓝图,并为该蓝图输入所需的名称。

动画共享状态处理器蓝图应仅用于原型设计。与蓝图实现相反,使用本地实现将大大提高运行时性能。

AnimSharingStateProcessorClass.png

蓝图的 详情(Details) 面板中,将 动画状态枚举(Animation State Enum) 设置为包含动画状态的枚举。

ProcessorDefaults.png

动画共享状态处理器蓝图也是蓝图类,您将在 动画共享设置(Animation Sharing Setup) 资源中将其定义为 状态处理器类(State Processor Class) (如下图所示)。定义状态处理器类之后,可以通过单击+(加号)来添加动画状态,以表示枚举中的各个状态。

AnimationStatesDefined.png

动画共享状态处理器蓝图可以覆盖两个函数。第一个是 Process Actor State 函数(如下图所示),它可以用来了解您正在编辑其状态的Actor。第二个可覆盖函数 Get Animation State Enum 应该用于从本地动画共享状态处理器返回枚举类,并可用于与本地实现进行交互。

单击图像显示全视图。

在上面的图像中,我们覆盖了 Process Actor State 函数,并转换到一个名为 Husk_BP 的蓝图,以检索它的动画状态(存储在我们创建的变量中)。动画共享状态处理器蓝图也在动画共享设置中指定为 状态处理器类(State Processor Class)

动画蓝图设置

您将需要设置 动画蓝图 以处理动画状态之间的混合。这需要一个名为 动画共享过渡实例(Anim Sharing Transition Instance) 的特殊动画蓝图类。从 内容浏览器(Content Browser) 创建动画蓝图,然后在 选取父类(Pick Parent Class) 菜单中,选择所需的骨架资源,并将类选为 AnimSharingTransitionInstance

AnimBPCreation.png

AnimSharingTransitionInstance 动画蓝图的 动画图表(AnimGraph) 上,复制或使用下面描述的设置。

复制节点图表

Begin Object Class=/Script/AnimGraph.AnimGraphNode_Root Name="AnimGraphNode_Root_0"  
ShowPinForProperties(0)=(PropertyName="Result",PropertyFriendlyName="Result",PropertyTooltip="Result",CategoryName="Links",bShowPin=True)  
NodePosX=-144  
ErrorType=4  
NodeGuid=0FCF00194AC285A9A163E7B694738C10  
CustomProperties Pin (PinId=9FC69ADD403386DE35C76DBC40EC0979,PinName="Result",PinFriendlyName="Result",PinToolTip="Result\\nPose Link Structure\\n\\nResult",PinType.PinCategory="struct",PinType.PinSubCategory="",PinType.PinSubCategoryObject=ScriptStruct'"/Script/Engine.PoseLink"',PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsArray=False,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,DefaultValue="(LinkID=-1,SourceLinkID=-1)",AutogeneratedDefaultValue="(LinkID=-1,SourceLinkID=-1)",LinkedTo=(AnimGraphNode_BlendListByBool_0 DD6EA15242C95BC4958C309F37456CD3,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)  
End Object  
Begin Object Class=/Script/AnimGraph.AnimGraphNode_BlendListByBool Name="AnimGraphNode_BlendListByBool_0"  
ShowPinForProperties(0)=(PropertyName="bActiveValue",PropertyFriendlyName="Active Value",PropertyTooltip=NSLOCTEXT("UObjectToolTips", "AnimNode_BlendListByBool:bActiveValue", "Which input should be connected to the output?"),CategoryName="Runtime",bShowPin=True)  
ShowPinForProperties(1)=(PropertyName="BlendPose",PropertyFriendlyName="Blend Pose",PropertyTooltip="Blend Pose",CategoryName="Links",bShowPin=True)  
ShowPinForProperties(2)=(PropertyName="BlendTime",PropertyFriendlyName="Blend Time",PropertyTooltip="Blend Time",CategoryName="Config",bShowPin=True,bCanToggleVisibility=True)  
ShowPinForProperties(3)=(PropertyName="BlendType",PropertyFriendlyName="Blend Type",PropertyTooltip="Blend Type",CategoryName="BlendType")  
ShowPinForProperties(4)=(PropertyName="bResetChildOnActivation",PropertyFriendlyName="Reset Child on Activation",PropertyTooltip=NSLOCTEXT("UObjectToolTips", "AnimNode_BlendListBase:bResetChildOnActivation", "This reinitializes child pose when re-activated.For example, when active child changes"),CategoryName="Option")  
ShowPinForProperties(5)=(PropertyName="CustomBlendCurve",PropertyFriendlyName="Custom Blend Curve",PropertyTooltip="Custom Blend Curve",CategoryName="BlendType")  
ShowPinForProperties(6)=(PropertyName="BlendProfile",PropertyFriendlyName="Blend Profile",PropertyTooltip="Blend Profile",CategoryName="BlendType")  
NodePosX=-368  
NodePosY=16  
NodeGuid=3AF80FBE453C5BF351B74AB41ABCC2DB  
CustomProperties Pin (PinId=42CC2B874A21AE5E1F7958B6A97A5302,PinName="bActiveValue",PinFriendlyName="Active Value",PinToolTip="Active Value\\nBoolean\\n\\nWhich input should be connected to the output?",PinType.PinCategory="bool",PinType.PinSubCategory="",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsArray=False,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,DefaultValue="False",AutogeneratedDefaultValue="False",LinkedTo=(K2Node_VariableGet_0 9E7EA92B4CD9BC7BA4307D8E5DC8F005,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)  
CustomProperties Pin (PinId=925ED2414617452C6DF0A392C0EDD131,PinName="BlendPose_0",PinFriendlyName=LOCGEN_FORMAT_NAMED(NSLOCTEXT("A3Nodes", "BoolPoseFriendlyName", "{TrueFalse} Pose"), "TrueFalse", NSLOCTEXT("A3Nodes", "True", "True")),PinToolTip="Blend Pose 0\\nPose Link Structure\\n\\nBlend Pose",PinType.PinCategory="struct",PinType.PinSubCategory="",PinType.PinSubCategoryObject=ScriptStruct'"/Script/Engine.PoseLink"',PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsArray=False,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,DefaultValue="(LinkID=-1,SourceLinkID=-1)",AutogeneratedDefaultValue="(LinkID=-1,SourceLinkID=-1)",LinkedTo=(AnimGraphNode_CopyPoseFromMesh_0 4E472A1840B3F6EF24C86E8FA2694DE5,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)  
CustomProperties Pin (PinId=500C56AA43BFCFD5D1AF558CB451A02A,PinName="BlendPose_1",PinFriendlyName=LOCGEN_FORMAT_NAMED(NSLOCTEXT("A3Nodes", "BoolPoseFriendlyName", "{TrueFalse} Pose"), "TrueFalse", NSLOCTEXT("A3Nodes", "False", "False")),PinToolTip="Blend Pose 1\\nPose Link Structure\\n\\nBlend Pose",PinType.PinCategory="struct",PinType.PinSubCategory="",PinType.PinSubCategoryObject=ScriptStruct'"/Script/Engine.PoseLink"',PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsArray=False,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,DefaultValue="(LinkID=-1,SourceLinkID=-1)",AutogeneratedDefaultValue="(LinkID=-1,SourceLinkID=-1)",LinkedTo=(AnimGraphNode_CopyPoseFromMesh_1 29C385EE451B16B5AC069EA108C775F2,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)  
CustomProperties Pin (PinId=1D9FB4E64CF1FBDED841639A772E142B,PinName="BlendTime_0",PinFriendlyName=LOCGEN_FORMAT_NAMED(NSLOCTEXT("A3Nodes", "BoolBlendTimeFriendlyName", "{TrueFalse} Blend Time"), "TrueFalse", NSLOCTEXT("A3Nodes", "True", "True")),PinToolTip="Blend Time 0\\nFloat\\n\\nBlend Time",PinType.PinCategory="float",PinType.PinSubCategory="",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsArray=False,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,DefaultValue="0.100000",AutogeneratedDefaultValue="0.100000",LinkedTo=(K2Node_VariableGet_1 0107072B4F8D93B6C75E59995402C55D,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)  
CustomProperties Pin (PinId=5DA4ACBD4A41973C0319A08EFEC4EE85,PinName="BlendTime_1",PinFriendlyName=LOCGEN_FORMAT_NAMED(NSLOCTEXT("A3Nodes", "BoolBlendTimeFriendlyName", "{TrueFalse} Blend Time"), "TrueFalse", NSLOCTEXT("A3Nodes", "False", "False")),PinToolTip="Blend Time 1\\nFloat\\n\\nBlend Time",PinType.PinCategory="float",PinType.PinSubCategory="",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsArray=False,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,DefaultValue="0.100000",AutogeneratedDefaultValue="0.100000",LinkedTo=(K2Node_VariableGet_1 0107072B4F8D93B6C75E59995402C55D,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)  
CustomProperties Pin (PinId=DD6EA15242C95BC4958C309F37456CD3,PinName="Pose",Direction="EGPD_Output",PinType.PinCategory="struct",PinType.PinSubCategory="",PinType.PinSubCategoryObject=ScriptStruct'"/Script/Engine.PoseLink"',PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsArray=False,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,LinkedTo=(AnimGraphNode_Root_0 9FC69ADD403386DE35C76DBC40EC0979,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)  
End Object  
Begin Object Class=/Script/BlueprintGraph.K2Node_VariableGet Name="K2Node_VariableGet_0"  
VariableReference=(MemberName="bBlendBool",bSelfContext=True)  
NodePosX=-704  
NodePosY=-64  
NodeGuid=821953DA498F727F31C7BBAC251D20E4  
CustomProperties Pin (PinId=9E7EA92B4CD9BC7BA4307D8E5DC8F005,PinName="bBlendBool",Direction="EGPD_Output",PinType.PinCategory="bool",PinType.PinSubCategory="",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsArray=False,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,DefaultValue="false",AutogeneratedDefaultValue="false",LinkedTo=(AnimGraphNode_BlendListByBool_0 42CC2B874A21AE5E1F7958B6A97A5302,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)  
CustomProperties Pin (PinId=26B993D349EB00A2C207B7883949A890,PinName="self",PinFriendlyName=NSLOCTEXT("K2Node", "Target", "Target"),PinType.PinCategory="object",PinType.PinSubCategory="",PinType.PinSubCategoryObject=Class'"/Script/AnimationSharing.AnimSharingTransitionInstance"',PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsArray=False,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PersistentGuid=00000000000000000000000000000000,bHidden=True,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)  
End Object  
Begin Object Class=/Script/BlueprintGraph.K2Node_VariableGet Name="K2Node_VariableGet_1"  
VariableReference=(MemberName="BlendTime",bSelfContext=True)  
NodePosX=-592  
NodePosY=208  
NodeGuid=9BD298FF438FBD6A5B54C084EB18C615  
CustomProperties Pin (PinId=0107072B4F8D93B6C75E59995402C55D,PinName="BlendTime",Direction="EGPD_Output",PinType.PinCategory="float",PinType.PinSubCategory="",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsArray=False,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,DefaultValue="0.0",AutogeneratedDefaultValue="0.0",LinkedTo=(AnimGraphNode_BlendListByBool_0 1D9FB4E64CF1FBDED841639A772E142B,AnimGraphNode_BlendListByBool_0 5DA4ACBD4A41973C0319A08EFEC4EE85,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)  
CustomProperties Pin (PinId=AFEFF55445A86C7492FDE4B97C1289E0,PinName="self",PinFriendlyName=NSLOCTEXT("K2Node", "Target", "Target"),PinType.PinCategory="object",PinType.PinSubCategory="",PinType.PinSubCategoryObject=Class'"/Script/AnimationSharing.AnimSharingTransitionInstance"',PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsArray=False,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PersistentGuid=00000000000000000000000000000000,bHidden=True,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)  
End Object  
Begin Object Class=/Script/BlueprintGraph.K2Node_VariableGet Name="K2Node_VariableGet_2"  
VariableReference=(MemberName="FromComponent",bSelfContext=True)  
NodePosX=-880  
NodePosY=32  
NodeGuid=4F27808B4EF2180632DC08A96888FE32  
CustomProperties Pin (PinId=313057EE4F41F0DDE072C6834733C7C7,PinName="FromComponent",Direction="EGPD_Output",PinType.PinCategory="object",PinType.PinSubCategory="",PinType.PinSubCategoryObject=Class'"/Script/Engine.SkeletalMeshComponent"',PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsArray=False,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=True,LinkedTo=(AnimGraphNode_CopyPoseFromMesh_0 420BA23743193D552593829A53F8F68C,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)  
CustomProperties Pin (PinId=CF3DE59A4B883F00976CDFADDF43B2E8,PinName="self",PinFriendlyName=NSLOCTEXT("K2Node", "Target", "Target"),PinType.PinCategory="object",PinType.PinSubCategory="",PinType.PinSubCategoryObject=Class'"/Script/AnimationSharing.AnimSharingTransitionInstance"',PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsArray=False,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PersistentGuid=00000000000000000000000000000000,bHidden=True,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)  
End Object  
Begin Object Class=/Script/AnimGraph.AnimGraphNode_CopyPoseFromMesh Name="AnimGraphNode_CopyPoseFromMesh_0"  
ShowPinForProperties(0)=(PropertyName="SourceMeshComponent",PropertyFriendlyName="Source Mesh Component",PropertyTooltip=NSLOCTEXT("UObjectToolTips", "AnimNode_CopyPoseFromMesh:SourceMeshComponent", "This is used by default if it\\'s valid"),CategoryName="Copy",bShowPin=True,bCanToggleVisibility=True)  
ShowPinForProperties(1)=(PropertyName="bUseAttachedParent",PropertyFriendlyName="Use Attached Parent",PropertyTooltip=NSLOCTEXT("UObjectToolTips", "AnimNode_CopyPoseFromMesh:bUseAttachedParent", "If SourceMeshComponent is not valid, and if this is true, it will look for attahced parent as a source"),CategoryName="Copy")  
ShowPinForProperties(2)=(PropertyName="bCopyCurves",PropertyFriendlyName="Copy Curves",PropertyTooltip=NSLOCTEXT("UObjectToolTips", "AnimNode_CopyPoseFromMesh:bCopyCurves", "Copy curves also from SouceMeshComponent.This will copy the curves if this instance also contains"),CategoryName="Copy")  
NodePosX=-688  
NodePosY=16  
NodeGuid=0CB5F4EB4092B28B3ACF2DAA47E5A3A3  
CustomProperties Pin (PinId=420BA23743193D552593829A53F8F68C,PinName="SourceMeshComponent",PinFriendlyName="Source Mesh Component",PinToolTip="Source Mesh Component\\nSkeletal Mesh Component Weak object\\n\\nThis is used by default if it\\'s valid",PinType.PinCategory="object",PinType.PinSubCategory="",PinType.PinSubCategoryObject=Class'"/Script/Engine.SkeletalMeshComponent"',PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsArray=False,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=True,AutogeneratedDefaultValue="None",LinkedTo=(K2Node_VariableGet_2 313057EE4F41F0DDE072C6834733C7C7,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)  
CustomProperties Pin (PinId=4E472A1840B3F6EF24C86E8FA2694DE5,PinName="Pose",Direction="EGPD_Output",PinType.PinCategory="struct",PinType.PinSubCategory="",PinType.PinSubCategoryObject=ScriptStruct'"/Script/Engine.PoseLink"',PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsArray=False,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,LinkedTo=(AnimGraphNode_BlendListByBool_0 925ED2414617452C6DF0A392C0EDD131,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)  
End Object  
Begin Object Class=/Script/BlueprintGraph.K2Node_VariableGet Name="K2Node_VariableGet_3"  
VariableReference=(MemberName="ToComponent",bSelfContext=True)  
NodePosX=-864  
NodePosY=112  
NodeGuid=3E19B7E141965AF034C503A930E8E45A  
CustomProperties Pin (PinId=14584B5442ACDBFDA04E85963CDB4DBF,PinName="ToComponent",Direction="EGPD_Output",PinType.PinCategory="object",PinType.PinSubCategory="",PinType.PinSubCategoryObject=Class'"/Script/Engine.SkeletalMeshComponent"',PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsArray=False,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=True,LinkedTo=(AnimGraphNode_CopyPoseFromMesh_1 541B298D40CB962059D422B7A276CA59,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)  
CustomProperties Pin (PinId=6E39D3D44FEF3F7E975C89A5B923E1F8,PinName="self",PinFriendlyName=NSLOCTEXT("K2Node", "Target", "Target"),PinType.PinCategory="object",PinType.PinSubCategory="",PinType.PinSubCategoryObject=Class'"/Script/AnimationSharing.AnimSharingTransitionInstance"',PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsArray=False,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PersistentGuid=00000000000000000000000000000000,bHidden=True,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)  
End Object  
Begin Object Class=/Script/AnimGraph.AnimGraphNode_CopyPoseFromMesh Name="AnimGraphNode_CopyPoseFromMesh_1"  
ShowPinForProperties(0)=(PropertyName="SourceMeshComponent",PropertyFriendlyName="Source Mesh Component",PropertyTooltip=NSLOCTEXT("UObjectToolTips", "AnimNode_CopyPoseFromMesh:SourceMeshComponent", "This is used by default if it\\'s valid"),CategoryName="Copy",bShowPin=True,bCanToggleVisibility=True)  
ShowPinForProperties(1)=(PropertyName="bUseAttachedParent",PropertyFriendlyName="Use Attached Parent",PropertyTooltip=NSLOCTEXT("UObjectToolTips", "AnimNode_CopyPoseFromMesh:bUseAttachedParent", "If SourceMeshComponent is not valid, and if this is true, it will look for attahced parent as a source"),CategoryName="Copy")  
ShowPinForProperties(2)=(PropertyName="bCopyCurves",PropertyFriendlyName="Copy Curves",PropertyTooltip=NSLOCTEXT("UObjectToolTips", "AnimNode_CopyPoseFromMesh:bCopyCurves", "Copy curves also from SouceMeshComponent.This will copy the curves if this instance also contains"),CategoryName="Copy")  
NodePosX=-688  
NodePosY=96  
NodeGuid=A4D7DD8348E8D17BC173869171B5FF52  
CustomProperties Pin (PinId=541B298D40CB962059D422B7A276CA59,PinName="SourceMeshComponent",PinFriendlyName="Source Mesh Component",PinToolTip="Source Mesh Component\\nSkeletal Mesh Component Weak object\\n\\nThis is used by default if it\\'s valid",PinType.PinCategory="object",PinType.PinSubCategory="",PinType.PinSubCategoryObject=Class'"/Script/Engine.SkeletalMeshComponent"',PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsArray=False,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=True,AutogeneratedDefaultValue="None",LinkedTo=(K2Node_VariableGet_3 14584B5442ACDBFDA04E85963CDB4DBF,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)  
CustomProperties Pin (PinId=29C385EE451B16B5AC069EA108C775F2,PinName="Pose",Direction="EGPD_Output",PinType.PinCategory="struct",PinType.PinSubCategory="",PinType.PinSubCategoryObject=ScriptStruct'"/Script/Engine.PoseLink"',PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsArray=False,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,LinkedTo=(AnimGraphNode_BlendListByBool_0 500C56AA43BFCFD5D1AF558CB451A02A,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)  
End Object  

动画共享叠加型实例

当使用叠加型动画时,您将需要使用 AnimSharingAdditiveInstance 类的 动画蓝图(Animation Blueprint)

AnimSharingAdditiveBP.png

动画状态(Animation State) 将需要被标记为 按需(On Demand) ,并在 动画共享设置(Animation Sharing Setup) 资源中启用 叠加型(Additive)

OnDemandCheckbox.png

AnimSharingAdditiveInstance 动画蓝图的 动画图表(AnimGraph) 上,复制或重新创建下面描述的设置。

复制节点图表

Begin Object Class=/Script/AnimGraph.AnimGraphNode_Root Name="AnimGraphNode_Root_0"  
ShowPinForProperties(0)=(PropertyName="Result",PropertyFriendlyName="Result",PropertyTooltip="Result",CategoryName="Links",bShowPin=True)  
NodePosX=160  
NodePosY=16  
ErrorType=4  
ErrorMsg="Result was visible but ignored"  
NodeGuid=9B9C0A274EFE3D4893B338B63E4BA534  
CustomProperties Pin (PinId=D28554294AFBA1C3D8B9799438DD3B84,PinName="Result",PinFriendlyName="Result",PinToolTip="Result\\nPose Link Structure\\n\\nResult",PinType.PinCategory="struct",PinType.PinSubCategory="",PinType.PinSubCategoryObject=ScriptStruct'"/Script/Engine.PoseLink"',PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsArray=False,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,DefaultValue="(LinkID=-1,SourceLinkID=-1)",AutogeneratedDefaultValue="(LinkID=-1,SourceLinkID=-1)",LinkedTo=(AnimGraphNode_ApplyMeshSpaceAdditive_0 66A1DDE64223F117AA0060AAD022EB98,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)  
End Object  
Begin Object Class=/Script/BlueprintGraph.K2Node_VariableGet Name="K2Node_VariableGet_0"  
VariableReference=(MemberName="BaseComponent",bSelfContext=True)  
NodePosX=-560  
NodePosY=32  
NodeGuid=3CDA48D04E4DC54B07E1A8B387D7F4B1  
CustomProperties Pin (PinId=50C8662E4549FB4C825F12B859F469F4,PinName="BaseComponent",Direction="EGPD_Output",PinType.PinCategory="object",PinType.PinSubCategory="",PinType.PinSubCategoryObject=Class'"/Script/Engine.SkeletalMeshComponent"',PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsArray=False,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=True,LinkedTo=(AnimGraphNode_CopyPoseFromMesh_0 7B3EDF7D4DC4CA4FD772CEAC8A5A5380,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)  
CustomProperties Pin (PinId=F163231644191CE37FF1E8A0011AE6E8,PinName="self",PinFriendlyName=NSLOCTEXT("K2Node", "Target", "Target"),PinType.PinCategory="object",PinType.PinSubCategory="",PinType.PinSubCategoryObject=Class'"/Script/AnimationSharing.AnimSharingAdditiveInstance"',PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsArray=False,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PersistentGuid=00000000000000000000000000000000,bHidden=True,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)  
End Object  
Begin Object Class=/Script/BlueprintGraph.K2Node_VariableGet Name="K2Node_VariableGet_1"  
VariableReference=(MemberName="AdditiveAnimation",bSelfContext=True)  
NodePosX=-544  
NodePosY=160  
NodeGuid=CEBFE47048DE6DB8C4D7A59FE7B08D1F  
CustomProperties Pin (PinId=0292554C4B9777F0B2A45381E54369C8,PinName="AdditiveAnimation",Direction="EGPD_Output",PinType.PinCategory="object",PinType.PinSubCategory="",PinType.PinSubCategoryObject=Class'"/Script/Engine.AnimSequence"',PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsArray=False,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=True,LinkedTo=(AnimGraphNode_SequencePlayer_0 1844AF8D4D95F2AD70353B9286320E36,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)  
CustomProperties Pin (PinId=BE8F997544CD3B8CFD492F908AB3CD9D,PinName="self",PinFriendlyName=NSLOCTEXT("K2Node", "Target", "Target"),PinType.PinCategory="object",PinType.PinSubCategory="",PinType.PinSubCategoryObject=Class'"/Script/AnimationSharing.AnimSharingAdditiveInstance"',PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsArray=False,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PersistentGuid=00000000000000000000000000000000,bHidden=True,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)  
End Object  
Begin Object Class=/Script/AnimGraph.AnimGraphNode_SequencePlayer Name="AnimGraphNode_SequencePlayer_0"  
ShowPinForProperties(0)=(PropertyName="Sequence",PropertyFriendlyName="Sequence",PropertyTooltip=NSLOCTEXT("UObjectToolTips", "AnimNode_SequencePlayer:Sequence", "The animation sequence asset to play"),CategoryName="Settings",bShowPin=True,bCanToggleVisibility=True)  
ShowPinForProperties(1)=(PropertyName="PlayRateBasis",PropertyFriendlyName="Play Rate Basis",PropertyTooltip=NSLOCTEXT("UObjectToolTips", "AnimNode_SequencePlayer:PlayRateBasis", "The Basis in which the PlayRate is expressed in. This is used to rescale PlayRate inputs.\\nFor example a Basis of 100 means that the PlayRate input will be divided by 100."),CategoryName="Settings",bCanToggleVisibility=True)  
ShowPinForProperties(2)=(PropertyName="PlayRate",PropertyFriendlyName="Play Rate",PropertyTooltip=NSLOCTEXT("UObjectToolTips", "AnimNode_SequencePlayer:PlayRate", "The play rate multiplier.Can be negative, which will cause the animation to play in reverse."),CategoryName="Settings",bCanToggleVisibility=True)  
ShowPinForProperties(3)=(PropertyName="PlayRateScaleBiasClamp",PropertyFriendlyName="Play Rate Scale Bias Clamp",PropertyTooltip=NSLOCTEXT("UObjectToolTips", "AnimNode_SequencePlayer:PlayRateScaleBiasClamp", "Additional scaling, offsetting and clamping of PlayRate input.\\nPerformed after PlayRateBasis."),CategoryName="Settings")  
ShowPinForProperties(4)=(PropertyName="StartPosition",PropertyFriendlyName="Start Position",PropertyTooltip=NSLOCTEXT("UObjectToolTips", "AnimNode_SequencePlayer:StartPosition", "The start up position, it only applies when reinitialized\\nif you loop, it will still start from 0.f after finishing the round"),CategoryName="Settings",bCanToggleVisibility=True)  
ShowPinForProperties(5)=(PropertyName="bLoopAnimation",PropertyFriendlyName="Loop Animation",PropertyTooltip=NSLOCTEXT("UObjectToolTips", "AnimNode_SequencePlayer:bLoopAnimation", "Should the animation continue looping when it reaches the end?"),CategoryName="Settings",bShowPin=True,bCanToggleVisibility=True)  
ShowPinForProperties(6)=(PropertyName="bIgnoreForRelevancyTest",PropertyFriendlyName="Ignore for Relevancy Test",PropertyTooltip=NSLOCTEXT("UObjectToolTips", "AnimNode_AssetPlayerBase:bIgnoreForRelevancyTest", "If true, \\"Relevant anim\\" nodes that look for the highest weighted animation in a state will ignore\\nthis node"),CategoryName="Relevancy",bCanToggleVisibility=True)  
ShowPinForProperties(7)=(PropertyName="BlendWeight",PropertyFriendlyName="Blend Weight",PropertyTooltip=NSLOCTEXT("UObjectToolTips", "AnimNode_AssetPlayerBase:BlendWeight", "Last encountered blendweight for this node"),CategoryName="DoNotEdit")  
ShowPinForProperties(8)=(PropertyName="InternalTimeAccumulator",PropertyFriendlyName="Internal Time Accumulator",PropertyTooltip=NSLOCTEXT("UObjectToolTips", "AnimNode_AssetPlayerBase:InternalTimeAccumulator", "Accumulated time used to reference the asset in this node"),CategoryName="DoNotEdit")  
NodePosX=-368  
NodePosY=144  
NodeGuid=47045FB34243DFC4BEC84CB78381A3F8  
CustomProperties Pin (PinId=1844AF8D4D95F2AD70353B9286320E36,PinName="Sequence",PinFriendlyName="Sequence",PinToolTip="Sequence\\nAnim Sequence Base Object Reference\\n\\nThe animation sequence asset to play",PinType.PinCategory="object",PinType.PinSubCategory="",PinType.PinSubCategoryObject=Class'"/Script/Engine.AnimSequenceBase"',PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsArray=False,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,AutogeneratedDefaultValue="None",LinkedTo=(K2Node_VariableGet_1 0292554C4B9777F0B2A45381E54369C8,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)  
CustomProperties Pin (PinId=DBD0DAAA49710060F33B60AA668E45AF,PinName="bLoopAnimation",PinFriendlyName="Loop Animation",PinToolTip="Loop Animation\\nBoolean\\n\\nShould the animation continue looping when it reaches the end?",PinType.PinCategory="bool",PinType.PinSubCategory="",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsArray=False,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,DefaultValue="True",AutogeneratedDefaultValue="True",LinkedTo=(K2Node_VariableGet_2 9381C28C4F30F5FD0C5A68A7381B6138,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)  
CustomProperties Pin (PinId=049010254D1E4691A221DABB85B83D8A,PinName="Pose",Direction="EGPD_Output",PinType.PinCategory="struct",PinType.PinSubCategory="",PinType.PinSubCategoryObject=ScriptStruct'"/Script/Engine.PoseLink"',PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsArray=False,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,LinkedTo=(AnimGraphNode_ApplyMeshSpaceAdditive_0 E6944886459A7E961A9C3DB02C0D7CC4,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)  
End Object  
Begin Object Class=/Script/BlueprintGraph.K2Node_VariableGet Name="K2Node_VariableGet_2"  
VariableReference=(MemberName="bStateBool",bSelfContext=True)  
NodePosX=-544  
NodePosY=224  
NodeGuid=0273BA7540AEC2775B6F9EB931288F90  
CustomProperties Pin (PinId=9381C28C4F30F5FD0C5A68A7381B6138,PinName="bStateBool",Direction="EGPD_Output",PinType.PinCategory="bool",PinType.PinSubCategory="",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsArray=False,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,DefaultValue="false",AutogeneratedDefaultValue="false",LinkedTo=(AnimGraphNode_SequencePlayer_0 DBD0DAAA49710060F33B60AA668E45AF,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)  
CustomProperties Pin (PinId=5106B68649084F8569A641A85D692898,PinName="self",PinFriendlyName=NSLOCTEXT("K2Node", "Target", "Target"),PinType.PinCategory="object",PinType.PinSubCategory="",PinType.PinSubCategoryObject=Class'"/Script/AnimationSharing.AnimSharingAdditiveInstance"',PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsArray=False,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PersistentGuid=00000000000000000000000000000000,bHidden=True,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)  
End Object  
Begin Object Class=/Script/AnimGraph.AnimGraphNode_CopyPoseFromMesh Name="AnimGraphNode_CopyPoseFromMesh_0"  
ShowPinForProperties(0)=(PropertyName="SourceMeshComponent",PropertyFriendlyName="Source Mesh Component",PropertyTooltip=NSLOCTEXT("UObjectToolTips", "AnimNode_CopyPoseFromMesh:SourceMeshComponent", "This is used by default if it\\'s valid"),CategoryName="Copy",bShowPin=True,bCanToggleVisibility=True)  
ShowPinForProperties(1)=(PropertyName="bUseAttachedParent",PropertyFriendlyName="Use Attached Parent",PropertyTooltip=NSLOCTEXT("UObjectToolTips", "AnimNode_CopyPoseFromMesh:bUseAttachedParent", "If SourceMeshComponent is not valid, and if this is true, it will look for attahced parent as a source"),CategoryName="Copy")  
ShowPinForProperties(2)=(PropertyName="bCopyCurves",PropertyFriendlyName="Copy Curves",PropertyTooltip=NSLOCTEXT("UObjectToolTips", "AnimNode_CopyPoseFromMesh:bCopyCurves", "Copy curves also from SouceMeshComponent.This will copy the curves if this instance also contains"),CategoryName="Copy")  
NodePosX=-384  
NodePosY=32  
NodeGuid=90ADF65345FD2F533071F8B374EE570E  
CustomProperties Pin (PinId=7B3EDF7D4DC4CA4FD772CEAC8A5A5380,PinName="SourceMeshComponent",PinFriendlyName="Source Mesh Component",PinToolTip="Source Mesh Component\\nSkeletal Mesh Component Weak object\\n\\nThis is used by default if it\\'s valid",PinType.PinCategory="object",PinType.PinSubCategory="",PinType.PinSubCategoryObject=Class'"/Script/Engine.SkeletalMeshComponent"',PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsArray=False,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=True,AutogeneratedDefaultValue="None",LinkedTo=(K2Node_VariableGet_0 50C8662E4549FB4C825F12B859F469F4,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)  
CustomProperties Pin (PinId=6475E73042C07EC60F1B00B7275BAE4A,PinName="Pose",Direction="EGPD_Output",PinType.PinCategory="struct",PinType.PinSubCategory="",PinType.PinSubCategoryObject=ScriptStruct'"/Script/Engine.PoseLink"',PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsArray=False,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,LinkedTo=(AnimGraphNode_ApplyMeshSpaceAdditive_0 A6BB6F8444DC735CB13205AD0AEB7AEE,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)  
End Object  
Begin Object Class=/Script/AnimGraph.AnimGraphNode_ApplyMeshSpaceAdditive Name="AnimGraphNode_ApplyMeshSpaceAdditive_0"  
ShowPinForProperties(0)=(PropertyName="Base",PropertyFriendlyName="Base",PropertyTooltip="Base",CategoryName="Links",bShowPin=True)  
ShowPinForProperties(1)=(PropertyName="Additive",PropertyFriendlyName="Additive",PropertyTooltip="Additive",CategoryName="Links",bShowPin=True)  
ShowPinForProperties(2)=(PropertyName="Alpha",PropertyFriendlyName="Alpha",PropertyTooltip="Alpha",CategoryName="Settings",bShowPin=True,bCanToggleVisibility=True)  
ShowPinForProperties(3)=(PropertyName="AlphaScaleBias",PropertyFriendlyName="Alpha Scale Bias",PropertyTooltip="Alpha Scale Bias",CategoryName="Settings")  
ShowPinForProperties(4)=(PropertyName="LODThreshold",PropertyFriendlyName="LOD Threshold",PropertyTooltip=NSLOCTEXT("UObjectToolTips", "AnimNode_ApplyMeshSpaceAdditive:LODThreshold", "* Max LOD that this node is allowed to run\\n* For example if you have LODThreadhold to be 2, it will run until LOD 2 (based on 0 index)\\n* when the component LOD becomes 3, it will stop update/evaluate\\n* currently transition would be issue and that has to be re-visited"),CategoryName="Performance")  
NodePosX=-112  
NodePosY=48  
NodeGuid=D7D1068341115E71D18678828BA52D6E  
CustomProperties Pin (PinId=A6BB6F8444DC735CB13205AD0AEB7AEE,PinName="Base",PinFriendlyName="Base",PinToolTip="Base\\nPose Link Structure\\n\\nBase",PinType.PinCategory="struct",PinType.PinSubCategory="",PinType.PinSubCategoryObject=ScriptStruct'"/Script/Engine.PoseLink"',PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsArray=False,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,DefaultValue="(LinkID=-1,SourceLinkID=-1)",AutogeneratedDefaultValue="(LinkID=-1,SourceLinkID=-1)",LinkedTo=(AnimGraphNode_CopyPoseFromMesh_0 6475E73042C07EC60F1B00B7275BAE4A,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)  
CustomProperties Pin (PinId=E6944886459A7E961A9C3DB02C0D7CC4,PinName="Additive",PinFriendlyName="Additive",PinToolTip="Additive\\nPose Link Structure\\n\\nAdditive",PinType.PinCategory="struct",PinType.PinSubCategory="",PinType.PinSubCategoryObject=ScriptStruct'"/Script/Engine.PoseLink"',PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsArray=False,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,DefaultValue="(LinkID=-1,SourceLinkID=-1)",AutogeneratedDefaultValue="(LinkID=-1,SourceLinkID=-1)",LinkedTo=(AnimGraphNode_SequencePlayer_0 049010254D1E4691A221DABB85B83D8A,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)  
CustomProperties Pin (PinId=8124738645DB8E1DDAEE4BA5B937C6E4,PinName="Alpha",PinFriendlyName="Alpha",PinToolTip="Alpha\\nFloat\\n\\nAlpha",PinType.PinCategory="float",PinType.PinSubCategory="",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsArray=False,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,DefaultValue="1.000000",AutogeneratedDefaultValue="1.000000",PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)  
CustomProperties Pin (PinId=66A1DDE64223F117AA0060AAD022EB98,PinName="Pose",Direction="EGPD_Output",PinType.PinCategory="struct",PinType.PinSubCategory="",PinType.PinSubCategoryObject=ScriptStruct'"/Script/Engine.PoseLink"',PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsArray=False,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,LinkedTo=(AnimGraphNode_Root_0 D28554294AFBA1C3D8B9799438DD3B84,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)  
End Object  

动画共享状态实例

这个动画蓝图(AnimBP)类允许添加AnimBP行为(如果用户愿意这样做的话),因为它在默认情况下公开了两个属性: 要播放的动画(Animation to Play) 置换时间偏移(Permutation Time Offset) 。在一个基本关卡上,这就是驱动姿势的属性。

对于本地实现,它公开 GetInstancedActors ,后者返回当前由该状态驱动的所有AActor。这样一来,在出现通知的情况下,就可以正确地处理通知,并将通知传播到唯一的实例。

这是通过覆盖 HandleNotify 并相应地处理来实现的。

复制节点图表

Begin Object Class=/Script/AnimGraph.AnimGraphNode_Root Name="AnimGraphNode_Root_0"  
ShowPinForProperties(0)=(PropertyName="Result",PropertyFriendlyName="Result",PropertyTooltip="Result",CategoryName="Links",bShowPin=True)  
NodePosX=32  
NodePosY=32  
ErrorType=4  
ErrorMsg="Result was visible but ignored"  
NodeGuid=DE41DB3A41F39C4A62BA7B9077C84BD9  
CustomProperties Pin (PinId=27C7B571443BF030935D8E88B162B83C,PinName="Result",PinFriendlyName="Result",PinToolTip="Result\\nPose Link Structure\\n\\nResult",PinType.PinCategory="struct",PinType.PinSubCategory="",PinType.PinSubCategoryObject=ScriptStruct'"/Script/Engine.PoseLink"',PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsArray=False,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,DefaultValue="(LinkID=-1,SourceLinkID=-1)",AutogeneratedDefaultValue="(LinkID=-1,SourceLinkID=-1)",LinkedTo=(AnimGraphNode_SequencePlayer_0 24D116474E793A938AD4A88A854C06CA,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)  
End Object  
Begin Object Class=/Script/AnimGraph.AnimGraphNode_SequencePlayer Name="AnimGraphNode_SequencePlayer_0"  
ShowPinForProperties(0)=(PropertyName="Sequence",PropertyFriendlyName="Sequence",PropertyTooltip=NSLOCTEXT("UObjectToolTips", "AnimNode_SequencePlayer:Sequence", "The animation sequence asset to play"),CategoryName="Settings",bShowPin=True,bCanToggleVisibility=True)  
ShowPinForProperties(1)=(PropertyName="PlayRateBasis",PropertyFriendlyName="Play Rate Basis",PropertyTooltip=NSLOCTEXT("UObjectToolTips", "AnimNode_SequencePlayer:PlayRateBasis", "The Basis in which the PlayRate is expressed in. This is used to rescale PlayRate inputs.\\nFor example a Basis of 100 means that the PlayRate input will be divided by 100."),CategoryName="Settings",bCanToggleVisibility=True)  
ShowPinForProperties(2)=(PropertyName="PlayRate",PropertyFriendlyName="Play Rate",PropertyTooltip=NSLOCTEXT("UObjectToolTips", "AnimNode_SequencePlayer:PlayRate", "The play rate multiplier.Can be negative, which will cause the animation to play in reverse."),CategoryName="Settings",bShowPin=True,bCanToggleVisibility=True)  
ShowPinForProperties(3)=(PropertyName="PlayRateScaleBiasClamp",PropertyFriendlyName="Play Rate Scale Bias Clamp",PropertyTooltip=NSLOCTEXT("UObjectToolTips", "AnimNode_SequencePlayer:PlayRateScaleBiasClamp", "Additional scaling, offsetting and clamping of PlayRate input.\\nPerformed after PlayRateBasis."),CategoryName="Settings")  
ShowPinForProperties(4)=(PropertyName="StartPosition",PropertyFriendlyName="Start Position",PropertyTooltip=NSLOCTEXT("UObjectToolTips", "AnimNode_SequencePlayer:StartPosition", "The start up position, it only applies when reinitialized\\nif you loop, it will still start from 0.f after finishing the round"),CategoryName="Settings",bShowPin=True,bCanToggleVisibility=True)  
ShowPinForProperties(5)=(PropertyName="bLoopAnimation",PropertyFriendlyName="Loop Animation",PropertyTooltip=NSLOCTEXT("UObjectToolTips", "AnimNode_SequencePlayer:bLoopAnimation", "Should the animation continue looping when it reaches the end?"),CategoryName="Settings",bShowPin=True,bCanToggleVisibility=True)  
ShowPinForProperties(6)=(PropertyName="bIgnoreForRelevancyTest",PropertyFriendlyName="Ignore for Relevancy Test",PropertyTooltip=NSLOCTEXT("UObjectToolTips", "AnimNode_AssetPlayerBase:bIgnoreForRelevancyTest", "If true, \\"Relevant anim\\" nodes that look for the highest weighted animation in a state will ignore\\nthis node"),CategoryName="Relevancy",bCanToggleVisibility=True)  
ShowPinForProperties(7)=(PropertyName="BlendWeight",PropertyFriendlyName="Blend Weight",PropertyTooltip=NSLOCTEXT("UObjectToolTips", "AnimNode_AssetPlayerBase:BlendWeight", "Last encountered blendweight for this node"),CategoryName="DoNotEdit")  
ShowPinForProperties(8)=(PropertyName="InternalTimeAccumulator",PropertyFriendlyName="Internal Time Accumulator",PropertyTooltip=NSLOCTEXT("UObjectToolTips", "AnimNode_AssetPlayerBase:InternalTimeAccumulator", "Accumulated time used to reference the asset in this node"),CategoryName="DoNotEdit")  
NodePosX=-224  
NodePosY=48  
NodeGuid=A850AF6B4C825A179186BB81C98FF3F6  
CustomProperties Pin (PinId=0D8111A54C7DFA2D6B140EA2C7C6E653,PinName="Sequence",PinFriendlyName="Sequence",PinToolTip="Sequence\\nAnim Sequence Base Object Reference\\n\\nThe animation sequence asset to play",PinType.PinCategory="object",PinType.PinSubCategory="",PinType.PinSubCategoryObject=Class'"/Script/Engine.AnimSequenceBase"',PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsArray=False,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,AutogeneratedDefaultValue="None",LinkedTo=(K2Node_VariableGet_0 8AE1B97B4294C41A196264AFBD43A3F7,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)  
CustomProperties Pin (PinId=F5DBF18D40111BA32FFDCC9D403C3887,PinName="PlayRate",PinFriendlyName="Play Rate",PinToolTip="Play Rate\\nFloat\\n\\nThe play rate multiplier.Can be negative, which will cause the animation to play in reverse.",PinType.PinCategory="float",PinType.PinSubCategory="",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsArray=False,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,DefaultValue="1.000000",AutogeneratedDefaultValue="1.000000",PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)  
CustomProperties Pin (PinId=17DE90B14DA26A39C6B2BE83A081C55A,PinName="StartPosition",PinFriendlyName="Start Position",PinToolTip="Start Position\\nFloat\\n\\nThe start up position, it only applies when reinitialized\\nif you loop, it will still start from 0.f after finishing the round",PinType.PinCategory="float",PinType.PinSubCategory="",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsArray=False,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,DefaultValue="0.000000",AutogeneratedDefaultValue="0.000000",LinkedTo=(K2Node_VariableGet_1 2F07F25F42F0FF3B622578AE1C7B613F,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)  
CustomProperties Pin (PinId=E1D6F7D84350F6E3ADDDD89414811B06,PinName="bLoopAnimation",PinFriendlyName="Loop Animation",PinToolTip="Loop Animation\\nBoolean\\n\\nShould the animation continue looping when it reaches the end?",PinType.PinCategory="bool",PinType.PinSubCategory="",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsArray=False,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,DefaultValue="True",AutogeneratedDefaultValue="True",PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)  
CustomProperties Pin (PinId=24D116474E793A938AD4A88A854C06CA,PinName="Pose",Direction="EGPD_Output",PinType.PinCategory="struct",PinType.PinSubCategory="",PinType.PinSubCategoryObject=ScriptStruct'"/Script/Engine.PoseLink"',PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsArray=False,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,LinkedTo=(AnimGraphNode_Root_0 27C7B571443BF030935D8E88B162B83C,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)  
End Object  
Begin Object Class=/Script/BlueprintGraph.K2Node_VariableGet Name="K2Node_VariableGet_0"  
VariableReference=(MemberName="AnimationToPlay",bSelfContext=True)  
NodePosX=-448  
NodePosY=64  
NodeGuid=A08474964A2A101532B19ABE1DAC52F9  
CustomProperties Pin (PinId=8AE1B97B4294C41A196264AFBD43A3F7,PinName="AnimationToPlay",Direction="EGPD_Output",PinType.PinCategory="object",PinType.PinSubCategory="",PinType.PinSubCategoryObject=Class'"/Script/Engine.AnimSequence"',PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsArray=False,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,LinkedTo=(AnimGraphNode_SequencePlayer_0 0D8111A54C7DFA2D6B140EA2C7C6E653,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)  
CustomProperties Pin (PinId=C4FC0774474B4ACF5514B9A36A748B8E,PinName="self",PinFriendlyName=NSLOCTEXT("K2Node", "Target", "Target"),PinType.PinCategory="object",PinType.PinSubCategory="",PinType.PinSubCategoryObject=Class'"/Script/AnimationSharing.AnimSharingStateInstance"',PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsArray=False,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PersistentGuid=00000000000000000000000000000000,bHidden=True,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)  
End Object  
Begin Object Class=/Script/BlueprintGraph.K2Node_VariableGet Name="K2Node_VariableGet_1"  
VariableReference=(MemberName="PermutationTimeOffset",bSelfContext=True)  
NodePosX=-432  
NodePosY=128  
NodeGuid=F6116F504B7758FA4C1B5E83F42D2D2F  
CustomProperties Pin (PinId=2F07F25F42F0FF3B622578AE1C7B613F,PinName="PermutationTimeOffset",Direction="EGPD_Output",PinType.PinCategory="float",PinType.PinSubCategory="",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsArray=False,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,DefaultValue="0.0",AutogeneratedDefaultValue="0.0",LinkedTo=(AnimGraphNode_SequencePlayer_0 17DE90B14DA26A39C6B2BE83A081C55A,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)  
CustomProperties Pin (PinId=3061887F4515A5A621DC74B2F5B2DC62,PinName="self",PinFriendlyName=NSLOCTEXT("K2Node", "Target", "Target"),PinType.PinCategory="object",PinType.PinSubCategory="",PinType.PinSubCategoryObject=Class'"/Script/AnimationSharing.AnimSharingStateInstance"',PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsArray=False,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PersistentGuid=00000000000000000000000000000000,bHidden=True,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)  
End Object  

动画共享管理器

为了在运行时执行动画共享,您需要创建一个指向您的 动画共享设置(Animation Sharing Setup) 资源的 动画共享管理器(Animation Sharing Manager) 。可以使用 创建动画共享管理器(Create Animation Sharing Manager) 函数通过任何Actor内部的蓝图(或从关卡蓝图)调用它。

CreateAnimationSharingManager.png

还可以针对动画共享管理器调用以下函数:

函数

说明

Animation Sharing Enabled

返回是否启用动画共享。

Get Animation Sharing Manager

返回动画共享管理器(如果没有设置,则返回null)。

Register Actor

根据指定的 共享骨架(Sharing Skeleton) 向动画共享管理器注册一个Actor。

在下图中,我们使用 Get Animation Sharing Manager Register Actor 向动画共享管理器注册我们的Husk Actor(我们还启用蓝图中的输入,这样我们就可以通过按键更改动画状态)。

单击图像显示全视图。

欢迎帮助改进虚幻引擎文档!请告诉我们该如何更好地为您服务。
填写问卷调查
取消