Optimize lightmaps in blueprints that create arrays of objects

Lightmaps in blueprints that create multiple instances of an object as arrays. Does UE4 optimize this lightmaps, or each instance of an object created by these blueprints has its own lightmap? So there is a need to optimize the number of instances that an blueprint creates, isn’t it? There should be a good balance between size of the objects and the number of them so the number of lightmaps do not go crazy. Is there any recommendation of what the relation of size and number should be? For example, pieces to construct buildings shouldnt have more than 20 meters in any dimension. Is this right? Is a number extracted from what I can see in the mobile temple demo from Epic.

Hi!

LightMap create for each object in scene, and not matter instance, blueprint and e.t.c. If you talking about blueprints, which create a building from modular sets. They in scene look like one static mesh and have one LightMap.

Hi, thanks for the answer. That was my assumption. So, if I have understood well, each object put in the scene, be by drag and drop any asset, or instaced inside a blueprint, has its own lightmap. And if I have a blueprint that creates a linear array of ten objects, each one has one lightmap, so at the end I have 10 lightmaps, and UE4 is not optimizing this creating only one big lightmap that is the aggregation of ten lightmaps.

For example, to explain it better. If I have a wall asset, and I have a blueprint that creates walls of any lenght by instancing several wall assets, and that wall asset has a 64x64 lightmap defined, UE4 do not optimizes a wall created with the blueprint of size 10 creating only one lightmap for the array with 640 x 64.

I suppose that lightmaps with bigger sizes that group together several smaller lightmaps is a better approach always that is possible, because compression will work better and there will be less number of files to care about, etc.

So that was my question. UE4 optimizes lightmaps grouping them together in any way? A blueprint that creates arrays of objects that are clearly connected each other is a good thing for having an optimized lightmap, so is there in that type of blueprints any optimization? I suppose no, but would like a confirmation.

So if there isnt any optimization, the better way to optimize the number and size of lightmaps is to go to a balance between the number of objects in the scene and their size, I imagine. And do anybody have any recommendation on this, what is the best relation between size and number of objects? For example any recommendation kind of “Do not create assets bigger than 20 meters long and use no more than 128x128 in size, or anything like this”. This values are the usual in samples like the Sun Temple from Epic, so I assume that there is a non-written rule about this.

Thanks in advance

1 Like