How to create .RAW terrain files for Second Life and OpenSim with Terragen
Tools needed:
Due to popular demand, following my free island file package, I promised to explain how to create these using free tools. First off, while I know Terragen 2 is out for a while now, I’m still using the previous version, as I simply couldn’t get used to the new interface, and for the scope of this tutorial, Terragen 1 is entirely sufficient. We will not use their advanced sky or water editor, just the noise filters to create our terrains, and optionally the terrain editor. Terragen is a cross-platform application, but the critically needed Bailiwick is Windows-only, making it a bit cumbersome for Mac users, but not impossible, given the ability to run Windows for an occasional sidestep on your Mac, using either the native Bootcamp, or some VM solution like Fusion or Parallels. (Backhoe, on the other hand, is Mac-only, soothing the pain with Bailiwick somewhat.)
To begin, fire up Terragen. There are only a few functions we will be using right now. Open the landscape window and click on the “Generate Terrain…” button. Another window will open, allowing you to create random terrains and tweaking the results with some sliders and different noise generators. Just play with the settings a little to see what they do. For this tutorial, I tried to create an island that will fit on a normal region. Please note especially the slider ‘Size of Features’ as you can get best results setting it to max or close to max. Still, it will need a lot of repeated clicking on the ‘Generate Terrain’ button to finally get something you like.
When you are finished with the creation of your terrain, click on ‘close’. You can get a rendered preview of it clicking on the 3d Preview Button and you can edit and / or zoom over your terrain using the Landscape View & Sculpt tool. The green dot is the camera, the red dot is the view target. By default, the camera hovers a set distance above ground and thus moves with the terrain height when you move it. To move, just click and drag it across the window. You will see how it flies through the terrain on the 3D preview window. Clicking the ‘sculpting’ button on the Landscape View & Sculpt window (the button that looks like a paintbrush running over green colour) you can toggle the landscape editor. Now, left-clicking anywhere on your terrain map wil raise the terrain there, while alt-clicking (holding the alt key while left-clicking) will lower it. That way you can make some adjustments or even create your own custom terrain from scratch. When you’re satisfied with the result, it’s a good opportunity to save your terrain, as Terragen allows for only one undo step. To do so, click on file > Save Separate > Terrain… and save it as a terragen terrain file for now.
Note: Terragen can create terrains out of nearly any image file, using the Import function by clicking on File > Import > Terrain… and selecting “Image” as data format. The results may vary; for a basic rule, the images are converted to greyscales, with the light parts selecting higher terrain than darker ones.
Going back to our island, there are three things you will have to keep in mind to make it compatible with Second Life and Opensim. First, a standard region for these platforms is 256 x 256 meters in size. so we will have to adjust the size of the terrain map to 256 on each side. To do so, click on the “Size / Radius” button in the Landscape window and enter the size in the Landscape Area in the Landscape Settings window. Secondly, water height is -300 m in Terragen, while it is 20 m in Second Life by default. (Yes, Terragen works with negative terrain heights.) So, we will have to open the Water window by clicking its button and change the water level to 20.00 m there.1 And finally, the terrain itself will have negative heights in some parts. This is the most crucial and frustrating step, as it can ruin all your terrain again. Sadly, I don’t know any solution around it, so the only way out is through. If you click the “Modify Terrain” button in the Landscape window, you can, in addition to a few other modifications, change the height range. In my case, the little island ranged from -48.605 to +53.575 meters. Enter at least 0 in the first field (the minimum height range) and click on “Set Height Range”. You will notice your terrain will seemingly grow ‘larger’ as bigger portions of it will now be above water level. To avoid this effect, the number of the second field (maximum height range) can be carefully lowered a bit, moving the edges below water level again, but flattening the terrain all in all. Again, some experimentation here helps to achieve the best results. Also, save regularly.
So how do we get our terrain to Second Life now? It would be too easy if Terragen’s built-in RAW file export would simply create the neccessary file to upload to SL for us. Sadly, the RAW files generated that way will not work. Thus we need a converter that will make Sl compatible RAW files out of our terragen terrain file. Enter Bailiwick.
Start it up and import your terrain by clicking on File > Import > Terragen Terrain, selecting your terrain file and simply clicking the ‘import’ button. None of the settings need to be changed, simply create your .RAW file by clicking File > Save. Bailiwick will automatically save it as a sim raw file which can now be used on your Opensim region, applying it directly from the console using the >terrain load< command or upload it to a Second Life private region via the region/estate window.
Bonus Track: Backhoe offers some very nice and user friendly landscape editor for SL terrains. You can load the .RAW file created with Bailiwick into it and adjust basically everything you can with SL’s inworld tools, too. It just works faster and more smooth, and thus is a great tool if you want to get serious about landscaping.
Known issues: neither Terragen, nor Bailiwick or Backhoe offer some ability to rotate a terrain map, thus ‘up’ means ‘north’ in any case. While .RAW files are image files, I could not edit the SL specific raw file in neither Gimp nor Photoshop without rendering it useless for SL. So for now, I can sadly provide no solution for this.
[Edit June 5th 2010: A new tutorial now provides a solution for these issues as well as a way to create seamless terrains that stretch multiple regions.]
- Note: While it is possible to raise and lower the water level on SL regions, 20 meters is a good medium level and should be used for reference. Also, note that neither terrain nor water can ever get negative settings in SL. [↩]
Comments
Leave a Reply



















Sparkaphat Doobie on 06.16.2010
Thank You for this awesome bit of information!
V on 06.16.2010
You’re most welcome. I hope it helps.