Terrains

This article by Graham Mills_2 was originally published in SOTK Newsletter 28th March 2016 and makes extensive reference to Kitely-specific aspects of terrain.

Some caveats

Graham decided to learn a little more about OpenSim terrain by compiling this article from existing sources (gratefully acknowledged). It is not a comprehensive guide, more an overview. You are advised to backup any existing terrain before experimenting. Please share any tips or corrections on the Kitely forum.

Note that Kitely now handles terrain files in part outside the viewer. Downloads are initiated in the viewer, typically in the World>Region details>Terrain dialog, but completed via a web link provided almost immediately in a viewer message. Uploads are similarly made via the web using the same dialog used for OAR files in the world management page.

Although the basic region size is a 256x256 m square, Kitely provides a range of options up to 64-fold larger, i.e. 8x8 units, a roughly 2x2 km square. While Second Life(TM) region terrains are compatible with OpenSim, not all Second Life tools will necessarily work at this scale.

Aims

Creative use of terrain allows you to introduce features such as beaches, rivers and mountains all the while subtly guiding the movement of visitors and progressively revealing viewpoints, caves, waterfalls and plantings. A suitably rendered landscape can form the basis for a storybuild which develops as the avatar explores or alternatively divide a world into themed areas for particular activities. Of course, it is usually desirable to restrict the ability to terraform and this option is on the World>Region details>Region tab in Firestorm.

OpenSim terrains can be sourced from Kitely Market (under landscaping) or the web (SL terrains work as well), either as RAW textures or as part of OAR files. When uploaded the RAW files define the terrain height with complementary textures (e.g. sand, grass, rock, snow) automagically mixed in according to height. The height at which these TGA-format tiled textures take effect can be controlled via the viewer terrain dialog.

For those with the necessary skill and patience inworld editing can be used to model the terrain (the range of brushes is notionally extensible when working on a local server). However, features with overhangs such as caves cannot be modelled this way (the underying heightmap can only accommodate one elevation value per metre) and are best implemented by importing suitable mesh landforms, e.g. from Kitely Market (under landscaping) or Outworldz.com.

Terrain sources

  • Linda Kellie terrains
  • User Fritgern and others: http://opensimulator.org/wiki/User:Fritigern/SandBox
  • (Seanchai Mall will have links inworld to terrain files; Seanchai Library group membership normally required)

Editors and terrain file format

Another approach to creating terrains is to use an editor to create the RAW file which is a 13 channel texture in which the first three channels (values 0-255) are used to store height (red channel), a multiplier (blue) and the sea level (green; normally 20 m in Kitely and set in the client). Other channels are used to store parcel information etc. The multiplier is applied as channel 1 * multiplier / 128 so the maximum height is about 512 m. Note that very high mountains and steep slopes tend to look sub-optimal and imported mesh may be a better option. Again, Kitely Market has suitable products for cliffs and world surrounds.

While you can create, view and edit RAW files in various image and mesh editors, including PhotoShop and Blender, the less artistically inclined can use a program such as L3DT, Terragen or TerreSculptor to generate semi-random terrain for subsequent modification.

Downloads

  • L3DT standard: http://www.bundysoft.com/L3DT/downloads/standard.php
  • TerreSculptor: http://www.demenzunmedia.com/home/terresculptor/
  • Terragen 4 (no terrain export in free version): http://planetside.co.uk/free-downloads/terragen-4-free-download/

Tutorials and tips

  • L3DT tutorial: http://opensimulator.org/wiki/Using_L3DT
  • Vanish's tutorial on using an earlier version of Terragen: https://web.archive.org/web/20130403031215/http://opensim-creations.com/2010/06/05/howto-create-megaregion-terrain-raw-files-for-second-life-and-opensim
  • Bailiwick (for editing channels): http://www.spinmass.com/Software/BailiwickInstruct.aspx
  • Tips: http://opensimulator.org/wiki/Tips#Terrain_Tidbits
  • More tips: http://wiki.secondlife.com/wiki/Tips_for_Creating_Heightfields_and_Details_on_Terrain_RAW_Files
  • Megaregion terrains: http://www.hypergridbusiness.com/2012/09/how-to-make-megaregionterrains/
  • Blender (see also SL Primstar-2): http://blog.nalates.net/2011/10/09/opensim-terrain-tutorialvia-blender-part-1/

Note that some of these tutorials are old and software versions may have changed such that the instructions no longer apply.

Resizing terrains

