Add foliage to an actor blueprint mesh

Hi all you geniuses. I have spent so much time researching this issue without success. Please help me!

The question is quite simple:
I’m developing an endless runner game. The character runs on an “infinite” road that keeps spawning road chunks in front of the character as he runs forward, which are despawned behind the character as they go out of view.

I’ve done the same with the scenery - I spawn big “terrain” meshes (simple blueprint actors of landscape meshes) in front of the character, and despawn them when going out of view. However, I really really want to have some nice foliage on these terrains as it would look soo much better. Is this really impossible? I can’t be the first one who’s done this

If they are blueprints, you can put some foliage on them for sure. Not using the foliage tool, but as part of the blueprint.

One way would be a downward trace from a box above the terrain. Where it hits, place the tree, or whatever :slight_smile:

Oh you’re talking programmatically through blueprint? That’s interesting. My fear is that is will be too hard on performance. I plan on generating pretty big landscapes quite quickly.

Also it seems suboptimal when it comes to painting grass, which requires a pretty dense distribution to look good.

I’ll try it out and see where it leads! Thanks!

1 Like

If you’re putting chunks in front of the player, and removing those behind, I don’t think performance would be a problem. ( It really depends )

You can make HISMs ( hierarchical instanced static meshes ) in blueprint. And that’s all the foliage tool does :slight_smile: