Download

Static lighting for procedural meshes

This is the one thing really holding back procedural level generation for me.
It would be fantastic if procedural mesh components had the option to specify lightmap UVs and a bool to check that only allows mesh sections to be modified in the actor constructor and allows use of static lighting.

Hey @BlackRang666, out of curiosity, would you be willing to explain why you want this? I ask since many of the cases this would be needed are solved by converting the procmesh to a staticmesh which gives you all the benefits of a static mesh. I’m sure there’s some cases where this isn’t appropriate, and so would like to see what you need it for.

I didn’t know there was the ability to convert procedural meshes into static meshes. When was this feature added? Can you do this from the constructor of an actor?

It was added in 4.13 I believe… I’m not sure how/if you can call it from code, but it’s an editor only feature (but so is lightmass) so you can’t use it in a packaged game. In the level if you select the proc mesh and open the details there should be a button to convert to static mesh.

I would rather not have to make new static mesh assets. I would prefer to have one class that can be placed to create a room, hallway, etc. Adjusting things like door and window cutouts via parameters. Yes, I could make a class that does this, then make a new static mesh asset and swap the class for a static mesh actor, but that is really inconvenient.

Yeah, it’s definitely not a solution to all use cases, and I figured you wanted it for something like that…

I’ll look into adding this to my RMC (Link in my footer), but I don’t have an estimate right now on when that would be.

It would be super cool to have this feature as well…