Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am creating a Minecraft Terrain engine in XNA, and want to create a large blob/cluster of blocks, in a random sort of blob thing, shaped somewhat like the stuff under the Volume Rendering heading on the following page:

This post might be somewhat like my post How can I generate floating land masses for a Minecraft-like engine? but I believe this is an entirely different because this is more of a 3D approach rather then 2D, also I would prefer it without the crater bits ;).

share|improve this question
It looks like your other question is about 3D, so I'm wondering how this is that much different. – thedaian Jan 21 '12 at 4:34
Nope, in that one I just using a 2D perlin noise map :) – Darestium Jan 21 '12 at 5:00
up vote 2 down vote accepted

Perlin Noise can be done in 3D just the same as 2D.

Heres a video of it being used with some terrain.

Try making 3d perlin noise as a bunch of block clouds. But remove any blocks below a specific level of noise (the higher the level the smaller and more island like he landmasses would be). It might also be an idea to apply a kind of 3D blur to help prune out small single blocks. Maybe you might want blocks to 'fall' if there is a block within a specific number of blocks below them.

Chances are you want to scale/'flatten' the noise vertically to ensure you get flatter landmasses.

You can overlay several noise's at different resolutions/properties, that allows you to generate some large islands and little ones. Some will merge together too. More noise generations with other thresholds could be used to make different block types. Other another level of noise could forgot the flattening and produce mountains.

Things like trees, water and caves entrances are a bit more tricky since you would need to check to see if they make sense placed where they are(ie trees/caves appear only on top of an island rather than floating in free space).

It might be an idea to look at turning another perlin noise into some kind of probability point distribution, ie a higher value for noise means there is a %10 chance of a tree at that point. Once you have that point you trace down until you find a valid block where you plant the tree provided it meets the conditions required for a tree (ie there is enough space above it. It's on a dirt block, lighting levels, water nearby or whatever.

Of course there are also things like biomes which would be more noise.

Going this route you will want to be sure of of how fast you can produce perlin noise in the numbers you want since you will be making a lot of it. Also find out how much memory it will take, some noise can just be added onto the other noise but other types would require it's own separate overlay.

It might be worth looking and seeing if you can generate the noise using Shaders, OpenCL , DirectX's Compute shaders, or CUDA if possible but if your planning on releasing this commercially you may be limited by what you can use depending on what requirements you want to support. Of course you can produce 2 different generators provided they both use the same algorithm. At the very least you probably want to thread it.

You will also want some flexible noise manipulation functions like blur, stretch, recale values, subnoise.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.