Download

How expensive are Blueprint actors? Cheap enough for use as foliage?

I’m looking into the ability to set up forests, ground coverage and other interactables using Blueprint actors. I haven’t seen this discussed anywhere before. How expensive are Blueprint actors?

Naturally, you wouldn’t want each grass mesh to be an actor. The engine has enough trouble with regular foliage meshes as it is. I’m more interested in trees. Would it be possible to populate an entire forest with each tree being an actor without destroying performance? I’m currently experimenting with tree felling/cutting, and this would be something I’d want to manage in a blueprint (along with various seasonal changes in material, and regrowth should a tree be cut down.

It’s a bit of an open-ended question (“How long is a piece of string?”), but I figured I should ask here to see whether anyone has any information to share on this concept, or whether there is a better approach while still keeping the same level of control over each tree / bush / mushroom / etc.

Thanks, as always! =)

Blueprint actors aren’t any more expensive than a C++ actor unless you are talking about using dynamic mesh generation in C++(like voxels).

If you want more than a few hundred/thousand actors you are going to want to use instanced static meshes as much as possible.

Just instance your trees. Depends on the mesh and material quality, but for instance I can put tens of thousands of small tree instances in my map before things start to bog down. And that is when most of the map is in view.

Also you cannot use BP actors with foliage tool yet, as far as i know. It is still on Trello so maybe it will happen in one of the next couple of versions.

Well, 4.9 is out and according to the Trello this particular task has been accomplished but I cannot seem to achieve it. Then again, I am trying to use the replace function for the already existant foliage actors as opposed to creating new foliage afresh with the BP tree actors so maybe that’s why. Will update when progress is (hopefully) achieved.

Check out last thursday’s Twitch stream, there is a small demonstration of how you can interact with foliage through Blueprints.

We have already done the work for you.

Thanks so much Yggdrasil! That was an awesome tutorial! :smiley:

The golden rule is always profiling your scene. Many early optimizations are actually worst than you might have thought.