Tutorial - Real-world heightmaps to displacements.

You will need the following:

** Google Earth Section **

  1. Load up google earth and find the area you want to sample heightmap data from.

  2. Double click your icon for the SRTM Overlay, where-ever you saved it. (Should be called srtm41.kmz)
    [img_thumb]http://i238.photobucket.com/albums/ff100/matty3962/Heightmap%20Tut/heightmap1.png[/img_thumb]

  3. Make sure you have “elevation” checked in the google earth “Places” drop down.

  4. The world should have been split into boxes with little green mountains in the middle. Find the box that goes around around the area you want and click it’s green mountain icon.
    [img_thumb]http://i238.photobucket.com/albums/ff100/matty3962/Heightmap%20Tut/heightmap2.png[/img_thumb]

  5. In the popup that appears scroll down and download the ARCASCII file from the mirror closest to you.
    [img_thumb]http://i238.photobucket.com/albums/ff100/matty3962/Heightmap%20Tut/heightmap3.png[/img_thumb]

  6. Close Google earth.

** MicroDEM Section **

  1. Unzip the files you just downloaded to somewhere you can remember.

  2. Load up MicroDem

  3. File > Open > Open DEM > ASCII Arc Grid (.asc), then in the window that opens navigate to the place you unzipped the data and load the .asc file.
    [img_thumb]http://i238.photobucket.com/albums/ff100/matty3962/Heightmap%20Tut/heightmap4.png[/img_thumb]

  4. The image has a load of junk on it we don’t need.
    Right click the image, select “Legends / Marginalia”, and untick the boxes next to Elevations, Scale bar, Terrain Categories and Database legends. Click OK.
    [img_thumb]http://i238.photobucket.com/albums/ff100/matty3962/Heightmap%20Tut/heightmap5.png[/img_thumb]

  5. Now we need to select the area we want. On the toolbar at the top of the data window (not the main toolbar, the one at top of the currently open heightmap window.) select the Crop tool (small dotted rectangle with an arrow in the bottom right corner) and drag it over the area you want. If you make a mistake with this step use the button to the right of the crop tool to undo it.
    [img_thumb]http://i238.photobucket.com/albums/ff100/matty3962/Heightmap%20Tut/heightmap6.png[/img_thumb]

  6. Now to turn it into a usable heightmap. Right click your open map and choose “Display Parameter” and from the popup choose “Elevation”.
    Select “Gray scale” from the list of options.
    [img_thumb]http://i238.photobucket.com/albums/ff100/matty3962/Heightmap%20Tut/heightmap7.png[/img_thumb]

7.The other option you might want to mess around with is “Z Range”, which controls the minimum and maximum height of the heightmap, **although it’s probably best to leave it at default and not touch it unless you know what you’re doing. **
[img_thumb]http://i238.photobucket.com/albums/ff100/matty3962/Heightmap%20Tut/heightmap8.png[/img_thumb]

  1. Click OK and let the map redraw.

  2. Final step in MicroDem. We have to resize the map to 1:1 pixel mapping. This is a simple step, just click the icon between the zoom in and zoom out buttons. (It’s a magnifying glass with a 1 in it.)
    [img_thumb]http://i238.photobucket.com/albums/ff100/matty3962/Heightmap%20Tut/heightmap9.png[/img_thumb]

IMPORTANT!
If your map gets a grid over it, right-click it and choose “Grids/Graticule” and set the “Grid” option to "Neither"

  1. We need to export to .TIFF. Click File > Save Map as Image > “GeoTiff Screen scale (color)”. Save it wherever you want.
    [img_thumb]http://i238.photobucket.com/albums/ff100/matty3962/Heightmap%20Tut/heightmap10.png[/img_thumb]

