Tips/ru

From OpenSimulator

Jump to: navigation, search


Корректировка ландшафтной среды

Как быстро ровнять уровень земли в регионе на указанную точку?

When you have multiple regions, that you need to terraform to a certain height, the quickest way to do it is by selecting a region, and fill the terrain to the specified height:

(as of version 0.6.3.8730)
change region YourRegionName
terrain fill 20

Note: Remember to change to the region you wish to modify if that is the only region wish to make changes to. Without using the change-region command, you may very well end up flattening multiple regions!

As of SVN 4061

 terrain fill 25

Какие программы я могу использовать, для создания ландшафтной среды совместимой с OpenSim?

If you are after simple terrain files (jpg, gif, etc), you can use Photoshop or any number of freeware programs, like Gimp. If you want more complex terrains, you will need programs that output to standard 3d raw format (aka r32 or r64). L3DT and Terragen are two of the top commercial programs for this. (anyone know of a freeware one?), or you could, with some practice, use Blender. The free version of L3DT can make terrains up to 2048x2048 in size, or 8x8 regions. You can use `terrain load IMG yourfile.png` to load greyscale PNG files. Remember to use something like `terrain rescale 0 25` to make it visible. Here is some info on Using L3DT to make a terrain.

You can also use http://lab.parkstudio.ru/terra/ if you know a bit about heightmaps and how they work. Just set the custom landscape texture gradient to pure black and pure white and turn off water. And here are some Free Terrains that you can use. Enjoy!

07/2012: Wordfromthe Wise: The Website of parkstudio is ofline. You can find the Flash files and a fully working website here : http://wonderfl.net/c/1DLK

Additional Terrain Related Info: Artist Home#Terrain

Куда кидать файлы с ландшафтной средой на сервере?

This one is actually pretty simple, but first the 'hard' answer: anywhere in the PATH will work. Lost? yeah, I was too, so... just drop the file into the bin directory (right where your OpenSim.exe file is).

Как изменить ландшафт для целой группы регионов?

First, the file must be in f32 (or f64?) format. This is easy to do with L3DT's export feature. (Use the RAW format and set the options to Y flipped = true and at the bottom, change it to read 'float' instead of 'ushort'). It also needs to be a file that will cover each sim in a 256x256 layer (so, for 2x2 regions, you need a 512x512 file), It is very important that you rename the file extension to .r32 for the import to properly work. Then, once you have it saved, on the OpenSim.exe console, type in:

script terrain load-tile <filename> <image X> <image y> <bottomleftsim X> <bottomleftsim y>

For example, I run a square of 4 sims in a 2x2 pattern. I started my sim placement at 0, 0 and ended at 1, 1. my line reads:

script terrain load-tile simalpha.r32 512 512 0 0
script terrain load-tile simalpha.r32 2 2 0 0 (Oudrun)

New syntax is using number of tiles instead of imagesize (one tile 256x256 pix). Above example is for a 2x2 region terrainfile.

Next, before you log in, you may want to go to type in: *(THIS FUNCTION MAY NOT WORK)

script terrain multiply 0.4

This should scale it down from the nearly 300 meters altitude I ran into to something a little more reasonable for the minimap.

Как загрузить файл ландшафта при запуске сервера?

Edit the file startup_commands.txt in the bin directory and add the above commands "script terrain load-tile ..." and "script terrain multiply ..." one per line.

      • Notice this method is no longer required and should be considered a legacy function, Terrain persistance is now working 100%.

Terrain Tidbits brought to you by Tilde, with a few questions in IRC :) - Tilde 10:32, 15 August 2007 (PDT)

Как импортировать в OpenSimulator ландшафт местности из моего сима из Second Life?

First, assure you are in the right region if you have more than one, by using:

change region <regionname>

Then use the command (file extension now determines the format, use .r32 for L3DT terrains)

script terrain load <filename>

Watch this video for a step-by-step tutorial.