Kitely residents can use Kitely resizer to expand terrain to cover larger worlds (or vice versa) https://www.kitely.com/virtual-world-news/2015/05/02/resize-kitely-worlds-using-agraphical-tool/

A brief overview of L3DT

L3DT is relatively straightforward to use. A basic terrain can be created using either the designable map option or a Perlin noise algorithm. This can be edited in a 3D view and exported as a mesh, terragen, png or RAW file although the latter is not in a format suitable for uploading. Historically Bailiwick has been used in Windows to add the missing channel data OpenSim expects of a RAW file but the program is no longer maintained and is constrained to 256x256 m regions. The server-based Sim-on-a-Stick accepts png files but also defaults to a single region unless updated (see below). It will, however, load terragen format files.

2017-03-18_20-45-06.png
L3DT designable map imported into SoaS via console as terragen file

An example of a real-world terrain

Formerly the tutorial used Terrain.party as an example but the download function now appears to fail

A number of terrains of roughly 2 km square can be downloaded from https://houseprices.io/lab/lidar/map.

Sculpt previews

Although a somewhat outdated and inefficient technology, inworld renders of terrain can be readily generated using sculpted prims. Rightclicking the world map in the Cool VL viewer allows you to save the map texture and a sculpted prim texture in either plane or spherical format. For large regions/worlds you may have to split the sculpted prim texture in an image editor such as IrfanView and upload each 256 m unit texture in lossless format. http://sldev.free.fr/TerrainSculptor/index.html

Simple terrain sculpts can be made online: http://svc.sl.marvulous.co.uk/raw2sculpt-3.2/raw2sculpt.html

Terraforming in Sim-on-a-Stick Sim-on-a-Stick (also known as SoaS) is a somewhat venerable version of OpenSim (8.0 postfixes). Once installed it is run offline (indeed, even from a USB stick) and can be a good choice for schools not wishing to use public grids. It can also be upgraded by following the instructions on the website and this will currently be required for full varregion support. To expand the default 256x256 m region, edit RegionConfig.ini in the bin/Regions folder by adding SizeX = 512 SizeY = 512 to the end of the first region definition (whose lines are not preceded by a semi-colon).

When the update has finished, first run MOWSE in the SoaS root folder and then opensim.exe from the diva-r25084/bin folder. There is a notecard explaining avatar login. Wait for the text-based console to load. Help is available by typing help all or, for our purposes, help terrain. Useful commands include:

  • terrain fill 21 (levels terrain at 1 m above default sea level)
  • terrain load fname (where fname is the name of a RAW, png, terragen or other format file in the bin folder; avoid spaces in fname or enclose in double quotes)
  • terrain save fname (save in RAW format for subsequent import into Kitely via the client; alternatively import as OAR)
  • terrain elevate 1.0 (raise terrain by 1 m)
  • terrain multiply 1.5 (multiply all height values by 1.5)
  • terrain effect ChannelDigger (creates 8x8 grid)
  • terrain newbrushes true (modifies final three brushes on inworld dialog to support erosion; useful for smoothing jagged contours; set to false to revert)

Note that SoaS also has commands to rotate, scale and translate all the objects in a sim (the scene). See help Objects.

  • http://simonastick.com/
  • Use in primary schools: https://sites.google.com/site/virtualworldsprimary/simonastick
  • Running SoaS on a Mac (by Dot): https://www.kitely.com/forums/viewtopic.php?f=10&t=2997&p=17749

Maperitive To make a low resolution mesh terrain of a real location together with an associated map texture:

  1. download and install Maperitive (PC only) from http://maperitive.net/
  2. locate the place you want to map (make it region-size or thereabouts, i.e. not countryregion or country size)
  3. choose Tools>Export To 3D and save the COLLADA/dae file
  4. import to Sketchup (formerly Google, now Trimble -- I used v8; you will get errors - just ignore them) and export in the same format
  5. upload the file to OpenSim. The mesh should appear in your inventory when upload is complete; you just need to rez it. The mesh will be large by default and most likely requires some expertise in order to cam and move it into position. The low-res textures are cc-by-sa OpenStreetMap Project.

Flattener This is one example of a scripted tool for inworld terraforming. It's especially useful when you want to flatten a small area at a specific height. https://www.kitely.com/market/product/3835590/Land-Flatterner

Bulldozer Terrain Tool A more sphisticated tool that allows you to create sloped terrains. https://www.kitely.com/market/product/14006089/Bulldozer-Terrain-Tool