** Photoshop Section (try to follow along in your own software if you don’t have photoshop) **

  1. Load up the .tiff file. File > open.

  2. We need to resize the image to a power of two (Not sure if this is required, but it will be neater and will likely cause less problems.)
    Go to Image>Image Size>, select pixels from the drop down and type in a power of two combination (1024, 1024. 512, 1024 etc.)
    [img_thumb]http://i238.photobucket.com/albums/ff100/matty3962/Heightmap%20Tut/heightmap11.png[/img_thumb]
    [img_thumb]http://i238.photobucket.com/albums/ff100/matty3962/Heightmap%20Tut/heightmap12.png[/img_thumb]

  3. Once you’ve done that (and hopefully not lost too much image quality) save it back out as a .Tiff. It isn’t that important if it isn’t a .tiff, Dispgen just prefers it.
    [img_thumb]http://i238.photobucket.com/albums/ff100/matty3962/Heightmap%20Tut/heightmap13.png[/img_thumb]
    [img_thumb]http://i238.photobucket.com/albums/ff100/matty3962/Heightmap%20Tut/heightmap14.png[/img_thumb]

** DispGen Section **
** This section requires a lot of trial and error! **

  1. Load up DispGen.

  2. Set the size and height of your land, preferably in powers of two again, in the X Size, Y Size and Height boxes. Does NOT have to be the same size as the heightmap image.

  3. Set the X Triangles and Y Triangles boxes to about 128, that’s always done me fine. If you can squeeze a bit more detail in, set them to 256.

  4. Leave “Adjust Terrain to minimize vertical stretching” turned off for now. If you have stretching problems (and aren’t using $seamless_scale textures) then try turning it on.

  5. Load the heightmap file, leave smoothing off for now, see what it’s like without and adjust it 'till it looks okay.

  6. If you know the texture you’ll be using on the land then enter it here, if not just leave it for now.

  7. A neat feature that saves a lot of time is the “Blend By Slope” option.
    I usually set “img_thumbn Angle” to 35 and “Transition Degrees” to 45. If this doesn’t work well for you try raising/lowering it by 10 each time.

  8. Choose where to output the VMF file and tick Create VIS Nodraws!

  9. Press generate.

[img_thumb]http://i238.photobucket.com/albums/ff100/matty3962/Heightmap%20Tut/heightmap15.png[/img_thumb]

** Hammer Editor Section **

  1. Load it up the generated vmf in hammer and see what it’s like. If it’s wrong adjust smoothing, sizes and such in DispGen and try again and again 'till you’re happy with it.

Great tutorial. I hope to see me more like this. It’s refreshing too see a tutorial that covers something that hasn’t been covered very well in the past. In other words, I’m glad it’s not another “How to make an Area Portal” or “how to func_detail brushes” because we all know you can google that and find 10 reliable results. (Yes I am pointing at you base, HELP thread makers.)

It was covered the other day in a different thread, but granted that wasn’t for source and was linked from a different forum. Well done for writing an in depth tutorial on the matter for beginners.

I want to see the outcome! (ingame)

Well the only screenshot I have of something done with this technique is this one, which is much bigger than it may appear in the screenshot (16,368 x 16,368 if I remember correct):
[img_thumb]http://i238.photobucket.com/albums/ff100/matty3962/misc/brytavka_terrain0000.jpg[/img_thumb]
(Black marks were caused by adjusting the terrain in-hammer and forgetting to adjust the vis nodraw blocks underneath afterwards.)

Was using a different heightmap though and it didn’t turn out too well imo.

I have other stuff using heightmaps too but they were hand-drawn on photoshop, not done with this real-world technique.

sweet man :D!

I can’t get the arcascii to download. But I found proof that underwater jews exist.

(it’s north from Oahu)

Hohlee sheeeet.

Oh, and what’s the problem exactly? What is it doing? Any error messages or anything?

Nvm, I deleted part of the link and it started working.

Edit:
Gah! When I load it, it’s only white!

That’s strange. Try another one from somewhere else in the world.

Nothing works. :smith:

-negative-

Water acording to the program is flat, so it will be white.

Oh shit, yeah. You’re trying to get heightmap data of the ocean. It doesn’t have that. :stuck_out_tongue:

I realize that most of that part is ocean, but there are also three islands there so it’s not the problem. Could someone make a heightmap of Oahu for me? I love that island.

The data around there isn’t very good, that’s the best I could get from it.

A download for DispGen?

Good point. Forgot that. Cheers.

**Edit: ** Added to the links list at the top.

Friggin’ think wont work, (Win7)

It should all work fine, I’m running Win7 too and have had no problems.