As a follow-up to my previous tutorial on how to create single-region terrain .RAW files, this advanced tutorial will show how it is possible to create seamless terrain raw files that stretch across multiple regions. As a side-effect, this will also solve the previously unresolved problem on how to rotate / edit these files in photoshop.
First, create a terrain in terragen, as described in the first tutorial. Note that terragen will only create square terrains, so if you plan on using a different shape layout for your multi-region estate, think ahead of which part to exclude from the terrain map. For this tutorial, we will create a 4-region terrain (a square 2 regions wide and 2 regions high). Once you created your terrain in terragen, save as a terragen terrain file and then export it as an 8-bit raw file.
Open the file in photoshop (it won’t open in gimp). Note the image is 257×257 pixels in size. Change the image size to 514×514 pixels (as we will need an image that is four times as big, for the four regions). Then, mirror the image vertically! This will make things very confusing, but is a neccessary step, as terragen will mirror the photoshop files vertically upon re-importing and thus this step is crucial for your terrain to tile correctly. Remember this association when naming your terrain files, as they will be upside down now, thus southwest becomes northwest, etc. Next, change your canvas to 257 x 257 pixels again and select the corner you want to create. In the above example, I picked the southwest corner (making it the northwest terrain). Save the file as a photoshop raw file (naming it nw.raw, for example). Go back one step to bring back your full region again and do the same with all other corners of your terrain.
Now, one by one, re-import these raw files back into terragen using File > Import > 8 bit raw for it. Notice how during that step, your terrain gets turned back upside down again. Now, save the four pieces as terragen terrain files and convert them into sim raw files with Bailiwick, as described in the previous terrain tutorial.
As you will have noticed, this procedure does not only allow for the creation of multi-region terrain files, but also allows you to edit your terrains in photoshop, enabling you to scale and rotate them, among other things. Only remember to mirror them vertically prior to saving.
(Download the resulting terrain files here, and further terrain files in our terrain category.)
[EDIT 1st February 2011: As it seems, OpenSim will start supporting Terragen files, so using Bailiwick won't be neccessary anymore.]
Comments
Leave a Reply


















jonc on 06.12.2010
Stumbled across you blog – great article this
OpenSim already has some native support for terragen files but it has been borked for the longest time – seems no one cares about terragen – L3DT gets all the love when it comes to OpenSim terrain generation
there is a patch however http://opensimulator.org/mantis/print_bug_page.php?bug_id=1564 that’ll allow you to import your megaregion terragen files directly into OS.
This will allow the load-tile console command to splat a single .ter file across a megaregion for you – handles the rotation issues as well
- jonc
[Reply]
V on 06.12.2010
Wow, thank you jonc, that’s great!
[Reply]
Annabelle on 12.25.2010
Hi V-
Thanks for this great tutorial. I was wondering if you could advise about a problem I am having with a 4 sim mega region I have made on a usb stick. In my efforts to enlarge the height map from single region to a mega region, I have increased the resolution to 514 by 514 as advised, and made the .raw maps as advised in Baliwick. What happens is that the 4 maps all keep loading into the same region. Even if I am on the SE, the raw file I am loading will load onto the
SW region. I set this mega region up with this tutorial- http://vw-standards.wikispaces.com/Research+-+USB+OpenSim
I thought it was a good, well presented tutorial, but not sure why
your mapping will not work. I also tried your mega region desert
collection, and that would only change the southwest corner as well.
is there a naming issue that is happening when these sims are set up, or is the problem with the maps?
Many thanks for any and all help!
Best-
A
[Reply]
V on 12.25.2010
Hi Annabelle,
I don’t use megaregions because they’re producing more issues than they solve at the moment. What you describe is a “feature” that has its own Mantis for more than a year now. The only workaround I can think of is as follows:
1.: Disable megaregions by setting CombineContiguousRegions=false, either in your opensim.ini or in the divapreferences.ini in the config-include subfolder (if your sim on a stick is based on a Diva Distro; it sounds like it is). Restart opensim.
2.: Upload the terrain files as described above.
3.: Enable megaregions again (if desired) by setting CombineContiguousRegions=true; restart opensim again.
Good luck.
V
[Reply]
Annabelle on 12.26.2010
Thank you V- I shall try that- (yes, it was Diva Distro)
[Reply]
Annabelle on 12.28.2010
Hi V,
that workaround didn’t work, it still kept loading in the SW corner ;-( ..I will keep trying and let you know if I have any success with another procedure- thanks for your help. A
[Reply]
V on 12.28.2010
Hi,
I forgot to ask: How do you try to upload the terrain? Via the Estate tool in the viewer, or via command line in OpenSim? If you haven’t already done so, try the terrain-load command like this:
1.: Change to the region you want to change the terrain by typing: change region XYZ (where XYZ is the name of the region)
2.: Load the terrain by typing: terrain load ./xyz.raw (xyz.raw is the name of the .raw file of the terrain). Make sure the path is right. ./xyz.raw assumes the raw file is in the /bin folder of OpenSim. If it’s in a subfolder or an entirely different folder on your computer, the path might be a little more complicated.
3.: You should see the terrain loading inworld, when you’re on or next to the according region.
Greetings
V
[Reply]
Annabelle on 12.29.2010
Yeah! that got it ;-) So the region interface is not geared for mega regions?
Thanks so much for your help!
A
[Reply]
V on 12.29.2010
Hi Annabelle,
the region interface and the estate tools aren’t all that useful to begin with, and when you’ve got access to the server side of your OpenSim installation, the console commands or database editing work much better and more reliable than any inworld tool. It takes a little getting used to it, but when you get the hang of things, it’s easy.
Personally, I only use the estate tools to change terrain textures (because finding and replacing the UUID in the db can be a bit complicated).
Greetings
V
[Reply]