Thanks for that suggestion; your project looked pretty cool. I followed Rama’s guide here for Instanced Meshes: -
and managed to get it to work; the Draw time reduced dramatically when I scaled it up! My next steps are: -
- keeping track of the instances and removing/adding new runs during runtime (looks like you can access an instance array within the component, so should be straightforward)
- investigate the Material offsets (which I believe you can do) for each instance
- investigate rotation and scaling (pretty simple I hope)
Hopefully, I can generate random town with relatively different looking buildings from one mesh!
Then that takes me to the next step. I’ll probably have a collection of simple meshes (rather than just a cube). I was wondering if it would be better creating a different class for each shape of building, or whether you can have an array of InstancedStaticMeshComponents within the one StaticMeshActor class, and then call the AddInstance for which ever one you wanted? I am guessing that probably wouldn’t work but unfortunately my holiday free time is now up and it’s back to the day (and evening…) job so it’ll be a while before I can find out myself.