Packed Level Actor BP is Instancing Meshes Wrong

I’m having some issues with a packed level actor. There are multiple doors on a building I am putting together, and when I build it in the empty level, it looks fine. But once I have it packed into the BP, when it instances all the meshes, it instances the wrong doors together, so some are showing the inside of the door on the outside, instead of instancing ones together that face the same direction. Is there any way to manually adjust the instancing? Or any other suggestions?
One picture of how it looks in level, and how its supposed too, and one image of how its showing in BP with one of the doors being darker (that’s the inside side) than the other. There are 6 of these doors on the building on different sides (12 meshes total, all the same Static Mesh)

Hi,

Are the left side doors scaled negatively? That can break instances.
If they are negatively scaled, you can fix it by duplicating the mesh, mirroring it and resetting the scale to positive - I’ve just submitted an update to rdMeshTools that can do that automatically for all selected actors.

(post deleted by author)

They are not scaled at all, they are rotated and that’s it. Do you think the rotation would also cause this breaking of the instancing? Many other meshes on the building are rotated as well and they arent giving me the same effect, only the doors.

Rotation should be fine -maybe as a test can you replace that mesh with something else and try creating a PLA using that?

Ya if i replace the doors with another mesh in the same location, they work fine. The door is 1 Static mesh, should I make a variant of it that is just the rotated position and call it a day? I was hoping there would be some way of telling the instancing which meshes specifically to instance together, but maybe that just isn’t a thing?

yes - sometimes meshes just do that - not often though.

In a PLA the same meshes get instanced in the same component - but each instance of the PLA in the level has it’s own ISM components, so you still end up with quite a few drawcalls when there are many in the level.

A more optimal way of creating instances is to use a singleton instance manager (all instances are handled in one place). That groups all instances of the same mesh together.

I have a couple of tools on the marketplace that can do that - rdInst is the c++ instance manager for the fastest instances, and rdBPtools which can be used to create prefabs using rdInst.

hmm well essentially, I just want to find the most optimal way of handling a lot of static meshes in one scene, but without nanite (working for VR quest 2 so options are limited). Like this cathedral is well over 100 meshes as it’s a modular kit. And I don’t want to just merge it, since any modifications after the merge are annoying to do. What do you suggest?

I’d recommend using a singleton instance manager - you could make one yourself (just one actor that you call to create instances etc) or use rdInst from the marketplace.

With rdInst, the next release makes it very easy - all you have to do is add one tag to your blueprints “rdConvertToISMs” and it automatically harvests everything it can at beginplay - I’m hoping to submit the update with that this weekend.

hmm unfortunately I’m on a project that won’t allow external plugins from the marketplace. Trying to find a solution native in UE5.3. And I’m not knowledgable enough to write my own. What would be the next best solution?

OK, the next most optimal thing you can do is to merge them into single meshes, but otherwise the PLAs are probably going to be as optimal as you can get.

I’ve got some benchmarks covering things like simple actors, prefabs, PLAs and rdInst instancing here:

1 Like