Heya zeOrb,
That’s look pretty awesome! =) And your performance doesn’t seem terrible, is it just generation time?
Depending on what you’re wanting to do with your game, there are some other optimizations I can suggest, LOD’s like aeroastroarts mentions are a good start. However, the big optimization will break the nice variation you have going on using Dynamic Material Instances. Switching from Static Mesh Components to Instanced Static Mesh Components is a crazy good optimization (for both rendering and generation time), but since an Instanced Static Mesh Component is only a single mesh and a single material that you “add instances” to, they all will look the same (unless you don’t mind using the “per instance random” material node more below).
Anyway. So each hex is 6 meshes, let’s assume 6 different meshes for the moment. You could use Instanced Static Mesh Components to make the entire scene 6 draw calls (+extra material passes), however they’d all look the same, and they can’t move individually (outside of using world position offset in the shader).
The “per instance random” material node can add a single random float to a material for the instances within the Instanced Static Mesh Components. So you could color shift stuff, or shift UV’s around (I actually have a material that does this, it’s at work so I can’t post it at the moment), or really anything you want to do with a random number. But it is a random number. Meaning, if you were to use Random Streams to use a “seed” to define your random numbers in your Blueprint, so that the same seed would generate the same hex layout, well, the material wouldn’t be the same.
As far as I know, there’s no other way to mess with the material on an instance level of a Instanced Static Mesh Component.
and MonsOlympus in this thread have run into the same stuff, and are now seeing really good performance returns using the Instanced Static Mesh Components.
Of course, that’s all really extreme. But, you can work a system to reduce your draw calls by combining like hexes using Instanced Static Mesh Components to squeeze out more performance, but it really depends on what your goals are. How many units do you want on screen? VFX? Sound? AI? Interface? Platform? Etc… all play into it. If you want the hexes to float around, Instanced Static Mesh Components really won’t help you there, and LOD’s + limiting map size/limiting how much of the map you can see at once, will be your best bet
Know what? I keep talking about Instanced Static Mesh Components, I should really see about getting a doc page written up… and I should find out if they work on mobile if they really are video card voodoo… =)