Other useless or useful info depending on who reads it

  • I found out that each point on the grey scale (0 to 255) equals approximately .23 to .25 meters in terrain height. - CharlieO
  • Also for those who want to manually edit a png file, you need at minimum 3 different shades of grey. and one has to be drastically different than the other 2 in order to have the height show correctly. - CharlieO
example:
 1) 0,0,0 
 2) 223, 233, 233 
 3) 255, 255, 255

Импортирование плоских файлов ландшафта - SL RAW (используя Photoshop)

1. Open Photoshop and:

  (a) Load desired SL RAW terrain file
  (b) Select canvas and then flip vertically, NOT
      horizontally
  (c) save file as a RAW file

If the SL RAW terrain file name is "[region name]_256_256.raw" then save the new RAW file as "[region name]_flipv_256x256.raw" or any other name to distinguish it from the SL RAW terrain file. The expression "flipv" stands for flipped vertically and 256x256 is the size for the 13-channel interlaced 8-bit RAW file.

2. Move the new RAW file or files to the Opensim bin folder

  (a) navigate to
      C:\Program Files\Opensim\bin [or whatever the path is]
  (b) copy each new RAW terrain file into that directory

3. Run opensim and in the console on the last line type:

  (a) change region [enter region name]
  (b) terrain load [enter name of new RAW terrain file]
  (c) terrain elevate [enter meters to elevate]
  

Do not type the square brackets and repeat the above commands for each region.

If the above commands are entered when the region is set to [root], then each region on the simulator will be affected. The only useful command in this case would be the terrain elevate command but only if the terrain is to be elevated by the same amount in each region.

How much to elevate the terrain depends on the multiplier used for the SL RAW terrain file (e.g. elevate terrain by 1.474 meters if the multiplier is 0.1016; i.e. value 12 in the green channel of the RAW file).

General Setup Tricks

Changing viewer start webpage in standalone mode

In order to change the page that the viewer starts in /opensim/bin/ there is a http_loginform.html.example page. Removing the .example will make this page be the start webpage which you can edit etc. Since the login html code is no longer needed this can be modified at will.

Placing data away from the code

A good set up, separates the code (replaced often in this project) from the data ("unique" and more valuable for the user). Things to do:

  • separate your region definitions by using the regionload_regionsdir value in the OpenSim.ini
e.g. regionload_regionsdir="../OSHirvi/Regions" places the Regions directory besides the "code directory" in a folder called OSHirvi
  • make your data persistent in a database (see above), this requires (again) to edit your OpenSim.ini file. You might use unique names to separate multiple setups within the database server you use.
e.g. storage_connection_string="Data Source=localhost;Database=OSHirvi;User ID=OSHirvi;Password=password;"; 
  • the next step is copying/cutting OpenSim.ini itself away from the code
p.e. place this file in ../OSHirvi/OpenSim.1.ini 
  • to point from your place ../ to your wanted runtime directory create a link (or some call it shortcut). If you download a newer build just change the link.
e.g. ln -s opensimservercode opensim-0.5.8.5695

Now create a script, and call it startHirvi.sh that:

a) gets it current directory in the code directory, found by the link
b) starts up OpenSim.exe with the required .ini file, by using the -inifile startup option. You can still add other options. 
cd ../opensimservercode
mono OpenSim.exe -inifile ../OSHirvi/OpenSim.1.ini -gridmode=true

Oke, done this you are left with a code directory still filled with runtime data, but this is just persistent temporary stuff that the server automatic rebuilds if it is deleted. Still a pitty there is no way to get it separate.

./addin-db-00
./addins
./OpaenSim.log and many others if you run in grid-mode
./estate_settings.xml and many other configuration settings

Deleting a few recently created prims

Occaisionally, one ends up with one or more prims that one would like to delete on a region but doesnt know where they are. Here is one possible solution to that problem.

Given the site, http://epochconverter.com, one can enter a human date and get a binary such as an epoch. For instance, 4/21/2008 19:00:34GMT is "1208797234"

Then, from a sqlite3 prompt or a mysql prompt, one can do:

select CreationDate from prims where CreationDate>"1208797234";
delete from prims where CreationDate>"1208797234";
Personal tools
General
About This Wiki