Static Geometry Performance

I’m watching the level creation tutorial video series at the moment and I’m noticing that Zak is duplicating a lot of static geometry. For example, when he needs a beam to cover a distance, rather than stretching out the existing beam, he’s duplicating it and positioning the duplicate next to it to cover the distance. It seems like unnecessary geometry instances to me? I’m just wondering how that affects performance? Does each static geometry result in a render call or does UE4 automatically batch static geometry pieces together that use the same material?

I guess I’m just a bit old school with being concerned about every render call and polygon that is pushed through the pipeline, or am I worrying about nothing and should be duplicating to my hearts content?

It probably does have a minor impact on performance, but the problem is that your UV density across the map needs to be more or less consistent for lightmass to work properly. So stretching objects, especially if their lightmass UV resolution is near the lower bounds of acceptable (usually like 16 or so IIRC) can really make the lighting look bad on those objects.

Hmm… well that kind of ruins all the fun. I was watching the tutorial videos thinking to myself, “wow, the engine must batch geometry based on material as he’s using a lot of duplicate meshes.” I thought it was great as it meant levels could be built in a truly modular fashion. I thought the days of having to model out every building (unwrap and texture the whole thing) and such before importing where over and I could build up a building from pieces right there in the level editor! Oh well, it was a nice dream… back to reality. :slight_smile:

That actually makes what Zak has been saying in the videos a bit dodgy. For example, he demonstrates building a light class blueprint so that you can reuse it hundreds of times in a level. That’s all great in theory, but if you actually did that in practice, your draw calls would destroy you (not to mention all those dynamic lights)! So as fancy as UE4 is, in reality we would still need to model the whole building as one piece with the light fixtures as part of that model and then just add point/spot lights to it in the level editor. Kind of makes the level editor a bit useless as most of the work needs to be done in the 3D modelling program anyway.

Also you can always hope for DX12 support, that would solve that Problem too.