Procedural Foliage Unexpectedly Spawns on Static Meshes

When procedural foliage is restricted to a particular landscape layer, it still spawns on static meshes which are within the procedural foliage volume. This seems undesirable because it means you can’t simply paint a forest on the landscape. You also have to surround every static mesh with a procedural foliage blocking volume.

If this behaviour is felt to be useful in some situations then IMHO it should be optional, at least.

Instructions for reproducing:

  1. Create a blank blueprint project with starter content.
  2. Create a landscape centred around the origin with the default settings. (Leave the chair, table, and other static meshes in place.)
  3. Create a landscape material with two layers. Assign it to the landscape and create appropriate layer info objects.
  4. Fill the landscape with one material, then paint a small patch with the other.
  5. Create a Foliage Type, and assign SM_Bush as the mesh. Set the collision and shade radii to 20, and the steps to 10. Under Landscape Layers, enter the name of the layer you used to create the small patch at (4).
  6. Create a Procedural Foliage Volume, and expand it so it encloses both the patch created at (4), and the example static meshes (the table, chair, and floor).
  7. Create a Procedural Foliage Spawner. Assign it to the Procedural Foliage Volume. Assign the Foliage Type created at (5) to the Procedural Foliage Spawner.
  8. Click Simulate. Bushes will now be spawned on the patch, as expected, but also on the table and chair.

Before adding foliage: http://i62.tinypic.com/vdkgg7.jpg

After adding foliage: http://i57.tinypic.com/15ev0ok.png

Many thanks for your time looking into this report.

Hi ,

This is expected behavior. The foliage is agnostic to whether or not you are spawning on a landscape or static mesh. Because the landscape layer weight only affects the foliage spawning on the landscape itself, it will not stop foliage from spawning on static meshes that are not over a particular layer. However, there are several options for addressing this. One, as you said, would be to add a blocking volume to the areas where you have static meshes. Another, though, is to use the foliage paint tool to erase the unwanted foliage from static meshes affected by them. You can go into the foliage paint tool and determine which meshes you do not want around or on the static meshes in question and erase them without affecting other meshes (such as grass), that you may want around the mesh.

Hi ,

Thank you for your input and time. Unfortunately, erasing the foliage manually doesn’t seem to work very well because it comes back if it’s ever necessary to re-run the simulation.

As this is the intended behaviour, can I change this bug report into a feature request? :slight_smile: Perhaps the user could be given the option of disabling spawning on static meshes (and BSPs) at the same time as restricting the foliage to particular landscape layers.

By the way, I’m finding the procedural foliage tool really helpful, so please don’t think this is a general complaint. Even with the need to create blocking volumes, it will save me a lot of time, and probably give better results too.

Pete

Hi Pete,

I absolutely can put in a feature request for that. It is now in our system as UE-17810 to be considered by the development staff.

It could be a simple filter after the foliage is placed. I have a similar problem with my map, it’s so large that manually inspecting every possible case of “Tree spawned on a house” is a huge chore.

If possible, it would be nice if the post-placement-filter could be customized with blueprints so we could make more advanced predicates for filtering

same problem here , i hope epic add a option to detach or ignore specfic meshes from procedural foliage

114160-screenshot+(515).png

What is needed is the ability to place foliage only on Landscape via the Procedural Foliage Spawner, as it works with painted foliage

Hi ,

You can find the feature request for this here. This feature is to prevent foliage from being placed on the landscape if static meshes are present in that location.

Here is a work-around for this issue :
Put all the static meshes into it’s own level by using World Composition. When foliage is placed onto the static meshes you can now select only the meshes that are placed onto that level/static meshes and just delete them.

An alternative : after placing go to the foliage tool, select painting on static meshes only. Hold shift and paint with a 8192 sized brush over everything, it will delete only foliage that is placed on meshes.