• Tutorial - Real-world heightmaps to displacements.
    45 replies, posted
[u][b]You will need the following:[/b][/u] * Google Earth ([url]http://earth.google.com[/url]) * MicroDem ([url]http://www.usna.edu/Users/oceano/pguth/website/microdem.htm[/url]) * SRTM Overlay for GoogleEarth (Run from URL once you've installed Google Earth - [url]http://www.ambiotek.com/topoview[/url]). * An image editing package capable of saving as (preferably) .TIFF and capable of resizing an image with minimum damage. * DispGen ([url]http://www.chaosincarnate.net/cannonfodder/cftools.php?program=dispgen[/url]) [U][B] Google Earth Section [/b][/U] 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 [b]ARCASCII[/b] 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. [U][b] MicroDEM Section [/b][/U] 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. [B]Click OK.[/B] [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. [b]If you make a mistake with this step use the button to the right of the crop tool to undo it.[/b] [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, [b]although it's probably best to leave it at default and not touch it unless you know what you're doing. [/b] [img_thumb]http://i238.photobucket.com/albums/ff100/matty3962/Heightmap%20Tut/heightmap8.png[/img_thumb] 8. Click OK and let the map redraw. 9. 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] [U][B]IMPORTANT![/B][/U] [B]If your map gets a grid over it, right-click it and choose "Grids/Graticule" and set the "Grid" option to "Neither"[/B] 10. 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] [U][b] Photoshop Section (try to follow along in your own software if you don't have photoshop) [/b][/U] 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. [B]It isn't that important if it isn't a .tiff, Dispgen just prefers it.[/B] [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] [U][B] DispGen Section [/B][/U] [b] This section requires a lot of trial and error! [/b] 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.[U] Does [B]NOT[/B] have to be the same size as the heightmap image.[/U] 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 [B]tick Create VIS Nodraws![/B] 9. Press generate. [img_thumb]http://i238.photobucket.com/albums/ff100/matty3962/Heightmap%20Tut/heightmap15.png[/img_thumb] [b][u] Hammer Editor Section [/b][/u] 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.)
[QUOTE=Hostel;19525450]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.)[/QUOTE] 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)
[QUOTE=BloodYScar;19525779]I want to see the outcome![/QUOTE] 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!
[QUOTE=-Xemit-;19527082]I can't get the arcascii to download. But I found proof that underwater jews exist. [IMG_thumb]http://i50.tinypic.com/2mc7ucy.jpg[/IMG_thumb] (it's north from Oahu)[/QUOTE] Hohlee sheeeet. Oh, and what's the problem exactly? What is it doing? Any error messages or anything?
[QUOTE=-Xemit-;19527172]Nvm, I deleted part of the link and it started working. Edit: Gah! When I load it, it's only white![/QUOTE] That's strange. Try another one from somewhere else in the world.
-negative-
[QUOTE=-Xemit-;19527172]Nvm, I deleted part of the link and it started working. Edit: Gah! When I load it, it's only white![/QUOTE] Water acording to the program is flat, so it will be white.
[QUOTE=leontodd;19535231]Water acording to the program is flat, so it will be white.[/QUOTE] Oh shit, yeah. You're trying to get heightmap data of the ocean. It doesn't have that. :P
[QUOTE=-Xemit-;19536055]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.[/QUOTE] [url]http://s000.tinyupload.com/?file_id=51499502196741623716[/url] The data around there isn't very good, that's the best I could get from it.
A download for DispGen?
[QUOTE=IRN Zombie;19537023]A download for DispGen?[/QUOTE] Good point. Forgot that. Cheers. [B]Edit: [/b] Added to the links list at the top.
Friggin' think wont work, (Win7)
[QUOTE=IRN Zombie;19537232]Friggin' think wont work, (Win7)[/QUOTE] It should all work fine, I'm running Win7 too and have had no problems.
Still nothing. I even did what the readme told me to do.. [editline]11:11PM[/editline] Ill try a restart. [editline]11:13PM[/editline] Can somebody try this? It's from a [B]VERY[/B] old thread and I just want to see how it comes out. [IMG]http://img154.imageshack.us/img154/8177/deathcovemapzw3.png[/IMG] Also he made it in GIMP.
I can't get the files to start downloading :(
[QUOTE=Dj-J3;19537950]I can't get the files to start downloading :([/QUOTE] If it's the files from GE you're referring to, just keep restarting the download, mine got stuck a couple of times too.
Great looking tutorial, about to test it. Very excited.
When opening the .asc file with MicroDEM, I just get a blank window. Anyone else experiencing this?
[QUOTE=-Xemit-;19547933]Thank you very much! [editline]12:01PM[/editline] Sorry for double post but I wanted to show how it came out. [media]http://www.youtube.com/watch?v=86AiUP7iDwM[/media] [editline]12:01PM[/editline] Hurray for auto merge![/QUOTE] Wow, came out much nicer than I thought it would, the heightmap data certainly wasn't the best around there.
Just a little test I had this a looooonnnnggggg time a ago but lost the idea to work on it. [img]http://www.benjojo.co.uk/wordpress/wp-content/uploads/2010/01/theuk0000.jpg[/img] Anyone want a release? And yes the texture is eww
In my opinion you should use this then import the heightmaps to l3dt, and have it generate a texture and stuff. Result: [img]http://img17.imageshack.us/img17/3761/epic20000.jpg[/img] Pre-baked lightmaps ftw
[QUOTE=laptopman;19558582]In my opinion you should use this then import the heightmaps to l3dt, and have it generate a texture and stuff. Result: [img_thumb]http://img17.imageshack.us/img17/3761/epic20000.jpg[/img_thumb] Pre-baked lightmaps ftw[/QUOTE] How do you plan to light any geometry on the map and adjust for that in the pre-baked lighting?
You can specify the color and angles of light in l3dt. That means you can give it an environment light too. Just set the texture to unlitgeneric. So as long as you get the height of the displacements generally right in dispgen, it works perfect. I did this with a custom skybox and everything. Super freaking awesome.
[QUOTE=laptopman;19560267]You can specify the color and angles of light in l3dt. That means you can give it an environment light too. Just set the texture to unlitgeneric. So as long as you get the height of the displacements generally right in dispgen, it works perfect. I did this with a custom skybox and everything. Super freaking awesome.[/QUOTE] Alternatively, you can just leave it as a "fullbright" texture in l3dt and just let VRAD do the lighting like normal (meaning you get correct light bounces off the terrain.
Is it me...or are the pictures not showing up in the first post?
[QUOTE=Sodisna;19566473]Is it me...or are the pictures not showing up in the first post?[/QUOTE] Look at them manually.
[QUOTE=HiddenMyst;19565689]Alternatively, you can just leave it as a "fullbright" texture in l3dt and just let VRAD do the lighting like normal (meaning you get correct light bounces off the terrain.[/QUOTE] Thats true. The only reason I used a pre-baked lightmap is because you can get more detail than you can with the boxes. I was just expirimenting around. Using the pre-baked lightmap can also give the illusion of more detail than there really is.
Sorry, you need to Log In to post a reply to this thread.