Procedural Jungle Tiles

Hello! Recently, I have hit a wall as far as a project I’m working on. I am trying to make a procedurally generated map that consists of tiles with different paths and trails that connect them together. The idea is that it takes place in a jungle. Sadly, foliage in a BP actor is not ideal, as this would be poor for performance. My question is: how would one make prefabricated tiles with foliage that can be spawned at runtime that doesn’t tank frames? Only one tile will be visible at a time in most normal circumstances.

This is how I am going to go about the actual map generation: [Procedural Map Gen][1]

This is one of the meshes I made, though, if a solution requires something other than meshes, this can be discarded, but it shows how I want the tile to be presented:

As far as what the player will see, there will be fog and it will be dark, so the amount of tiles shown isn’t as issue as far as performance. But placing each of the foliage instances by hand is tedious and there has to be a more efficient way of handling this.

Any help is greatly appreciated and thanks in advance for anyone who replies!

-ZV

You didn’t upload the tile pic. How big are the tiles?

Thanks. I guess an imgur link bugged out a bit… The tiles are 10m x 10m each with increasing intervals of 10 for larger rooms possibly.

Edit* The spawn tile is a little thinner to make it more recognizable.

Foliage in BP like this is totally do-able. You just have to make sure it’s instanced.

Interesting. I’ll look more into this a little later tomorrow. Thanks for the info and I’ll get back here if I need more help.

Okay, so I experimented with it, and it generates a mesh with all of them combined, but I’ve run into and issue. It does not carry over the UCX collisions I had set up, and it makes the foliage sway effect not work in this context. Is there any way to possibly use procedural foliage on a mesh?

I think when you merge you end up with complex collision, which should cover everything including foliage. ( So I don’t know why that’s not working for you ).

Also true, shader animation, like wind, treats the whole mesh as one thing. I think basic wind is ok, or you have to turn it off.

Another method ( I’ve also used ), it to make the tile with everything except foliage one mesh. I then make the grass a second mesh, trees a 3rd. You combine them in a blueprint.

The ‘official’ way is world composition or level streaming ( with volumes ).

I did look into streaming with volumes, but I couldn’t find a way to generate clear trails as, I am unaware of a way to randomly generate a painted trail on a terrain. I did just have the idea to set up a procedural foliage BP and foliage blocking volumes in the bp (if that’s possible). Then it would just be a matter setting up the terrain. Do you think this would bring any issues?

Yeah, I’m afraid there’s no fixed way of doing this…

If you’re going to set up a single terrain, then you might as well use the Epic tools to do the foliage.

It’s only if you want a strictly procedural map that you need the kind of approach you’re looking at. If you want things popping up at close range this is the way to go.

As you are / might be aware, you can have more than one landscape. You could also split those up with streaming volumes, just thinking out loud here.

While I did know about multiple terrains, that sounds like an interesting idea that I didn’t think about earlier. I’ll look into level streaming multiple terrains and get back.