Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: Multiple Objects Using One Shadow Map?

  1. #11
    SynaGl0w
    Guest
    Quote Originally Posted by ffejnosliw View Post
    You have to play the map and type DumpDynamicShadowStats into the console. Then the tab will be filled with the stats for your map. If you make changes, you will have to perform the process again to update the stats.
    Okay thanks for the info! Always wondered why it was blank...

  2. #12
    DGUnreal
    Guest
    Quote Originally Posted by SynaGl0w View Post
    Yes they are all rotating independently from each other ...

    When I attached them in the editor to the skeletal mesh so they shared the shadow map, I could still move them around and the shadow map looks correct no matter how I move them, or rotate them.

    Basically when all of them share a shadow map, less memory is being used ...

    It looks like I may have to build a mesh with bones for each InterpActor and then manipulate the bones instead of the InterpActors.

    On a side note, what is the purpose of the Dynamic Shadow Stats tab ...
    OK, I wasn't sure if they were moving relative to each other, or away and back, etc.

    Since I am still in the dark (pun intended) about the object's intended use and other map settings, I doubt that memory would be an issue unless this object is massive above the play field.
    However, if you are using ShadowVolumes you will have sharper edges (dynamic lights on dynamic geometry), whereas ShadowBuffer will give softer edges (static lights on dynamic geometry).

    Unless this object has a very important role in the map, creating mesh actors and bones seems like a lot of extra work. That's your call though.

    As ffej already mentioned, you have to dump the dynamic light info from in the PIE. The results will then show the various light actors, shadow parents, shadow types (volume or buffer), etc.

  3. #13
    SynaGl0w
    Guest
    Well thanks for the help. I seem to have been able to figure most of it out. For right now I will not worry about it too much as I decided to move one of the "islands" that these were casting shadows on. Right now I have bigger things to worry about in my map.

  4. #14
    mrseth
    Guest
    I have the same issue of overlaping shadows with the pawn and a custom weapon that I made. I tried using bParentedShadow with no effect.

    Code:
    class MyPawn extends UTPawn;
    
    simulated function PostBeginPlay()
    {
    	super.PostBeginPlay();
    	SetThirdPersonCamera(true);
    }
    
    function Hidden(bool hide)
    {
    	Mesh.SetHidden(hide);
    
    	if(Weapon!=none)
    	{
    		Weapon.SetHidden(hide);
    	}
    }
    
    simulated function FaceRotation(rotator NewRotation, float DeltaTime)
    {    
    	if (Normal(Acceleration)!=vect(0,0,0))
        {
    		if ( Physics == PHYS_Ladder )
    		{
    			NewRotation = OnLadder.Walldir;
    		}
    		else if ( (Physics == PHYS_Walking) || (Physics == PHYS_Falling) )
    		{
    			NewRotation.Pitch = 0;
    		}
    		NewRotation.Roll = Rotation.Roll;
    
    		if (NewRotation != Rotation)
    		{
    			//faz uma interpolação maluca que da oque possui, aonde quer chegar, o tempo e a velocidade. oque importa é que roda da maneira certa.
        		NewRotation = RInterpTo(Rotation,NewRotation,DeltaTime,10);
    		}
    		SetRotation(NewRotation);
    	}
    	
    	Owner.SetLocation(Location);
    }
    
    DefaultProperties
    {
    	//relevante<
    
    	Begin Object Name=WPawnSkeletalMeshComponent
    		SkeletalMesh=SkeletalMesh'CH_IronGuard_Male.Mesh.SK_CH_IronGuard_MaleA'
    		AnimSets(0)=AnimSet'CH_AnimHuman.Anims.K_AnimHuman_BaseMale'
    		AnimTreeTemplate=AnimTree'CH_AnimHuman_Tree.AT_CH_Human'
    	bCastHiddenShadow=true
    	End Object
    
    	bWeaponAttachmentVisible = FALSE
    
    	//relevante>
    }
    Code:
     class MySword extends UTWeapon;
    
    simulated function SetPosition(UDKPawn Holder)
    {
    	local Vector socketPosition;
    	local Rotator socketRotation;
    	
    	super.SetPosition(Holder);
    
    	 Holder.mesh.GetSocketWorldLocationAndRotation('WeaponPoint',socketPosition,socketRotation,0);
    
    
    
    	SetLocation(socketPosition);
    	SetRotation(socketRotation);
    }
    
    DefaultProperties
    {
    	Begin Object Class=AnimNodeSequence Name=MeshSequenceA
            
        End Object
    
    	Begin Object name=FirstPersonMesh
    		DepthPriorityGroup=SDPG_World
    		bCastHiddenShadow=true
    		SkeletalMesh=SkeletalMesh'MyWeapons.MySword'
    		AnimSets(0)=AnimSet'MyWeapons.Mesh_006'
    		Animations=MeshSequenceA
    
    		CollideActors=false
    		AlwaysLoadOnClient=true
    		AlwaysLoadOnServer=true
    		
    		bUpdateSkelWhenNotRendered=false
    		bIgnoreControllersWhenNotRendered=true
    		bOverrideAttachmentOwnerVisibility=true
    		bAcceptsDynamicDecals=FALSE
    		Rotation=(Pitch=5000,Yaw=0,Roll=4000)
    		Translation=(x=0,y=10,z=10)
    
    	End Object
    	bShadowParented=true;
    	begin object name=PickupMesh
    		SkeletalMesh=SkeletalMesh'MyWeapons.MySword'
    		Translation=(x=0,y=0,z=20)
    		Scale =1.5
    	end object
    
    	AttachmentClass=class'MySwordAttachment'
    	WeaponFireTypes(0)=EWFT_InstantHit
    	WeaponFireTypes(1)=EWFT_None
    
    	InstantHitDamage(0)=50
    
    	ShotCost(0)=0
    
    	AmmoCount=1
    	MaxAmmoCount=1
    
    	WeaponFireAnim(0)=sword
    
    	MuzzleFlashSocket=MF
    
    	WeaponRange=50
    }
    Code:
     class MyController extends UDKPlayerController;
    
    
    simulated function PostBeginPlay()
    {
    	super.PostBeginPlay();
    	
    	`log("post controller");
    }
    
    exec function Use()
    {
    	local vector hitLoc, start, norm, end;
    	local Rotator POVrot;
    	local TraceHitInfo hitInfo;
    	local Actor traceHit;
    	
    	GetPlayerViewPoint(start,POVrot);
    
    	end = start + vector(POVrot)* 600; 
    	
    	traceHit = trace(hitLoc, norm, end, start, true,, hitInfo,TRACEFLAG_Blocking);
    	
    	Spawn(class'PhysicsItem',,,end,,,);
    
    	
    	if (traceHit != none) 
    	{
    		if(traceHit.Class == class 'PhysicsItem')
    		{
    			`log("meu item");
    
    			PhysicsItem(traceHit).Action();
    		}
    		else
    		{
    			`log("Hit: "$traceHit$"  class: "$traceHit.class.outer.name$"."$traceHit.class);
     			`log("Location: "$hitLoc.X$","$hitLoc.Y$","$hitLoc.Z);
     			`log("Material: "$hitInfo.Material$"  PhysMaterial: "$hitInfo.PhysMaterial);
    			`log("Component: "$hitInfo.HitComponent);
    		}
    	}
    }
    
    DefaultProperties
    {
    	CameraClass=class'MyCameraSetup'//relevante
    }
    Code:
     class MySwordAttachment extends UTWeaponAttachment;
    
    DefaultProperties
    {
    	Begin Object Name=SkeletalMeshComponent0
    		SkeletalMesh=SkeletalMesh'GDC_Materials.Meshes.SK_ExportSword2'
    		
    	end object
    bShadowParented=true
    	BaseBoneName=WeaponPoint
    	WeaponClass=class'MySword'
    	MuzzleFlashSocket=MF
    }

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •