Is there a way to select a heightmap from a library of like 100 different heightmaps(I’ve got these together already) as the game loads? I’m only needing a 1kmx1km heightmap loaded at runtime but I’d like it to be “mostly” different each time it’s loaded.
Think Helldivers2 or Starfield(no comments) for example. It’s not always the same maps. Once the heightmap has been selected, I’ll be running pcg elements to make it way more unrecognizable, so in theory… I’ll have a procedurally loaded level that I can reuse and reuse and reuse and it’ll be different feeling every time… Just like helldiver’s. Any thoughts?
No. And the engine doesn’t work that way at all.
Best you can probably do is to build all the levels and have some sort of randomized selector load a different level when the game starts off.
Either way, forget heightmaps even exist. Make yourself meshes. And use those directly into different levels with different light settings and parameters similar to how you would use the heightmaps but without resorting to stuff that does not work at all like landacapes…
You could prebuild your landscapes and save as level instances and load them in to build PCG on top of. Like MostHost says, heightmaps aren’t used that way for runtime generation of landscape… heightmaps are used in editor only.
Another option might be using the VoxelPlugin… I don’t think the free version has heightmap import, but you can write your own ‘from heightmap’ generator pretty easily if you are comfortable with c++. Has it’s own pitfalls, but it’s an option if you need PCG control of landscape.
Thanks to both of you. Very Helpful. I am not great with c++ so i think that my best bet would be to prebuild the landscapes in several level instances. I’ll need a way to select from those level instances tho at runtime. Last question, can you run pcg stuff at runtime?
Instances and even lighting can and probably should be baked so you can have a decent performing game… the engine isn’t that good either way performance wise, so if you can avoid live/moving light it’ll be better.