Digital Elevation

Tutorial collection, comprehensive listings on main site.

Digital Elevation

Postby Tutorial on Sat Jul 30, 2005 2:07 pm

category
General Half-Life 2/Effects

description
This is quite an advanced technique to creating huge displacement landscapes.

keywords
displacement, displacements, digital, elevation, landscapes, landscape, terrain.

This is a tutorial to create realistic landscapes based on digital elevation models (DEM) from real world places. Sample DEM and VMF included.

First step: Obtaining DEMs. There is a huge database with the entire USA country here:

http://data.geocomm.com/catalog/

Need to register (free), and downloads will be restricted at 5 kb/s, but each DEM is only 3 MB max.

You can get the first file you see, or look for a specific place. You will need to know the state and county in that case. Search is broken (at this moment), so things will complicate a bit. This is a useful service to find places:

http://www.topozone.com/

Use it to find the exact place by typing its name, then take note of state/county/USGS Quad and latitude/longitude. Now you have all you need to find your DEM. Start digging into the geocomm database, and sooner or later you should be find it.

When you are about to download, probably there will be two options: 30 and 10 meter resolution. Choose 10 meter, if there is no 10 meter don’t expect the best results.


Second step: convert DEM to Terragen format with 3 DEM.

Terragen is a nice app to create terrains with very realistic atmosferic effects (you don’t need Terragen for this tutorial). But before you can see your DEM in Terragen, you need to convert it with 3DEM

http://www.visualizationsoftware.com/3dem.html

- Load Terrain model: choose USGS DEM file type
- Can be viewed in 3D pressing F2


Image

- Select zone can be resized pressing left mouse button while dragging on a corner. Take in consideration that DEM size is much bigger than the max distance supported by Source, so you need to crop smaller areas or your terrain will look scaled in-game. There is no problem if you plan to use it for 3dskybox.
- Export it: File/Save Terragen Terrain/ Entire or Zone, what you want.


3DEM is also capable of another interesting operation: you can merge several DEMs. If the zone you are interested is splited in two or several DEMs, will need to merge them. About merge, this is what 3Dem help has to say:

USGS 7.5 Minute SDTS DEMs in tar-gzip (*tar.gz or *.tgz) format can be directly merged by 3DEM. Choose “File - Load Terrain Model” and select “USGS DEM.” Then you can select multiple DEM files from a common directory to be merged into one Overhead View. That is, all of the DEMs to be merged must be contained in the same file directory. To select multiple files, highlight each file required using the mouse, and then click OK to load all files into 3DEM. The only limit to the number of DEMs that can be merged is memory in your computer.

DEMs to be merged must be adjacent to each other. Note that merged DEMs do not always match perfectly at their boundaries since the quality and accuracy of each DEM can vary widely. 3DEM makes the best match possible with the selected DEMs.

Please note that 7.5’ DEMs to be merged must be all of the same resolution. That is, 10-meter and 30-meter resolution DEMs cannot be mixed. Mixing DEMs of different resolution will result in an error message “DEMs Have Different Grid Resolutions.”

Please note that 7.5’ DEMs cannot be merged across UTM zone boundaries. You can check the UTM zone of each DEM by selecting “Operation - Show DEM Specs” from the Overhead View menu. Attempting to merge DEMs across UTM boundaries will also result in the error message “DEMs Are From Different UTM Zones.”



Step 3: convert Terragen to 16-bit grayscale .tif with Terraconv

We have a Terragen format landscape but we don’t need Terragen to manipulate it. Just use this little app to convert your .ter to .tif:

http://koti.mbnet.fi/pkl/tg/TerraConv.htm

Select “Load Terrain” and export it as 16-bit .tif (or .pgm, also supported by Dispgen).

Important note: there is some limitation using .tif images in Dispgen (at this moment). You must use images which size ends in even numbers.


Like I said, there is no need to use Terragen, but if you want to preview your landscape and make wonderful things with it (or create a nice 2dskybox), you definitivelly need more info about it:

http://www.terrasource.net/ (general info)

http://developer.valvesoftware.com/wiki ... h_Terragen

Render of sample DEM with Terragen:

Image


Step 4: create your Source terrain with Dispgen

Cannonfodder’s Dispgen is an app to build complex 3d terrains in VMF format from gray scale bit maps like we have now. Download it here:

http://www.chaosincarnate.net/cannonfodder/cftools.htm

It’s very straight forward, but here are some tips:

- Brush generation parameters: mantain the proportion with your DEM, remember max size is 31000x31000. Be careful with X and Y triangles, too much resolution could result in unusable maps.
- Displacement ajustment: try with and without, maybe you will not like it
- Run smoothing: not recommended, will destroy details of our precious 16-bit grayscale.
- Create Skybox: take care with that, a gigantic map with a gigantic skybox is not the best way to make maps. More height=more BSP size and more compile time. A hand made skybox with proper height for every map zone is better (if you have large height variations)
- Create VIS nodraws: useful to make a full VIS compile, will reduce overdraw and big FPS gain could be obtained if your terrain has canyons/walls that reduce visibility. Advice: compile time can be larger than your own life if terrain is very complex.

Final result:



Image Image Image

You can get the samples I used in this tutorial here:

http://www.pcgamemods.com/14462/

R_Yell
- Don't send PM's to this user -
Tutorial
Not A Real User
 
Joined: Sun Mar 06, 2005 11:00 pm

Postby Shr3d on Sat Jul 30, 2005 2:22 pm

WOW
:shock: :shock: :shock: :shock: :shock:
WOOOOOOOOOOOOOOOOOOOOOOOOOOW

i am starting to get a lot of ideas
btw, people can now cheat on the map battles :P
Shr3d
 

Postby G|a$sEater54 on Sat Jul 30, 2005 5:13 pm

dude...are you serious?....that...is so awesome..it's beyond words...
Image
I Am The Infection
I Am The Cure

Image
User avatar
G|a$sEater54
Member
Member
 
Joined: Sat Jul 02, 2005 7:37 pm
Location: Ontario, Canada

Postby Orion on Sat Jul 30, 2005 5:16 pm

Sexy.
User avatar
Orion
1337 p0st3r
1337 p0st3r
 
Joined: Tue May 31, 2005 10:42 pm
Location: United States, California

Postby Shr3d on Sun Jul 31, 2005 5:58 am

:P a lot of canyons/cliffs in america it seems, now if only australia was on the list... (bungle bungles in western australia would be so cool.)
Shr3d
 

Postby Athlete{UK} on Sun Jul 31, 2005 9:33 am

Finally i can use Heightmaps in source. Thanks mate this will be a lot of use to me considering i have so many of them lying around after a number of 3DSMAX projects.
User avatar
Athlete{UK}
Veteran
Veteran
 
Joined: Sun Nov 14, 2004 2:56 pm
Location: Stoke

Postby Shr3d on Sun Jul 31, 2005 10:11 am

i got it to work, just its really hard to get ur skybox around the displacements as they arent shown on the grid. :P and rad takes forever to compile
Shr3d
 

Postby YokaI on Sun Jul 31, 2005 11:39 am

Sweet, now i know my HO map will kick ass :P

I remember you could do this in SOF2 though i never did it.

Also: can i port this BACK into hamer to create buildings and stuff?
YokaI
Forum Goer Elite™
Forum Goer Elite™
 
Joined: Fri Dec 03, 2004 12:38 am

Postby reeke on Sun Jul 31, 2005 11:57 am

nice easy way of getting all the work done for you
User avatar
reeke
Senior Member
Senior Member
 
Joined: Sun May 01, 2005 4:49 pm

Postby Shr3d on Sun Jul 31, 2005 12:24 pm

YokaI wrote:can i port this BACK into hamer to create buildings and stuff?


yes
Shr3d
 

Postby YokaI on Sun Jul 31, 2005 12:57 pm

Shr3d wrote:
YokaI wrote:can i port this BACK into hamer to create buildings and stuff?


yes


Sweet <3 lol
YokaI
Forum Goer Elite™
Forum Goer Elite™
 
Joined: Fri Dec 03, 2004 12:38 am

Postby ferret on Sun Jul 31, 2005 7:01 pm

I'm having a lot of trouble finding the dem files. When I picked the location I liked from the website, the file I downloaded was a wierd format. SDTS or something -- it gave me a zip file filled with multiple .dff files.
*** May the Source Be With You ***
User avatar
ferret
Senior Member
Senior Member
 
Joined: Fri Jun 10, 2005 10:03 pm
Location: oHIo

Postby Charron on Sun Jul 31, 2005 8:15 pm

Make sure you click Digital Elevation Models after you pick your county. The tar.gz should not be extracted anywhere, just save that. If you're not using the site linked in the tutorial, I can't help ya. :?
Image
User avatar
Charron
Regular
Regular
 
Joined: Fri Mar 11, 2005 2:02 am

Postby wiggle987 on Sun Jul 31, 2005 8:36 pm

Nice to see you on lopers R_Yell. :smt023
Image
User avatar
wiggle987
Veteran
Veteran
 
Joined: Mon Nov 22, 2004 8:54 pm
Location: O RLY?

Postby ferret on Sun Jul 31, 2005 10:37 pm

I figured it out now -- I didn't realize that the tar.gz files were the same as dem files. Great tutorial! :wink:

EDIT: btw, your example map is very laggy. You shouldn't have put the water brush under the whole map. And also the water brush is too shallow. and you didn't use my tutorial for the environmental light :cry:
*** May the Source Be With You ***
User avatar
ferret
Senior Member
Senior Member
 
Joined: Fri Jun 10, 2005 10:03 pm
Location: oHIo
Next

Return to Tutorials

Who is online

Users browsing this forum: No registered users