UDN
Search public documentation:
DevelopmentKitGemsCreatingAModularPawnJP
English Translation
中国翻译
한국어
Interested in the Unreal Engine?
Visit the Unreal Technology site.
Looking for jobs and company info?
Check out the Epic games site.
Questions about support via UDN?
Contact the UDN Staff
中国翻译
한국어
Interested in the Unreal Engine?
Visit the Unreal Technology site.
Looking for jobs and company info?
Check out the Epic games site.
Questions about support via UDN?
Contact the UDN Staff
Unreal Development Kit ホーム > Unreal Development Kit Gems > モジュラーポーンの作成方法
モジュラーポーンの作成方法
2011年3月に UDK について最終テスト実施済み
PC および iOS 対応
概要
![ModularPawnTitle.jpg](rsrc/Three/DevelopmentKitGemsCreatingAModularPawn/ModularPawnTitle.jpg)
メソッド
- アクタ単位の複数の骨格メッシュコンポーネント - この方法は、実行時に骨格メッシュを変更することが可能であるため、最も柔軟です。ただし、パフォーマンスに影響します。骨格メッシュアクタがそれぞれ余分な描画コールとなるためです。
- メッシュの合成 (ライセンシー限定) - この方法は、メッシュを合成することによって、複数のメッシュから単一のメッシュを生成します。本資料ではこの方法について説明しません。
関連テーマ
モジュラーポーンをスクリプト処理する
class ModularPawn extends UTPawn Placeable; // Skeletal mesh which represents the head. Parent skeletal mesh component. var(ModularPawn) const SkeletalMeshComponent HeadSkeletalMesh; // Skeletal mesh which represents the torso. Child to the head skeletal mesh component. var(ModularPawn) const SkeletalMeshComponent TorsoSkeletalMesh; // Skeletal mesh which represents the arms. Child to the head skeletal mesh component. var(ModularPawn) const SkeletalMeshComponent ArmsSkeletalMesh; // Skeletal mesh which represents the thighs. Child to the head skeletal mesh component. var(ModularPawn) const SkeletalMeshComponent ThighsSkeletalMesh; // Skeletal mesh which represents the boots. Child to the head skeletal mesh component. var(ModularPawn) const SkeletalMeshComponent BootsSkeletalMesh; // Skeletal mesh which represents the left shoulder pad. Child to the head skeletal mesh component. var(ModularPawn) const SkeletalMeshComponent LeftShoulderPadSkeletalMesh; // Skeletal mesh which represents the right shoulder pad. Child to the head skeletal mesh component. var(ModularPawn) const SkeletalMeshComponent RightShoulderPadSkeletalMesh; defaultproperties { // Remove UTPawn's defined skeletal mesh Components.Remove(WPawnSkeletalMeshComponent) // Create the animation sequence Begin Object class=AnimNodeSequence Name=AnimNodeSequence End Object // Create the head skeletal mesh component Begin Object Class=SkeletalMeshComponent Name=HeadSkeletalMeshComponent bCacheAnimSequenceNodes=false AlwaysLoadOnClient=true AlwaysLoadOnServer=true bOwnerNoSee=true CastShadow=true BlockRigidBody=true bUpdateSkelWhenNotRendered=false bIgnoreControllersWhenNotRendered=true bUpdateKinematicBonesFromAnimation=true bCastDynamicShadow=true RBChannel=RBCC_Untitled3 RBCollideWithChannels=(Untitled3=true) LightEnvironment=MyLightEnvironment bOverrideAttachmentOwnerVisibility=true bAcceptsDynamicDecals=false AnimTreeTemplate=AnimTree'CH_AnimHuman_Tree.AT_CH_Human' bHasPhysicsAssetInstance=true TickGroup=TG_PreAsyncWork MinDistFactorForKinematicUpdate=0.2 bChartDistanceFactor=true RBDominanceGroup=20 MotionBlurScale=0.0 bUseOnePassLightingOnTranslucency=true bPerBoneMotionBlur=true // Set the animation node sequence so we can test the animation Animations=AnimNodeSequence End Object HeadSkeletalMesh=HeadSkeletalMeshComponent Components.Add(HeadSkeletalMeshComponent) // Create the torso skeletal mesh component Begin Object Class=SkeletalMeshComponent Name=TorsoSkeletalMeshComponent bCacheAnimSequenceNodes=false AlwaysLoadOnClient=true AlwaysLoadOnServer=true bOwnerNoSee=true CastShadow=true BlockRigidBody=true bUpdateSkelWhenNotRendered=false bIgnoreControllersWhenNotRendered=true bUpdateKinematicBonesFromAnimation=true bCastDynamicShadow=true RBChannel=RBCC_Untitled3 RBCollideWithChannels=(Untitled3=true) LightEnvironment=MyLightEnvironment bOverrideAttachmentOwnerVisibility=true bAcceptsDynamicDecals=false bHasPhysicsAssetInstance=true TickGroup=TG_PreAsyncWork MinDistFactorForKinematicUpdate=0.2 bChartDistanceFactor=true RBDominanceGroup=20 MotionBlurScale=0.0 bUseOnePassLightingOnTranslucency=true bPerBoneMotionBlur=true // Assign the parent animation component to the head skeletal mesh component. This ensures that // the pawn animates as if it was one skeletal mesh component. ParentAnimComponent=HeadSkeletalMeshComponent // Assign the shadow parent component to the head skeletal mesh component. This is used to speed up // the rendering of the shadow for this pawn and to prevent shadow overlaps from occur. ShadowParent=HeadSkeletalMeshComponent End Object TorsoSkeletalMesh=TorsoSkeletalMeshComponent Components.Add(TorsoSkeletalMeshComponent) // Create the arms skeletal mesh component Begin Object Class=SkeletalMeshComponent Name=ArmsSkeletalMeshComponent bCacheAnimSequenceNodes=false AlwaysLoadOnClient=true AlwaysLoadOnServer=true bOwnerNoSee=true CastShadow=true BlockRigidBody=true bUpdateSkelWhenNotRendered=false bIgnoreControllersWhenNotRendered=true bUpdateKinematicBonesFromAnimation=true bCastDynamicShadow=true RBChannel=RBCC_Untitled3 RBCollideWithChannels=(Untitled3=true) LightEnvironment=MyLightEnvironment bOverrideAttachmentOwnerVisibility=true bAcceptsDynamicDecals=false bHasPhysicsAssetInstance=true TickGroup=TG_PreAsyncWork MinDistFactorForKinematicUpdate=0.2 bChartDistanceFactor=true RBDominanceGroup=20 MotionBlurScale=0.0 bUseOnePassLightingOnTranslucency=true bPerBoneMotionBlur=true // Assign the parent animation component to the head skeletal mesh component. This ensures that // the pawn animates as if it was one skeletal mesh component. ParentAnimComponent=HeadSkeletalMeshComponent // Assign the shadow parent component to the head skeletal mesh component. This is used to speed up // the rendering of the shadow for this pawn and to prevent shadow overlaps from occur. ShadowParent=HeadSkeletalMeshComponent End Object ArmsSkeletalMesh=ArmsSkeletalMeshComponent Components.Add(ArmsSkeletalMeshComponent) // Create the thighs skeletal mesh component Begin Object Class=SkeletalMeshComponent Name=ThighsSkeletalMeshComponent bCacheAnimSequenceNodes=false AlwaysLoadOnClient=true AlwaysLoadOnServer=true bOwnerNoSee=true CastShadow=true BlockRigidBody=true bUpdateSkelWhenNotRendered=false bIgnoreControllersWhenNotRendered=true bUpdateKinematicBonesFromAnimation=true bCastDynamicShadow=true RBChannel=RBCC_Untitled3 RBCollideWithChannels=(Untitled3=true) LightEnvironment=MyLightEnvironment bOverrideAttachmentOwnerVisibility=true bAcceptsDynamicDecals=false bHasPhysicsAssetInstance=true TickGroup=TG_PreAsyncWork MinDistFactorForKinematicUpdate=0.2 bChartDistanceFactor=true RBDominanceGroup=20 MotionBlurScale=0.0 bUseOnePassLightingOnTranslucency=true bPerBoneMotionBlur=true // Assign the parent animation component to the head skeletal mesh component. This ensures that // the pawn animates as if it was one skeletal mesh component. ParentAnimComponent=HeadSkeletalMeshComponent // Assign the shadow parent component to the head skeletal mesh component. This is used to speed up // the rendering of the shadow for this pawn and to prevent shadow overlaps from occur. ShadowParent=HeadSkeletalMeshComponent End Object ThighsSkeletalMesh=ThighsSkeletalMeshComponent Components.Add(ThighsSkeletalMeshComponent) // Create the boots skeletal mesh component Begin Object Class=SkeletalMeshComponent Name=BootsSkeletalMeshComponent bCacheAnimSequenceNodes=false AlwaysLoadOnClient=true AlwaysLoadOnServer=true bOwnerNoSee=true CastShadow=true BlockRigidBody=true bUpdateSkelWhenNotRendered=false bIgnoreControllersWhenNotRendered=true bUpdateKinematicBonesFromAnimation=true bCastDynamicShadow=true RBChannel=RBCC_Untitled3 RBCollideWithChannels=(Untitled3=true) LightEnvironment=MyLightEnvironment bOverrideAttachmentOwnerVisibility=true bAcceptsDynamicDecals=false bHasPhysicsAssetInstance=true TickGroup=TG_PreAsyncWork MinDistFactorForKinematicUpdate=0.2 bChartDistanceFactor=true RBDominanceGroup=20 MotionBlurScale=0.0 bUseOnePassLightingOnTranslucency=true bPerBoneMotionBlur=true // Assign the parent animation component to the head skeletal mesh component. This ensures that // the pawn animates as if it was one skeletal mesh component. ParentAnimComponent=HeadSkeletalMeshComponent // Assign the shadow parent component to the head skeletal mesh component. This is used to speed up // the rendering of the shadow for this pawn and to prevent shadow overlaps from occur. ShadowParent=HeadSkeletalMeshComponent End Object BootsSkeletalMesh=BootsSkeletalMeshComponent Components.Add(BootsSkeletalMeshComponent) // Create the left shoulder pad skeletal mesh component Begin Object Class=SkeletalMeshComponent Name=LeftShouldPadSkeletalMeshComponent bCacheAnimSequenceNodes=false AlwaysLoadOnClient=true AlwaysLoadOnServer=true bOwnerNoSee=true CastShadow=true BlockRigidBody=true bUpdateSkelWhenNotRendered=false bIgnoreControllersWhenNotRendered=true bUpdateKinematicBonesFromAnimation=true bCastDynamicShadow=true RBChannel=RBCC_Untitled3 RBCollideWithChannels=(Untitled3=true) LightEnvironment=MyLightEnvironment bOverrideAttachmentOwnerVisibility=true bAcceptsDynamicDecals=false bHasPhysicsAssetInstance=true TickGroup=TG_PreAsyncWork MinDistFactorForKinematicUpdate=0.2 bChartDistanceFactor=true RBDominanceGroup=20 MotionBlurScale=0.0 bUseOnePassLightingOnTranslucency=true bPerBoneMotionBlur=true // Assign the parent animation component to the head skeletal mesh component. This ensures that // the pawn animates as if it was one skeletal mesh component. ParentAnimComponent=HeadSkeletalMeshComponent // Assign the shadow parent component to the head skeletal mesh component. This is used to speed up // the rendering of the shadow for this pawn and to prevent shadow overlaps from occur. ShadowParent=HeadSkeletalMeshComponent End Object LeftShoulderPadSkeletalMesh=LeftShouldPadSkeletalMeshComponent Components.Add(LeftShouldPadSkeletalMeshComponent) // Create the right shoulder pad skeletal mesh component Begin Object Class=SkeletalMeshComponent Name=RightShoulderPadSkeletalMeshComponent bCacheAnimSequenceNodes=false AlwaysLoadOnClient=true AlwaysLoadOnServer=true bOwnerNoSee=true CastShadow=true BlockRigidBody=true bUpdateSkelWhenNotRendered=false bIgnoreControllersWhenNotRendered=true bUpdateKinematicBonesFromAnimation=true bCastDynamicShadow=true RBChannel=RBCC_Untitled3 RBCollideWithChannels=(Untitled3=true) LightEnvironment=MyLightEnvironment bOverrideAttachmentOwnerVisibility=true bAcceptsDynamicDecals=false bHasPhysicsAssetInstance=true TickGroup=TG_PreAsyncWork MinDistFactorForKinematicUpdate=0.2 bChartDistanceFactor=true RBDominanceGroup=20 MotionBlurScale=0.0 bUseOnePassLightingOnTranslucency=true bPerBoneMotionBlur=true // Assign the parent animation component to the head skeletal mesh component. This ensures that // the pawn animates as if it was one skeletal mesh component. ParentAnimComponent=HeadSkeletalMeshComponent // Assign the shadow parent component to the head skeletal mesh component. This is used to speed up // the rendering of the shadow for this pawn and to prevent shadow overlaps from occur. ShadowParent=HeadSkeletalMeshComponent End Object RightShoulderPadSkeletalMesh=RightShoulderPadSkeletalMeshComponent Components.Add(RightShoulderPadSkeletalMeshComponent) }
注意
上記のクラスでは、Anim Node Sequence (アニメーション ノード シーケンス) が定義されることによって、アニメーションをテストできるようになっています。これによって、アニメーションツリーが通常のようには働かなくなり、Anim Node Sequence (アニメーション ノード シーケンス) がクラススクリプトまたはオブジェクト (アーキタイプ内の) から取り除かれることによって、アニメーションツリーが再び機能するようになります。関連テーマ
モジュラーポーンのプロパティ
![ModularPawnProperties.jpg](rsrc/Three/DevelopmentKitGemsCreatingAModularPawn/ModularPawnProperties.jpg)
![ModularPawnSettingProperties_A.jpg](rsrc/Three/DevelopmentKitGemsCreatingAModularPawn/ModularPawnSettingProperties_A.jpg)
![ModularPawnSetSkeletalMeshes.jpg](rsrc/Three/DevelopmentKitGemsCreatingAModularPawn/ModularPawnSetSkeletalMeshes.jpg)
![ModularPawnSettingAnimationProperties.jpg](rsrc/Three/DevelopmentKitGemsCreatingAModularPawn/ModularPawnSettingAnimationProperties.jpg)
![ModularPawnSettingPrimitiveComponentProperties.jpg](rsrc/Three/DevelopmentKitGemsCreatingAModularPawn/ModularPawnSettingPrimitiveComponentProperties.jpg)
関連テーマ
Unreal AnimSet エディタ
![ModularPawnSettingTheExtraMeshInAnimSet.jpg](rsrc/Three/DevelopmentKitGemsCreatingAModularPawn/ModularPawnSettingTheExtraMeshInAnimSet.jpg)
![ModularPawnPlayAnAnimationToTest.jpg](rsrc/Three/DevelopmentKitGemsCreatingAModularPawn/ModularPawnPlayAnAnimationToTest.jpg)