Tutorial: Getting Real World Terrains into OpenSim

I named my first OpenSim region Orcas after a real world island.  I decided to try and see if I could get the actual Orcas Island terrain into OpenSim to see how it looked and uncover any challanges one might face in bringing RL terrain into OpenSim.  This tutorial will walk you through the process I followed and and various software packages required to make this happen (done on Windows).  The net, net is I succeeded, but the results were uninspiring.

My thanks to Petrolia and this tutorial which got me started.

[UPDATE: See Darb Dabney's excellent follow-up post here which shows how to do this more accurately.  He completes a usable Orcas island with 54 OpenSim regions at proper scale!  Great work Darb love it!]

Step 1 – Find Some Terrain 

The US government maintains a great site which while a bit cryptic contains tons of data.  Point your web browser here: http://seamless.usgs.gov.  Navigate to “View & Download United States Data”.  Make sure to enable pop-ups you’ll need them.  Google maps it is not, but use the zoom and navigation controls to find a piece of terrain you want to put into OpenSim.

USGS Seamless Server

USGS Seamless Server

Step 2 – Select/Deselect Display Options

On the right hand side, there is a display panel with several drop downs.  Deselect everything (a bit painful) and select “NED Shaded Relief (1/3 arc second)”  This relates to the level of detail in the data.  1/3 is the more detailed than the 1 arc sec, but less than 1/9.  1/3 creates fairly large download and you may be able to get by with 1 arc second since this all goes down to 256×256 pixels.

1/3 arc second Elevation Selection

1/3 arc second Elevation Selection

 Step 3 – Select Download Area

On the right hand side of the display select the “Define Rectangular Download Area” and then drag a selection around the terrain you want to use.  The process I describe in this tutorial fits what you select into a square image so the closer to square you select the less distortion you will encounter.  Once you finish your selection a pop-up will come up summarizing your request.

 

Step 4 – Modify the Data Request

You want to get a .BIL formatted file, so click at the top of the request summary page on “Modify Data Request”.  It looks like a column header but it is a link.

Modify Data Request

Modify Data RequestScroll down to the 1 selected download size and change from ArcGRID to BIL Change Download Type to .BIL

Now scroll all the way to the bottom and select Save Changes.

Save Changes

Save Changes

Your download should start, although you may have issues as I did with pop-up blocking settings.

Step 5 – Download and Install MicroDEM (free)

You now have raw terrain data in a .BIL file.  To work with this, you need to convert it from BIL to a height map which is basically a greyscale image where 0 (black) represents the lowest point in the terrain and 255 (white) represents the highest point.  The MicroDEM software lets you do this.

Download and install from here:

http://www.usna.edu/Users/oceano/pguth/website/microdem.htm

 

Step 6 – Open .BIL and Change to Grayscale

  • File -> Open DEM (select the .BIL file from your download)
  • I Needed to create “images” directory under c:\mapdata to get the save BMP to work.

  • Modify->Elevation->Grayscale

  • Modify->Grid->Neither
  • Remove Legend Overlays by right clicking on the image and selecting “Legends/marginalia”
Legends Context Menu

Legends Context Menu

You’ll see a dialog like this, deselect all the check boxes and click on “redraw map”.

Remove Legends

Remove Legends

Save it to a .BMP with

  • File->Save

Step 7 – Crop/Scale in Your Favorite Image Editor

You now need to scale/crop the image down to 256×256 pixels.  For this one I used the freely available GIMP, but Photoshop works well too.

The GIMP

The GIMP

 

 

 

 

 

 

Orcas Sized and Scaled

Orcas Sized and Scaled

Step 12 – Load into OpenSim

You load the terrain into OpenSim from the OpenSim console with ”terrain load /path/to/file.png”.  For SecondLife you can upload a .raw file from the estate tools, but this does not seem to be implemented yet in OpenSim.  Converting from a heightmap to an SL raw file is a whole ‘nother topic.

My first pass ended up with a very craggy landscape.  The black turned into the floor of the sea with steep rises.  In short, the terrain scale I picked was far to large for a single region.  [I also learned later that you really cannot use the full range of black to white or you will get pretty unusable terrains.]

Craggy from Ground Level

Craggy from Ground Level

I lowered the water level to zero to get a better perspective and took the following shot from above.

Aerial View With 0 Water Level

Aerial View With 0 Water Level

Step 13 – Make Adjustments, Rinse and Repeat

To get a smoother look, I used Gaussian blur filter in Photoshop and reloaded for the final results. [Reducing the contrast would have helped as well].

Terrain Smoothed with Gaussian Blur

Terrain Smoothed with Gaussian Blur

Aerial View of Orcas
Aerial View of Orcas

At the end of the day, this was not really what I was hoping for.  It is not recognizable as Orcas and it is not very practical landscape for an SL Sim. 

Here is another post from Emma Nowhere which offers more software packages for terraforming OpenSim/SL terrains.

  1. bwildasi’s avatar

    Fire up any editor that handles png, bmp, tga, raw, or jpg and use your favoite picture for your terrain. For gradual evelations desaturate the colors, then slide the briteness/contrast scale to softly muted shades of gray. Finally set your 256×256 pixel RGB terrain and water to the proper height in the startup_commands.txt file, saying something like:

    terrain load gulligans_island.png
    terrain lower 80

    if you still need to make subtle changes, in the server console type: ‘terrain help’ for such things as elevate, load-tile, save, multiply, revert, or new brushes.

Reply

no deposit bonus casino benzoyl peroxide 75 Kamagra oral jelly adverse reactions to ticlid buy clomiphene online mirtazapine color picture buy kamagra online cyclosporine ibd buy lasix online revia tunner Buy furosemide online aristocort ointment rxlist buy zithromax online buy cheap celecoxib Kamagra oral jelly crixivan and sustiva buy propecia online ipratropium bromide nebulizers and peanut allergies free slots online free cut fosinopril in half buy propecia online propranolol web med casino online casinos didanosine dose buy kamagra online mefloquine lariam buy finasteride online singulair at t Buy viagra canada milk products and bactrim Buy Azithromycin Online arcoxia 90mg buy furosemide online how long ovulate after femara buy finasteride online nelfinavir
buy nolvadex online cheapest price for donepezil buy cipro online amaryl feel good buy lasix online doxepin allergic reaction buy clomid online lexapro and postural tachycardia syndrome buy xenical online doxazosin mesylate buy flagyl online evista home rand