Is it possible to procedurally generate maps?

I guess this question is many in one, but all are related:

Is it possible to procedurally generate a map? I know the logic behind doing this in c++, and I’m sure with enough knowledge of blueprints this can be done in the editor.

The reason I ask is how would it work to use Lightmass with it? To my knowledge Lightmass is used to bake lighting into your scene while building your map in the unreal editor (please correct me if I’m wrong), how would it do this while in game, as in a player starts a game, the maps are generated, the player starts a ‘new game+’ for example and the maps are regenerated for replay-ability? How would the lighting work? Would it only use dynamic lights?

Would you even be able to use static lights in this case?

I know that is a lot of questions at once, but I just want to make sure that this is the right engine to use for this, before I invest a lot of time creating those procedures and then find out I don’t have good functionality because of engine limitations. (I realize we have access to the source on git hub with a subscription, but I would like to avoid modifying the engine as much as possible, as strange as that sounds).

Thank you all for your time!

Yes! Procedural generation is possible, and not too complicated. I wouldn’t suggest doing it in blueprints though, as any more complex generator 10x faster C++ is always the better option.

I think there’s a way to bake lighting through code, and if there isn’t, it shouldn’t bee too difficult to add in (just add another input for the baking), but that’s going to mean you must dive into the source code. …but mostly likely there is a command, and visual studio is often good at suggesting what you mean. Just throw in some words that would make sense to you.

Hope this helps, -DoctorPC

If you would be able to bake lighting in code, would I just generate a lightmass importance volume in the code around the generated map? I would think the load time (when the map is being generated through game play and it would have to dp the bake process at that time too) would be very long wouldn’t it?

yep, load time would be very long indeed, which is why you may want to stick to dynamic lighting altogether. You loose some precicion, but gain more freedom to do things like destructable terrain :slight_smile:

So all of my levels would have no static lighting? Everything would be left for dynamic light(s) correct?

well, atleast the generated levels, unless you add some odd cpde that contructs the level of textured pieces (=prebaked lighting)

ok, I think that’s enough to get me started, thank you for taking the time to answer my questions!