Holy Instanced Meshes !......?

I have a game with a grid map, and I am well on my way to adding the various types of tiles (each type as a InstancedStaticMesh with each tile an instance of one of these). I can generate different types of grid shapes by positioning the tiles a certain way, neat!

I’m thinking about the end game of this though, and what my requirements are. For example i need to have some of the tiles animate, and maybe even some of them have particle systems (not a ton). I will want to have walls that can animate upward on each side, and maybe have different “flair” pieces on the tiles. (maybe pipes and valves to give some variation on what the tiles look like).

The strategy here i think is, that i have an instancedstaticmesh component for each tile type, and then when one of them needs to animate, i swap the instance out for a regular mesh, animate it, then swap it back to an instance that is in the animated state. (for example a wall raising out of the ground or a gun popping out of the ground and shooting).

I see this getting very very dense, i could have a hundred different instancedstaticmesh components by the time i get the look that i want (and a semi non trivial animation management system). Not to mention variations in material will also need different instanced static mesh components.

Am i on the right track here? I would hate to start down this path and then realize I am missing some fancy feature some where that would make my life easier.

Thanks for reading!

How many tiles are you anticipating? I’m not too familiar with the instanced static mesh route, but I’d first make sure that such things are necessary :slight_smile:

Definitely necessary, i ran a demo of our game without instanced meshes (programmer art only/static meshes) and it was very slow. Once we get further down development it will only get worse.