I have try to do by BP something similar to the Rama’s Instanced Static Mesh Editor Feature. The point about this is clearly optimize the drawing calls.
So first share what is already done and after I will ask for help
Right now I have a BP that do it pretty well at run time, something that is really good since you can edit each single mesh separately until the beginning of play. You can see here this sample with 6000 cones: At editor 40 fps, at play 120 fps. right now I have 2 versions with ISM and with HISM
you can also can take a look to the BP here: https://blueprintue.com/blueprint/-1toaa83/
As you can see we use two variables one for the component tag that we use to identify the right meshes to replace (exposed) and a boolean to only set up the mesh and the materials with the first valid actor.
So if you don’t need to bake the lighting this is already great (sure someone can do it better, but this already works) So hope you find it useful!!
Now where I need some help: to do the same for an scenario where we need to bake the light maps, so this replacement is now valid since the new instances has not been calculated at the swarm agent.
1.- assign in some way the lightmap from the original object to the instanced mesh.
Pros: Is non destructive process like before but keep the lightmaps.
Cons:the optimization is only at runtime.
2.- build a BP that takes all the transformations and store in a unique DataTable or similar and, create a second BP that reads that data table to spawn the geometry on the construction instead of the begin play.
Pros: the optimization will also affect to the editor screen during the development.
Cons: This will be kind of destructive since once done we will lose the original actors that can be easily edited
Of course the idea is do it by BP as Rama show by C++ it’s posible.