Recommended Blueprint Optimizations?

I’m creating a city and as we speak I have created ~20 Blueprints for each individual building. Each building also currently has it’s own BP providing access to the player through the use of an overlapping a trigger box component outside the door. I would now like to start adding additional interactive content into the buildings BP’s via components such as light fixtures, electrical devices and also standard decorative static meshes. I’m wondering how I can best setup my blueprints and best practices in general so I thought I would ask a quick couple of questions:

  1. If I can add any static mesh as a component to a blueprint and simply place the BP into a scene, what are the drawbacks over placing standard grouped static meshes? (I’m curious if the BP equivalent takes up more resource?)

  2. Will multiple smaller blueprints vs fewer larger blueprints result in equal performance (assuming both scenarios include the same functionality overall)?

  3. Is there a recommended practice for adding blueprints as child components/references to a parent blueprint?
    (e.g. Building BP (parent) > Light Fixtures BP (Child) , Electrical Devices BP (Child))…

If you are building a city, make sure you utilize “instance” for your geometry based BP, and use dynamic shader instance for variations.
There was a older thread disscuss about procedural map generation where the hex tile is instanced, maybe you should dig that out as well.

Yes, instance anything that doesn’t need to interact by itself. If you look in my first map generator thread there is discussion about it. Actually, you can even instance stuff that does interact individually, but it becomes a little more complicated(but more performant if done right). For instance, all my rendered hexes are instances without collision, and I have additional hex shaped collision volumes overlaying them that I trace to hit when I want to interact with a specific tile. There are many other ways to do this as well.

Also, I would say group multiple meshes into a single object when possible. For instance, I saw I think in the side scroller from Epic that they had all the trees in the scene grouped as a single mesh, even though they were spread all over the level. I can’t tell you how to do that specifically, but it seems brilliant.

For scene performance I wouldn’t worry about blueprints by themselves, but what is being rendered on their behalf. If a blueprint is invisible doing some logic every now and then the overhead should be relatively low unless it is storing gigantic quantities of variables or something.

I think generally you use parent/child based on function. So Character has health, stamina, etc, and then an Orc is a child of character that gains those things and reacts to things that affect characters plus extra Orc features. So if making a light a child of the building makes sense for a mechanic, then do it, otherwise don’t.

actually too much light might be a problem, but a variation with emission shader will be more efficient.
I am not actually really sure about this, but actual dynamic lights are considered expensive.

I was reading what you discussed in your Map Generator 1.0 thread.
My English is not the best, so im trying to understand exactly what you are talking about, and I ask this question taking the risk of being seen as a fool, but perhaps im not understanding well that thread, interpreting some things in wrong way.
For example in the case of the city that owenprescott wants to build, instead of placing by hand the Statics Meshes, he should instantiate them?, I see difficult to achieve a good level design doing this way. So, how should he do this?

thanks and sorry if you misinterpreted things.


There are a few ways he can do this. One way would be to procedurally generate the city. Depends on what you are after, but yes level design can suffer if this does not fit your design goals.

A way to keep level precision while using instances for performance would be to note the vector location of all the meshes(obviously the duplicates that would benefit from instancing) in your map, and then feed those vectors into your blueprint that spawns them into the world in the same places you manually set them. Perhaps in that case though you would be better off somehow combining them all into 1 mesh somehow.

thanks for the clarification.
As to combine all in one mesh, I remember doing something similar in Unity. Furthermore, perhaps the LODs for more remote buildings or constructions is lost, because the whole city is now a large mesh (but I’m not sure).

Thanks again!

Thanks for all the useful replies, I haven’t even been using LOD’s so this is one optimizing that I’m sure will help. In terms of proceduraly generating building it’s something I have considered although I’m not sure how easy this will be for a newbie developer. I have built the cities architecture on a grid and buildings all have relatively uniform dimensions (300Lx300Wx600H, 600Lx200Wx300H, 900Lx900Wx900H etc)… One of the reasons I did this is because I could imagine it would be possible to autogenerate buildings into positions based on the length(L) and width(W) of the base. I will look more into UE4 procedural generation documentation to see what I can learn.

In the second half of this video you can get a basic gist of the grid system.