For my game I am trying to create a Minecraft style world that is based off a heightmap that I made In Photoshop. I am trying to make the map which is 7km squared where each cube is 1m cubed but I haven't found a way to do it. The heightmap converts to a terrain file(in unity), but my problem is that I can't create the Minecraft look.

what I have done so far looks like this

what i want looks like this

  • 2
    \$\begingroup\$ What have you tried? What is the problem, generating the world, using the heightmap? Currently it's unclear what you are asking, edit your question so that you actually ask something. \$\endgroup\$
    – Katu
    Dec 29, 2015 at 13:53
  • \$\begingroup\$ Short answer, in Unity you will need Google's servers to pull that off, large scenes or projects scale really badly in Unity, as can be seen with Wasteland 2. Long answer (so to speak), read the heightmap in C# as an image and spawn boxes to or at the height of the specific point. But you do indeed give too little info, you have probably already thought of this. \$\endgroup\$ Dec 29, 2015 at 15:56
  • \$\begingroup\$ @Katu I have edited the question. \$\endgroup\$ Dec 29, 2015 at 17:51
  • \$\begingroup\$ @ user3079666 I understand what you mean and that seems like a good idea but im not sure if i can do that. could you please elaborate \$\endgroup\$ Dec 29, 2015 at 19:37
  • \$\begingroup\$ What does your heightmap image look like? If it looks rounded and you want it squared, I'm guessing your image needs solid edges instead of gradients. \$\endgroup\$ Dec 29, 2015 at 19:52

1 Answer 1


While being down voted I will tell you a professional approach to a Minecraft style terrain using heightmaps. So you should of learned by now that your heightmap should be grayscale. black = lowest point, white = highest, and the gradient in between controls height in between. there are 255 possible color combos if you include black and white. from there, each pixel is = to 1m in game.

7km*7km = 7000m*7000m = an image that is 7000*7000 pixels. Programming the flat surfaces in the game is a different matter. You need to program the terrain generator (or a class that talks to the terrain generator class) to take each pixel by location, then create a flat cube like surface. for instance every 10 units in game are = to 1m. this means that the generator will generate 10x10 units in game at height A, then the next one over at B.

  • \$\begingroup\$ This seems like overkill to me, actually using a heightmap for voxel terrain seems overkill to me. I would just store it as a list of heights, and then iterate through it each time the same way. So i wouldn't need to store locations, but just heights. \$\endgroup\$ Dec 29, 2015 at 21:11
  • \$\begingroup\$ If you were dealing with depth such as blocks under blocks then yet, that way is superior in all aspects, but if they don't have destructible terrain, heightmaps are easier because its just an image and you can use your favorite photo editing tool,(ms paint, gimp, photoshop) instead of programming a terrain editor or programming an editor option into the game for the dev \$\endgroup\$ Dec 29, 2015 at 21:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .