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:
Generating 3d Terrain using heightmaps with Blender-texture1024.jpg

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.)

Generating 3d Terrain using heightmaps with Blender-layers1.jpgGenerating 3d Terrain using heightmaps with Blender-layers2.jpg
Generating 3d Terrain using heightmaps with Blender-layers3.jpgGenerating 3d Terrain using heightmaps with Blender-layers4.jpg
Generating 3d Terrain using heightmaps with Blender-layers5.jpgGenerating 3d Terrain using heightmaps with Blender-layers6.jpg

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

Which gives something like this:
Generating 3d Terrain using heightmaps with Blender-textureflip.jpg

And when you turn it into a 3d model you get:
Generating 3d Terrain using heightmaps with Blender-waterpic.jpg

Generating 3d Terrain using heightmaps with Blender-modelingpics.jpg


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)