Landscape question digging?

Do any of you think it is possible to make the landscape be 3 feet thick so we can dig in to it? been thinking about trying some things but just wondering if it is even possible with out having to completely rewrite landscape.

Take a look at this it is a demo using the free version of the voxel plugin. Although he uses his AutoMaterial that you have to purchase you can try OpenLand AutoMaterial for free. But it is a good example of the landscape you can create with voxel.

sweet will check that out. That is bad ■■■!

I also plan to implement a digging/tunneling mechanic in my game.

My main problem is allowing pawns to pass through the landscape collision. Once I have solved that, I can apply masks in the landscape material opacity to show the holes. Then I will spawn meshes (with collision) around the area the player is tunneling.

What i am after is the vehicle making its own ruts as you drive it. I think i found a solution that will take care this for me. By next week i will know if it works right or not.

Read this on unreal4 should be same in udk unless this is a new feature.

[Landscape Materials | Unreal Engine Documentation](https://)

Creating Landscape Hole Materials

Creating holes in your Landscape is something that you can do in Manage Mode but only by deleting entire Landscape components at a time. To get around this, you can use a Landscape Hole Material to mask out the visibility and collision of a certain location on your Landscape. This is great if you want to make something like an entrance to a cave in the side of a mountain.

You can use the same Material for your Landscape Material and your Landscape Hole Material, but be aware that Materials that use opacity masks are more costly performance-wise, than Materials that do not. This is why you have the option of creating a separate Landscape Hole Material.

Maybe this will help get you going with that problem.

Thanks. Unfortunately the Landscape Visibility Mask material node is not present in UDK. We instead have the “Visibility tool” in the landscape editor tool. However using this breaks the ability to trace physical material on the component that has a hole painted on it.

In addition, it seems you’re not able to use the painted layers (in the landscape material) to plug into the opacity in the material (it just shows as black when viewed on the landscape).

I am getting ready tomorrow to do a ton of landscape and material work. While i’m am at it. I will make a test project in udk. To see if i can accomplish the hole in the landscape and be able to use and paint it. I will let you know when i get done how it all went.

i got it to work but can not for the life of me can i figure out what i did to accomplish it, but it will work.

I did not delete anything. i just made that circled section invisible. Still trying stuff to figure out what i did to get this.

Did you use the “Visibility tool” in the landscape editor (under region tools)? This works, but will break the ability to trace physical materials on the landscape component that you cut the hole (meaning you won’t be able to play correct footstep sounds/effects based on the material layer below).

i just got back, i wlll go test that and see if we lost that ability in that map.

EDIT: Just test the physical material and it is working fine. Still trying to solve what ever it was i did to get this to work.

When i hit the invisiblity tool button the ground around the hole goes away, a huge big chunk. So that was not what i did, i will figure it out let you know. i have the rest of the after noon free to find how i did it.

OK solved it here is a picture of what editor should be set like in the landscape section.

Hold down Ctrl+Shift then left click that little section will reappear. Ctrl+Alt then left click makes it disappear and i lose no physical material settings such as ground foot step sounds.

Are you sure about that? As I have tested this a lot. So if you do a trace on the landscape (on the same component which has the hole), you are detecting the individual physical materials that you have set in your landscape layers?

local vector start, end, hitLoc;
local Actor hitActor;
local LandscapeLayerStruct _layer;

start = GetPawn().GetWeaponStartTraceLocation();//Define start  and end of trace.
end = start + normal(vector(GetPawn().GetBaseAimRotation()))*30000/*Distance*/;

hitActor = GetPawn().Trace(hitLoc, hitNormal, end, start, false,, hitInfo, TRACEFLAG_PhysicsVolumes);

`log("Physical material:"@hitInfo.PhysMaterial);

On all of my tests, even starting a fresh map and just painting one layer on the landscape, as soon as you paint a hole with the visibility tool, all traces on that landscape component will return the “DefaultPhysicalMaterial”.

yes it all works fine. To let you test this go get our game(which is free) and load up the compound map there are 4 cut out holes. Everything in our map works fine. No lose of footstep sounds and on the component i cut the holes into i have more then one texture on that component and all textures are putting out our footstep sounds… No use for me to run the trace. I just run around and i can hear them when i step on them. That is my trace.

This is not related to the tracing of the physical material.
Have you messed with the tessellation setting in the root material?
If you have, i have a few questions on that subject.

Hey james(You know who you are:)) if you read this. You need to contact me about an update on the paintball game.

So you have different painted layers on your landscape, each with their own physical materials, and your code for playing footstep sounds is using the physical material to determine which sounds to play?

Would you mind pasting your tracing code that is checking the physical material?

Also, which version of UDK are you using?


using stock trace code. Let me go find it.

 simulated function ActuallyPlayFootstepSound(int FootDown) 
     local SoundCue FootSound;

    if(bStalker) //stalker skill no footstep sounds 
    FootSound = SoundGroupClass.static.GetFootstepSound(FootDown, GetMaterialBelowFeet());

    if (FootSound != None) 
        PlaySound(FootSound, false, true,,, true); 

 simulated function name GetMaterialBelowFeet() 
      local vector HitLocation, HitNormal; 
      local TraceHitInfo HitInfo; 
      local PBPhysicalMaterialProperty PhysicalProperty; 
      local actor HitActor; 
      local float TraceDist; 
  TraceDist = 1.5 * GetCollisionHeight(); HitActor = Trace(HitLocation, HitNormal, Location - 
  TraceDist*vect(0,0,1), Location, false,, HitInfo, TRACEFLAG_PhysicsVolumes); 

  if ( WaterVolume(HitActor) != None ) 
     return (Location.Z - HitLocation.Z < 0.33*TraceDist) ? 'Water' : 'ShallowWater';

  if (HitInfo.PhysMaterial != None) 
    PhysicalProperty= PBPhysicalMaterialProperty(HitInfo.PhysMaterial.GetPhysicalMaterialProperty(class'PBPhysicalMaterialProperty')); 

      if (PhysicalProperty != None) 
         return PhysicalProperty.MaterialType;
    return ''; 


tessellation question i had, i got answered. It had to be in dx11 to work. Now i just need to generate good height or displacement textures. The blue channel from the normal does not seem to give good results.

Hmmm, I’m on 08-2014. I wonder if something broke in the more recent version.

I’m using the same tracing code.

Regarding tessellation; I still haven’t played much with it as my game is still using dx9. I plan to switch eventually.

HMM, That’s a good question. Very Possible.

Your assigning your physical materials in the landscape editor layer section right?

When you made the physical materials at the bottom of each physical material the physical materials property are those each different for each of the physical material as in the _# ?

If all that is ok, i would say maybe your version had a changed from one i’m running.

Question: Is this happening in 1p or 3p or both when it happens?

Yes, the physical materials are set in the landscape tool (under each layer when in edit mode).

1st/3rd person doesn’t really matter, as it’s the traces that fail to return the physical material. Maybe I will test version 02-2014 to see if it works in that version.

If your out of ideas. Yeah i think i would try that also.

Ok, I just installed UDK 02-2014 (totally fresh install) on one of my test machines. It still has the issue.

I just ran the normal UT game mode, and added this to GetMaterialBelowFeet() in UTPawn (after the trace):

Worldinfo.Game.Broadcast(self, "PhysMat:"@HitInfo.PhysMaterial);

I created an empty landscape with two layers (dirt and metal), added physical materials for each layer.

When running around, it prints the expected: “PhysMat: PM_Dirt”, “PhysMat: PM_Metal”.

Then I use the visibility tool on the landscape to cut a hole, and after it just prints: “PhysMat: DefaultPhysicalMaterial”.

So 02-2014 has the same bug.

Can you try adding that one line to your GetMaterialBelowFeet() and see what it prints when you’re walking on your landscape (making sure you’re not walking on other geometry)?