Setting Up A Stand Alone Sim

Microsoft .NET Framework
When you fire up the stand alone version as discussed on thom's guide you may be told that you need to install Microsoft .NET Framework. This is the set of common language routines and interfaces that MS uses to make the .NET Visual Studio software system processor independent. Oh well. Anyway you can download the version you want at: Microsoft Framework .NET Download
I used version 2.0. There is version 3.5 available. I will ask the OpenSim developer guys what they recommend.

Configuration Fun
Files discussed, found in your bin file: (in my case: C:\Program Files\OpenSim\opensim-bin\bin)

  • OpenSim.ini.example
  • OpenSim.ini
  • startup_commands.txt

Persistence means that the assets in your inventory and in the scene on the sim are preserved or kept from session to session. To do this the program has to maintain several databases to store the information. The stand-alone version of OpenSim takes care of starting up all of these information stores when you invoke OpenSim.exe. However, the default case is that no information is stored or saved between sessions. OpenSim chooses which storage to use from three options: Null, Sqlite or MySQL by looking in the file OpenSim.ini. This file has the NullStorage option selected by default. Our goal will be to change this file to allow for asset storage.

When you run OpenSim for the first time it will generate the opensim.ini and startup_commands.txt files.

The first thing is that you want to inspect and reflect on the following file: OpenSim.ini.example I used this guy to start finding out what the various switches for setup are. I use TextPad to look at text files, but MS NotePad works fine too. Also, the info at xxx is quite helpful.

You will notice the following lines:

; *** Prim Storage - only leave one storage_plugin uncommented ***
; —- The NullStorage stores nothing - effectively disabling persistence:
; storage_plugin = "OpenSim.DataStore.NullStorage.dll"

; —- To use sqlite as region storage:
storage_plugin = "OpenSim.DataStore.MonoSqlite.dll"
storage_connection_string="URI=file:OpenSim.db,version=3";

; —- To use MySQL storage, supply your own connectionstring (this is only an example):
; note that the supplied account needs create privilegies if you want it to auto-create needed tables.
; storage_plugin="OpenSim.Framework.Data.MySQL.dll"
; storage_connection_string="Data Source=localhost;Database=opensim;User ID=opensim;Password=*;";

Note that the ';' character at the beginning of the line indicates that the line is a comment and is not to be evaluated.

Here's what you will find in the OpenSim.ini file regarding storage after successfully starting up OpenSim the first time

storage_plugin = OpenSim.DataStore.NullStorage.dll
asset_database = sqlite

Since the Sqlite database is very easy to set up (and I havent tried the MySql approach yet) let's go with the Sqlite option.
To do that change the OpenSim.ini file to look like the following by commenting out the NullStorage option and by copying the next two lines from OpenSim.ini.example. Make sure the little commenty buggers are removed.

;storage_plugin = OpenSim.DataStore.NullStorage.dll
storage_plugin = "OpenSim.DataStore.MonoSqlite.dll"
storage_connection_string="URI=file:OpenSim.db,version=3";

So that's all there is to it - all you have to do is start up OpenSim.exe again and your assets and scene contents will be preserved!

Well, hah hah, not quite. This will work ok but there appear to be some identity problems with assests. I have notes on the OpenSim Work Arounds page that discusses how to make sure that stuff gets saved in all the right places.

Physics
When you start up and start scattering objects around your sim you will find that you are able to walk right through them. This is because the default physics engine does not evaluate object collisions, except for avatars and the ground. (Whew! thank goodness for that!) This is a useful feature while the developers are trying different pieces of code out and don't need to have the overhead of a physics engine whirring away to invoke the Pauli exclusion principle for virtual fermions.

We however in our explorations of OpenSim life would like to build things and stand on them, climb on stairs, etc. The miracle of OpenSim V 0.4 brings this to us at the expense of some loss of briskness in response. It is pretty awesome what V0.4 can do already!

A quick glance at the OpenSim.ini.example file shows the following:

; Choose one of the physics engines below
physics = basicphysics
;physics = POS
;physics = OpenDynamicsEngine
;physics = modified_BulletX

The basicphysics engine is the default physics engine that doesn't know much about quantum mechanics.
So far I have just tried the OpenDynamicsEngine physics engine.

I have modified my OpenSim.ini file to have the following line:

physics = OpenDynamicsEngine

If you just make this modification to OpenSim.ini, save and restart OpenSim.exe you will find that now you go bonk when you walk into objects. I will follow up later with observations about how well the engine works. Note that you will find that things slow down a lot with this engine, but hey! its a great start.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License