Procedural Foliage Spawner "Landscape Layer" not working

I am using the Procedural Foliage Spawner to spawn trees on my map, I have a Landscape Material Layer called “DeadLeaves” and I’m trying to get the trees to spawn only on the “DeadLeaves” layer. But when I tell the TreeSet to do this and then resimulate, it doesn’t spawn anything…

Heres a picture:

Hello Dr3d1337,

From what you describe you have created a project and added some different materials to your landscape. Then you have created A procedural foliage spawner and type in order to draw foliage on your landscape. Then you assigned your foliage different layers for different foliage to be drawn on.

I have a couple of questions to help narrow down what could be causing this.

1.) Can you recreate this in a new fresh project?
2.) Can you clear the layers where you want your foliage to spawn in your Foliage Type and see the foliage working?

Please let me know the answers to these questions and I will continue to investigate this issue at that time.

Thank you,

Logan

Hey Logan, thanks for the response. To answer your questions:

  1. It does seem to work properly in a new map for some reason.
  2. If I clear the “Landscape Layer” box and re-simulate, I do see my trees spawning all over the map.

As of this moment I’ve just been painting the texture under my tree groupings. But as you know, that’s tedious and not very efficient when it comes to re-simulating the trees with different settings.

Hello Dr3d1337,

I was able to reproduce the issue of the procedural foliage not spawning meshes. However, I then tried reproduce this in another project and it worked.

This issue seems to be random and proving difficult to track down. I will keep you posted on this problem. I know it is not efficient to paint everything, however, I recommend using this as a workaround for the time being.

Logan

Same issue here in 4.11.

I was experimenting with the KiteDemo landscape and attempted to paint
foliage on any of the existing layers/masks (e.g. Grass01) but nothing happens. If I remove the layer name (i.e. set back to ‘none’ in the foliage painter the foliage can be painted as expected, but everywhere.

Same issue with procedural foliage spawner. With a layer name it does nothing, but without it spawns everywhere within the spawn volume.
Try it on a section of the KitDemo if you need a repro.

I will test on a blank project when I have time.

SOLVED in my case (UE4.11):

  1. export the terrain to heightmap.png to preserve it

  2. delete the landscape and create a fresh one

  3. reimport the heightmap.png to restore your landscape

  4. reapply your materials and reset your layer info (if it is missing)

That made my paint-foliage-on-mask and ProceduralSpawn-foliage-on-mask start working as I expected it to.

It seems there may be some confusion between masking functionality and landscapes that have been carried forward from older versions of the engine.

No luck for me with ash22’s solution. I am however able to get it to work on the landscape in the “VehicleAdvanced” template. So I decided to go ahead and migrate my landscape to that project and everything is working as expected.

I had pretty much the same problem, just the other way round. My Procedural Foliage spawned everywhere, I wasn’t able to limit it to a certain layer.

But deleting and reimporting my landscape & layer masks solved that problem, now it works fine :slight_smile:

If I had to guess I’d say there’s a updating-problem with the “LayerInfo” Files as soon as some kind of “fundamental” change to the layers or foliage happens…

On DeadLeaves target, select the layer > click on + Icon > Create Layer Info > NON WEIGHT-BLENDED LAYER

Import from file > GrayscaleWeightmap.png

This creates a white-black zone for the foliage volume. (You can see with Visualizers > Layer Debug)

Click “Resimulate”

Same issue latest version :frowning:

I was running in to the same issue where…
Procedural Foliage calculates on a landscape if the layer limits were NOT set for the foliage types, but if I assigned the foliage a layer limit they would not generate.
After a lot of debugging I found that the Procedural Foliage calculations do not take into account any rotational transforms of the Landscape itself. This might also occur if the Landscape is scaled but I didn’t take the time to test this theory.
Bottom line, make sure you do not have any scaling or rotation on your Landscapes.
Hope this helps.

Yup, I was having the same issue. Procedural Foliage Volume was not placing foliage types that specified a landscape layer ( to use as a mask ).

The solution/ workaround that I found was this:
The first landscape level/tile that you place using world composition can not be moved from its original placed default position in the world composition window.

If you don’t shift it, the Procedural Foliage spawner volume works as expected with landscape layers. If you move the original tile, it does not work. Thankfully, if you shift it back to the original position, it will once again function properly. Additional landscape tiles that you create after the first one can be shifted around as much as you want.

Unreal seems to be using the default starter position on the first tile as the cornerstone for however it interprets landscape layer masks.

Oh wow! I searched for this answer for so long! This needs much more attention! Nice solve!