How do I render Procedural Mesh in Static BasePass instead of Dynamic?

I am using UProceduralMeshComponent to create walls at run time. Once they are created they remain static. When I look at my GPU profiling, I’m seeing that during the BasePass, these procedural meshes are being rendered in a Dynamic pass after the Static pass of all my other world elements. This means that my procedural wall meshes are not occluding anything behind them. The pixels are drawn twice.

Below is a couple RenderDoc captures. On the left you can see the static pass, with lots of tree elements off in the distance. On the right is the Dynamic pass which happens later which fills in the spaces, thus wasting all those background draw calls.

This is very wasteful. Is there some way I can have my procedural mesh rendered during the static pass with all the other world elements such that those wall sections can occlude the background elements. I need that GPU performance boost! Thank you.

If anyone is curious, my solution to this issue was to use a great Runtime Mesh Component plugin by Koderz:

Runtime Mesh Component - Marketplace - Epic Developer Community Forums!

It’s very easy to convert from a ProceduralMeshComponent to this plugin’s RuntimeMeshComponent, and you can specific that the mesh’s be rendered in the static pass. Great stuff!

Hi! Sorry if my question is dumb, but how exactly do you specify to render it in static pass with the runtime mesh? Could’t find anything about it in the runtime mesh wiki. :confused: