What The Heck Is Going On With My Procedural Foliage Spawner?! Please Help!

Hey guys,

I have either stumbled across a bug or I am doing something really stupid!

I have a simple landscape with the Brushify Landscape Material on it.
I created a brand new Procedural Foliage Volume and added my Foliage Spawner to it which includes just 2 palm trees meshes.
For each tree I’ve said that it is to include the Desert material, but exclude the Beach material. (So no trees are allowed to spawn on the Beach material)
I have done this process many times before and suddenly the weirdest things have begun happening.

For some bizarre reason, there is huge voids where my trees are supposed to spawn? **(See image A) **There is nothing else in the scene that would cause this?

image A

](filedata/fetch?id=1870770&d=1615582312)

My Foliage Static Meshes have the basic settings apart from the rule about which surface they can spawn on** (See Image B)

image B**

](filedata/fetch?id=1870771&d=1615582425)

I also noticed when I painted the Beach material down and it was recompiling the shaders, there is an obvious straight line along the texture edge which just happens to be where the trees suddenly stop spawning?! **(See Image C)

image C**

](filedata/fetch?id=1870772&d=1615582485)

And lastly, my foliage rules are being completley ignored with the trees spawning in the exclusion zone! **(See Image D)

image D**

](filedata/fetch?id=1870773&d=1615582525)

Following the advice below, I tried numerous other tests and they all failed.

I even removed my Foliage Spawner completley, created a new one, added two different meshes to it (banana trees) then tried to Resimulate, and now this!! **(See Image E) **Some sort of grid system that covers the whole map!

(See Image E)

](filedata/fetch?id=1870776&d=1615582807)

As with the title, what the heck is going on? Please help!

TIA for your support

If one or more of the landscape layers are non-blendable then you could have beach hiding under the desert, or desert brushed under the beach. All confusion aside, try brushing while holding the SHIFT key. That works like an eraser and you can be sure there is 0% of the beach brush running up the hill. No other idea as to why this might be happening. Good luck!

2 things.

  1. the landscape has a layer debug video mode. Use it.

  2. the spawner doesn’t do falloff. If any value of paint is there the instance can spawn.

Let’s also add 3.
Even with speedtree assets that’s way too many trees in a scene… I know you are testing probably. But it is worth mentioning.

Thank you for your suggestion. I tried using the shift option to erase the layer and unfortunatley im still getting the exact same results when I Resimulate. I’ve been using Procedural Foliage Spawners for a long time and I never come up against this. I cannot get my head around what is happening here?

Thank you for your feedback. I have also updated my post after further tests, but unfortunatley I’m still struggling.
Yes, the amount of trees is just for testing, and in my last example you can see there is a clear grid system over my landscape. Any other ideas what could be happening here?

In a grid like that…
Does the grid correspond to landscape component sizes?

Edit landscape, delete a component. Take a screenshot. Undo. Take a screenshot. Compare the 2.

this should automatically also trigger the geometry to update. But give building geometry from the build menu a go as well.

Was the landscape moved from the original position? If so, the problem could also extend to grass. Test with a simple grass node and any mesh to see id the meshes falls in or lift up from the landscape.
the r. control to fix that was removed like 5 versions ago… but we don’t know what engine you are on, and bugs keep getting re-introduced by mistake anyway.
if the grass lifts off or dips down look for threads about that. The control was something like r.restlandacpeoffset xy or something similar.

If the Grass works. Then the issue is probably something in the spawner setup. Review all its settings.

Thank you for your feedback.

The grid unfortunatley does not relate to the component size. The void between the trees is about 1/3rd of the size of the component square in a rectangular shape.
The trees themselves sit perfectly on the ground, but something is stopping them spawning past a certain point.
The landscape has not moved either which eliminates that.
The GrassType function seems to work perfectly and does not spawn on the Beach layer.
There is something wrong, like you say, with the Foliage Spawner. (But then I also created a brand new one from scratch, and it still has problems?)

Test a new one in a new level without terrain material to see what happens

In UE5 I was able to fix my trees spawning in straight line by increasing Procedural Foliage Spawner tile size to 30000. You might want to experiment with tile size and tile overlap.

For my project problem was with selected “Collision with World” checkmark in foliage assets, just turn it off fixed it.

For @seedtech and anyone interested in this, even if 3 years passed since the last post, here is how you close the gaps: the squares your PFS is divided are its tiles, and to close the gaps between them, there’s a setting in the procedural foliage volume called “Tile overlap”. For the default tile settings a value of 200 is enough to close the gaps. If not try fiddling with it until the gaps are closed.

1 Like