- Home /
Building generation in a voxel engine
Hey all,
I'm making a voxel engine and want to generate terrain with buildings in it. I know how to generate hills and mountains. Now I'd like to have it generate buildings too, but this is pretty complicated since these are more precise. Does anyone know some good resources for this?
Thanks
Answer by Statement · Oct 25, 2013 at 12:20 AM
Well, consider making a "prefab" for a building. Think of it as painting the building in advance in a voxel editor that perhaps you have created. Then, when you want to instantiate a house, you can pick a spot at random and look for the nearest location where the house should be constructed. Just fill in the blocks with whatever the house would normally have, and ignore those that are nothing/air/void. Basically, you'll be "copypasting" in your "solids" of the building. The hard part is figuring out what a proper location is. Presumably where there are nothing above it (just sky) and presumably where all bottom layer tiles have contact with ground or it might end up balancing on a cliff.
Your answer
Follow this Question
Related Questions
How to mix different amplitudes and frequencies when procedurally generating terrain? (Perlin Noise) 0 Answers
terrainData.heightmapTexture float value range 2 Answers
Flowing water in my voxel terrain 1 Answer
Tiled Terrain 0 Answers
How can i make this noise generated terrain more interesting? 1 Answer