Announcement

Collapse
No announcement yet.

CLoth Problem, not propperly scaled

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    CLoth Problem, not propperly scaled

    Hey all.

    i ran into a weird problem with the Physics Cloth.

    Here is what im trying to do.
    i have one playable character, for testing and stuff, She is moduller and consist of 3 "body part" on body skeletal mesh, one corset/top Skeletal mesh and a coat. the body skeletal mesh is the parent to the to other, meaning they get the animation and shadow and size scale from the body skeletal mesh.

    i made the Meshes in blender 2.60, so thay had to be scaled op about 5.075 to fit the world i am building.
    so far all is good
    then i followed this tutorial to get it too act like cloth
    http://udn.epicgames.com/Three/PhysXClothReference.html
    and added this line to the pawn
    Code:
    simulated event PostBeginPlay()
    {
      super.PostBeginPlay();
    
      CoatSkeletalMesh.SetEnableClothSimulation(true);
    }
    and runs the game, it compiles perfectly and everything works the cloth start to wigle in the wind, but
    the lower part of the coat (the one that is assingd to the coth bone do not get the size scale.
    i know this is the problem because the rest (that is not asing to be cloth) got proppler scaling and fits the body mesh.


    okay and for then that want a photo here it is
    here is the game as it is naw with the un propper coat size
    Click image for larger version

Name:	coat_bug1_by_hellsing80h-d4s0f1i.jpg
Views:	1
Size:	67.8 KB
ID:	3252362
    and here is the size it shud be
    Click image for larger version

Name:	coat_bug_by_hellsing80h-d4s0et9.jpg
Views:	1
Size:	35.5 KB
ID:	3252363

    and the code for the pawn

    Code:
    class DAPawn extends UDKPawn;
    
    
    var(DAPawn) const SkeletalMeshComponent BodySkeletalMesh;
    
    // Skeletal mesh which represents the right Coat. Child to the Body skeletal mesh component.
    var(DAPawn) const SkeletalMeshComponent CoatSkeletalMesh;
    
    // Skeletal mesh which represents the right Corset. Child to the Body skeletal mesh component.
    var(DAPawn) const SkeletalMeshComponent CorsetSkeletalMesh;
    
    var(DAPawn) const DynamicLightEnvironmentComponent MyLightEnvironment;
    
    simulated event PostBeginPlay()
    {
      super.PostBeginPlay();
    
      //CoatSkeletalMesh.SetEnableClothSimulation(true);
    }
    
    
    
    function AddDefaultInventory()
    {
       //InvManager.CreateInventory(class'DemAreana.DAWeap_Jackal_Longslide'); //InvManager is the pawn's InventoryManager
    	InvManager.CreateInventory(class'DemAreana.DAWeap_Jackal_Longslide_R'); //InvManager is the pawn's InventoryManager
    }
    
    defaultproperties
    {
    	WalkingPct=+0.4
    	CrouchedPct=+0.4
    	BaseEyeHeight=38.0
    	EyeHeight=38.0
    	GroundSpeed=200.0
    	AirSpeed=440.0
    	WaterSpeed=220.0
    	AccelRate=2048.0
    	JumpZ=322.0
    	CrouchHeight=29.0
    	CrouchRadius=21.0
    	WalkableFloorZ=0.78
    
        InventoryManagerClass=class'DemAreana.DAInventoryManager'
    
    	Begin Object Class=DynamicLightEnvironmentComponent Name=MyLightEnvironment
    		bSynthesizeSHLight=TRUE
    		bIsCharacterLightEnvironment=TRUE
    		bUseBooleanEnvironmentShadowing=FALSE
    	End Object
    	Components.Add(MyLightEnvironment)
    
    	Begin Object Class=SkeletalMeshComponent Name=BodySkeletalMesh
    		SkeletalMesh=SkeletalMesh'Playable_Characters.Claire_Montreal.Body_Mesh'
    		AnimTreeTemplate=AnimTree'Playable_Characters.Assets.Female_AnimeTree'
    		//PhysicsAsset=PhysicsAsset'CH_AnimCorrupt.Mesh.SK_CH_Corrupt_Male_Physics'
    		AnimSets(0)=AnimSet'Playable_Characters.Assets.Female_Anim'
    		//Translation=(Z=8.0)
    		BlockRigidBody=true
    		bUpdateSkelWhenNotRendered=false
        	bIgnoreControllersWhenNotRendered=true
    		bUpdateKinematicBonesFromAnimation=true
    		bCastDynamicShadow=true
    		Scale=5.075
    		bCacheAnimSequenceNodes=FALSE
    		AlwaysLoadOnClient=true
    		AlwaysLoadOnServer=true
    		bOwnerNoSee=false
    		CastShadow=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
    		bUseOnePassLightingOnTranslucency=TRUE
    		bPerBoneMotionBlur=true
    	End Object
       	Mesh=BodySkeletalMesh
    	Components.Add(BodySkeletalMesh)
    
    	Begin Object Class=SkeletalMeshComponent Name=CoatSkeletalMesh
    		SkeletalMesh=SkeletalMesh'Playable_Characters.Claire_Montreal.Coat_Mesh'
    		//AnimTreeTemplate=AnimTree'Playable_Characters.Assets.Female_AnimeTree'
    		//PhysicsAsset=PhysicsAsset'CH_AnimCorrupt.Mesh.SK_CH_Corrupt_Male_Physics'
    		//AnimSets(0)=AnimSet'Playable_Characters.Assets.Female_Anim'
    		//Translation=(Z=8.0)
    		BlockRigidBody=true
    		bUpdateSkelWhenNotRendered=false
        	bIgnoreControllersWhenNotRendered=true
    		bUpdateKinematicBonesFromAnimation=true
    		bCastDynamicShadow=true
    		//Scale=5.075
    		//ClothImpulseScale= 5.075
    		bClothAwakeOnStartup=true
    		bCacheAnimSequenceNodes=FALSE
    		AlwaysLoadOnClient=true
    		AlwaysLoadOnServer=true
    		bOwnerNoSee=false
    		CastShadow=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
    		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=BodySkeletalMesh
    		// 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=BodySkeletalMesh
    	End Object
    
    	CoatSkeletalMesh=CoatSkeletalMesh
    	Components.Add(CoatSkeletalMesh)
    
    	Begin Object Class=SkeletalMeshComponent Name=CorsetSkeletalMesh
    		SkeletalMesh=SkeletalMesh'Playable_Characters.Claire_Montreal.Corset_1_Mesh'
    		//AnimTreeTemplate=AnimTree'Playable_Characters.Assets.Female_AnimeTree'
    		//PhysicsAsset=PhysicsAsset'CH_AnimCorrupt.Mesh.SK_CH_Corrupt_Male_Physics'
    		//AnimSets(0)=AnimSet'Playable_Characters.Assets.Female_Anim'
    		//Translation=(Z=8.0)
    		BlockRigidBody=true
    		bUpdateSkelWhenNotRendered=false
        	bIgnoreControllersWhenNotRendered=true
    		bUpdateKinematicBonesFromAnimation=true
    		bCastDynamicShadow=true
    		//Scale=5.075
    		bCacheAnimSequenceNodes=FALSE
    		AlwaysLoadOnClient=true
    		AlwaysLoadOnServer=true
    		bOwnerNoSee=false
    		CastShadow=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
    		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=BodySkeletalMesh
    		// 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=BodySkeletalMesh
    	End Object
    	CorsetSkeletalMesh=CorsetSkeletalMesh
    	Components.Add(CorsetSkeletalMesh)
    
    	Begin Object Name=CollisionCylinder
    		CollisionRadius=+0021.000000
    		CollisionHeight=+0019.000000
    	End Object
    
    	CylinderComponent=CollisionCylinder
    }
    this is all the info i have

    do eny one know what im doing wrong ?

    ps before you ask, jes i did google it and made a though search on the forum

    Pleace help me out.

    #2
    bet you whant me to add some pictures to, before you guys whant to help me out ?

    Comment


      #3
      added some pics

      Comment


        #4
        well i fixed it my self... messege me if you want to know how

        Comment

        Working...
        X