Procedural Building (frame drops)?

Hi guys,

So through strife ive made my first real construction script in ue4 and ive gota building using instanced meshes in order to edit the mesh desired, number of floors and number of segments (both width and depth). However im getting this strange performance drop when viewing the structure from different angles. The front of the building sticks around 8ms whilst the side reaches around 11ms.

Both Sides are using the exact same mesh but ive checked the gpu profiler and the difference seems to be in the “dynamic” section of “Base Pass”. This performance hit gets exponentially worse the larger i make the building and at a ppoint completely freezes my pc when i hit play.

Any ideas whats causing this and how to fix it?

Front view

Side View

Thanks guys.

did you ever work out a solution to this as im having the same issues

Yeah what had happened was id done some shoddy scripting which meant the for loops were sort of running exponentially on top of each other (as i added a floor it would add a mesh piece again for every floor overlapping each other). When meshes are overlapping and fighting on the z axis they cause huge overdraw. As you make your building larger go in to shader complexity view and check its not getting more and more intense.