Foliage placement got corrupted

Suddenly I got my foliage painted objects floating above my terrain. Not all of them but in a really big area they are now floating above were I originally painted them! I noticed this after loading the map and I don’t have a backup.

It can’t be that I’m somehow responsible for it because when I would have painted the terrain different there by accident the foliage objects would moved with it. In any case it is not possible that foliage objects float above the ground as long as it is not manually specified in the offset settings of each object or each object selected and moved.
So I’m sure this must be a bug but I have not idea what caused and how likely this is to happen again.

Is it a known bug?
Is the anything that could cause it? I was thinking that foliage painting is also stored in a texture and that might got compressed or something? It is definately the foliage objects that got moved and not the terrain there since the normal meshes are still on the ground.

Another thing, is it possible to make increment autosave somehow so I have a backup when it happens again?

The trees there are normal static meshes, the selection is the foliage.

Hi ,

Does this occur in a clean, blank project with no additional content or is it limited to a specific project or specific assets? Additionally, what are the foliage settings you are currently using? How are you adding your foliage (painting, procedural spawner, etc.)?

I have no idea. It is the first project and first level where I make any terrain and foliage and it happened once for now.
I’m using the usual way of painting foliage. Here and there I selected painted foliage object and adjusted them a little. I made use of various painting settings like Z Offset, Radius, Scale and Align to Normal.

I noticed now that the foliage objects of one 1 specific terrain component are floating above the ground. The foliage objects on all other terrain components are not corrupted.
I assume the foliage positions are baked inside a texture per terrain component? Can I access that texture somewhere?

I tried to use the lasso tool to grab all foliage objects of that terrain component and see If I can move them all back at once but it seems there is another bug with the Lasso tool: Foliage Lasso select doesn't work - World Creation - Unreal Engine Forums

What is the Z offset value you used? Z offset will cause objects to float off of the ground as you are seeing.

I think you missunderstood me. That were just settings I used for painting. That corruption happened out of nowhere. I opened the map and there were all my previous carefully painted foliage objects of that 1 terrain component suddenly floating above the ground which were previously positioned perfectly into/on the ground.

I just used slight Z offset values while painting to make objects be a little more into the ground or a little less.

Ah yes that does make a difference. Was this project updated from 4.7 or did you create it in 4.8? Additionally, did you make any changes to the landscape before noticing this? Did you update any of the assets (for instance, reimporting an fbx that is used in the foliage)? Have you tried using the Reapply tool to repaint the foliage onto the landscape area?

The project was updated from 4.7 to 4.8 but the map was not. I started the terrain in 4.8.
Before noticing I worked on a far away area of the terrain, just sculpting and terrain painting. I had then a problem with terrain painting, my dirt painting sometimes painted grass instead. So I just saved and restarted the editor which made painting work fine again but then I noticed the floating foliage objects. I can’t tell when that got corrupted.

I tried using the Reapply tool with a slight difference in Min and Max of Z Offset. Those floating object just remain floating with slightly changing the position. So it appears the engine thinks they are on the ground even though they are not. New painted foliage objects behave normally.

open your console command window and type “RecreateLandscapeCollision”. Does this fix the error? Additionally, what are your scalability settings set to?

Where do I get the console command window in the editor?

The documentation mentions this inside the Menu Bar:

But for me that is replaced with Search For Help.

Engine Scalability Settings are all set to Epic.

press the ~ key to get the console command bar to show.

Doesn’t work, at least not with my German keyboard.

You mean this “^”? Doesn’t work either.

Press the key next to the ‘1’ key on your keyboard digits row (not the numpad). On QWERTY keyboards that corresponds to the ~ (tilde) key.

My german isn’t the best bit I found this on Google :slight_smile:

‘Unter Windows klappt das bei mit mit AltGr + dieses Plus neben der großen Enter-Taste’

Yea, there is where the tilde sits on my keyboard but I have to press “AltGr” + “+” to get it which doesn’t do anything probably because UE4 doesn’t allow combinations. Here it works: ~

If this isn’t working, there is another way to access the console command line. Open up Window>Developer Tools>Session FrontEnd. In the Console tab at the bottom there is a console command where you can run various commands and they will propagate to any instances you have listed within the FrontEnd system. Try this and see if you are able to get the command to work for you.

“RecreateLandscapeCollision” didn’t do anything

I’ve attempted to reproduce this on my end but have thus far been unsuccessful. Can you try creating a new, blank project in 4.8 and reproduce this using a landscape created in editor and starter content assets? Does it occur when you do this? What specific values are you using in your foliage? Are there any steps I can take that consistently reproduce this on your end?

Hi ,

We have not heard from you in several days. I am marking this thread as answered for tracking purposes. If you are still experiencing this error, please comment back with the requested information.