# Mapmaking Discussion & Philosophy (WIP/Critique) > 3D modeling (map elements and height maps) >  Generating 3d Terrain using heightmaps with Blender

## lmbarns

After avoiding it for...ever, I finally broke down and figured I need to use it to make 3d terrains for little games I'm making, and it actually is really addicting, so I figured I should summarize how to do it.

In photoshop, gimp, or any 2d drawing program you make a heightmap by drawing various shades of gray which you can use to generate terrain depth. So I like to take a google earth image and replace the colors in solid shades of gray, then replace the shades with textures and turn it into a world.  

I started with this image from the grand canyon I edited a bit: 


The black will be the *lowest part*, and the* lightest shade will be the top* of the canyon.

I copy and replace sections of that in photoshop and replace with copied sections of my textures. (I would have just brushed them on with a layer mask but my brush pattern was ****ing me off and not working right.)





*Once it's textured* you have to* flip it both* horizontally and vertically.

Which gives something like this: 


And when you turn it into a 3d model you get:





I made a video of the steps as well. I use Blender (it's free), photoshop cs4, and Unity 3d game engine. (Unity has it's own terrain editor which is far more user friendly, but much higher polygon so I can't use it on mobiles...)




You can make a heightmap much bigger, and cut it into smaller squares, and generate meshes for each chunk to put together in the game (better performance if it can stop drawing chunks not being seen which you can do if it's in segments)

----------

