Default physical material BUG on landscape patches

We’re raycasting to get physical material information from the landscape, but we always end up getting a default value from the Hit result of the raycast in both C++ and Blueprint.

We can fix the problem one landscape.patch at the time if we click the landscape patch with its paint tool.

I’ll upload a simple video to show you the problem.

Hi ,

Does this occur on a blank project with no additional content or is it limited to one project? Additionally, which version of the editor are you using?

We’re using 4.7.0 and yes, the problem is still happening on a blank project.

Here the videowww…com/watch?v=lWORiOpgI8Y&feature=youtu.be

Sorry for the low resolution, but you can notice the default value changing after I click on the landscape with the landscape paint tool.

We really need this fixed otherwise we can’t spawn our environment.

Hi ,

I just wanted to let you know that we are still looking into this. I will post back as soon as I have additional information. Thank you for your continued patience.

Thank you, we’ll wait.

What values did you use in your physical material? Can you show me a screenshot of how your phys mat is set up?

Let me know if you need something else.

I’ve found something interesting, if you use the console command “RecreateLandscapeCollision” all physics layers will return default.

Hi ,

I was able to reproduce this and have entered a bug report, UE-11421 to be assessed by the development staff.

This bug was fixed in the main branch on April 1st, and the fix should be included in 4.8.

Thanks!

We tried the master branch version and the problem isn’t fixed.
The layer has a physical material but when we play the landscape always has a default one. The only way to fix it is to paint everything again.

The console command “RecreateLandscapeCollision” will set all physical materials to default.

Hi ,

I just tested internally and it does seem to be working on our end. To test:

  1. create a new project with a third person character.

  2. Add a single line trace by channel after any event in character blueprint. Set this to draw a debug line from your player to the ground (I chose 5000 units, to be safe).

  3. Break the hit result and print the phys material to a string.

  4. Compile, save, close blueprint

  5. Create new physical material

  6. Create new material (add whatever you want in it)

  7. apply material to landscape

  8. In the details pane after selecting the landscape, make sure to change
    “Default Phys Material” to your physical material.

  9. PIE, run your trace.

This should return the value of your physical material. I did notice that physical materials directly tied to normal materials are not picked up, but this Default Phys Material located directly in the Landscape Details Pane does. Please try this and see if it works for you.

hi, i have the same problem with 4.8.1
it always returns the default material…

Hi ,

What steps are you taking to reproduce this on your end? Did you follow the repro steps I listed above?

Hi We are also facing the same problem ,
Assigned physical material to landscape layers everything works fine as expected its reading different physical material. Close UE4 reopen every thing is set to default except the first layer

Hi devilhiyan,

Did you follow the steps listed above?

Check Generate Overlap Events

Thank you good sir! I tried all the steps above and this was the only one that worked for me.

Hi All,

This thread is pretty old now, but I wanted to chime in and just share a bit more information on it in case anybody is still stuck. :slight_smile:

suggests ticking “Generate Overlap Events” which does work, but not consistently, due to a quirk in the editor. So below are ’ steps again, but with some more info afterwards to highlight this quirk and hopefully help with a workaround.


's Steps:

1. Create a new project with a third person character.

2. List item

3. Add a single line trace by channel after any event in character blueprint. Set this to draw a debug line from your player to the ground (I
chose 5000 units, to be safe).

4. Break the hit result and print the phys material to a string.

5. Compile, save, close blueprint

6. Create new physical material

7. Create new material (add whatever you want in it)

8. Apply material to landscape

9. List item

10. In the details pane after selecting the landscape, make sure to change “Default Phys Material” to your physical material.

11. PIE, run your trace.


My findings have been that after following these steps, the trace was still showing “DefaultPhysicalMaterial”.

I found if I then ticked “Generate Overlap Events” (thanks !) under the Collision section of the Landscape’s Details browser and tried it again, the correct physical material would show from the line trace.

However - and I think this is where things get confusing - if I change the landscape’s physical material again and try it, the line trace will show whatever physical material was selected previously.

Huh?

Well, it appears that it’s necessary to tick (or un-tick) “Generate Overlap Events” EACH TIME a change is made to the landscape’s physical material, or it won’t show which physical material is currently selected.

A little difficult to describe but hopefully you can make some sense of this. Basically, every time you wish to update the physical material on the landscape you must tick or untick “Generate Overlap Events” to get it to update and work correctly.
Hopefully somebody at Epic can repro this and identify if it’s a bug?

One other thing to highlight in 's steps is this:

I did notice that physical materials directly tied to normal materials are not picked up, but this Default Phys Material located directly in the Landscape Details Pane does. Please try this and see if it works for you.

My findings were consistent with this. The only physical material the line trace could detect on the landscape was the one selected in ‘Default Phys Material’, it could not detect the physical material from its “Landscape Material” in the Details pane. This sounds like a bug too. :slight_smile:

Cheers!

i have just confirmed this is true… all of it… setting physics materials inside the material does nothing, but selecting the landscape and then changing the default physics material to a new one , and then checking generate overlap events exactly in that order PIE will read the new physics material (butif you check overlap events and then add the physics material it will still read default during PIE)… this is definetly a bug epic…