Tips
From OpenSimulator
(→Changing viewer start webpage in standalone mode) |
(→Making the server remember terrain, prims and other region storage changes after reboot) |
||
Line 67: | Line 67: | ||
=== Making the server remember terrain, prims and other region storage changes after reboot === | === Making the server remember terrain, prims and other region storage changes after reboot === | ||
− | First off you should copy the OpenSim.ini.example to be your OpenSim.ini file. This file has all the settings etc that you need to configure the server. The default has a default of storing to null which does not save anything. In order for terrain and prims to be remembered you must comment out --- storage_plugin = "OpenSim.Data.Null.dll" --- and uncomment one of the others. The easiest one requiring no extra setup is --- storage_plugin = "OpenSim.Data.SQLite.dll"--- which un-commenting will make work. | + | First off you should copy the OpenSim.ini.example to be your OpenSim.ini file. This file has all the settings etc that you need to configure the server. The default has a default of storing to null which does not save anything. In order for terrain and prims to be remembered you must comment out --- storage_plugin = "OpenSim.Data.Null.dll" --- and uncomment one of the others. The easiest one requiring no extra setup is --- storage_plugin = "OpenSim.Data.SQLite.dll"--- which un-commenting will make storage work. |
Revision as of 13:28, 27 July 2008
Terrain Tidbits
How can I flatten a region?
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:
change-region YourRegionName script 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
What programs can I use to create terrains for 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!
Where do I put the files for my terrains?
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).
How do I change the terrain for a group of sims?
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
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.
How do I load a terrain file on startup?
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)
How do I import into OpenSim the terrain shape of my Second Life sim?
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
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.
Making the server remember terrain, prims and other region storage changes after reboot
First off you should copy the OpenSim.ini.example to be your OpenSim.ini file. This file has all the settings etc that you need to configure the server. The default has a default of storing to null which does not save anything. In order for terrain and prims to be remembered you must comment out --- storage_plugin = "OpenSim.Data.Null.dll" --- and uncomment one of the others. The easiest one requiring no extra setup is --- storage_plugin = "OpenSim.Data.SQLite.dll"--- which un-commenting will make storage work.