July 2008

You are currently browsing the monthly archive for July 2008.

Today is a historic day indeed the opening of a public bridge between the Second Life Preview Grid and the Opensim Grids who choose to participate.  Now for the uninitiated the bridge looks something like the following (image thanks to Crooked Brains):

It is narrow a bit wobbly, but it is really a masterful start and a further signal of Linden Lab’s strategy to open the architecture.

There are limits of course, no inventory is transferred so your fancied up SL avatar will appear in Ruth format with an empty inventory.  But if you only focus on the limitations, you might miss the big picture.  Opensim is have fantastic success, with 26 grids registered hosting approximately 2300 regions.  The SL grid has 28070 regions.  By these numbers Opensim grids combined are about 8% of the size of the entire SL grid, and I for one know there are many singleton Opensim regions waiting to go public.

SL’s Columbus has arrived in the new new virtual world and Opensim residents represent the native population.  So far, it is all turkeys and cranberry sauce.  I can’t wait for the next 12 months.

Here are some key links:

Ok, so you’ve spun up a new Opensim and logged in a couple times.  You are the proud owner of a big mound of grass in the middle of an infinite ocean.  Is that all there is?  Of course not.  In this tutorial, we will explore how to create a custom terrain using Bryce

Jane on Default Opensim Terrain

Jane on Default Opensim Terrain

You can of course create a terrain with MSPaint or other more sophisticated 3D landscape generating packages like L3DT, but I have always had a love for Bryce’s fantastic landscapes long before the availability of shared 3D spaces.  Embedded in it is a nice little Terrain editor and I was curious whether I could walk upon a Bryce terrain.

A couple things.  1) This is not a Bryce tutorial, although I’ll try to take you through the steps in case your Bryce usage is rusty.  If you don’t know anything about Bryce, just skip ahead and grab the texture image to use as your new terrain.  2) This tutorial was built/tested with Opensim 0.5.8.

Step 1 - Launch Bryce and Create a Terrain

Along the top, look for the mini-terrain icon and click it.


Creating a Terrain in Bryce

Creating a Terrain in Bryce

You should get something like the following.

Click on the “E” next to the terrain to enter the terrain editor.

Step 2 - Edit the Terrain

I won’t go into details here on the Bryce Terrain editor but it is basically a mash-up of painting tools and pattern/noise generators. In terms of using it for Opensim, I’ve found it is a bit challanging for fine grained controls.  The terrain editor looks something like this:

Bryce Terrain Editor

Bryce Terrain Editor

Step 3 - Avoid Gottchas

A couple lessons I learned.

  • A dramatic landscape in Bryce becomes a REALLY dramatic landscape in Opensim.  Less is more, use Lower and Dampen.
  • Avoid spikey, drastic changes in elevation, veritical cliffs don’t show all that well
  • Experiment with New and the drop down under Fractal to get some unusual terrains
  • Avoid a terrain that runs up to the edge

If you have a terrain that is not black at the edge, it will also not have zero elevation in Opensim.  This leads to some interesting visual artifacts.  Below is a terrain without black edges and one screen capture of how it looks in Opensim.

Bryce Terrain

Bryce Terrain

The above terrain loaded into Opensim.  Notice the artifacts at the non-black edges.

Terrain Artifacts

Terrain Artifacts

To avoid this, use the Round Edges control.

Step 4 - Export Your Terrain

Once you get the terrain looking like you want, the next step is to export it to an image file.  At the top of the main editing window inside the terrain editor, there is a drop down.  Select Export Image.  You have the option of PNG and TIFF.  Choose PNG and save it either alongside your Opensim.exe file or in a path that is easy to type (e.g. c:\terrains)

Export Image from Bryce

Export Image from Bryce

Here is the terrain image I ended up with (click on this and download it to use if you like).  You’ll notice I tried to edit in an inlet for water, and a few flat spots to build on along with a “secret” narrow passage through the ridge line to another over look.  This was done using the Bryce drawing tools and where the whole Bryce terrain editor thing broke down for me.  It is likely the best workflow is to generate the basic terrain and do hand editing in the Opensim client.

Bryce Terrain Final

Bryce Terrain Final

Step 5 - Load the Terrain in Opensim

The file you want to load needs to be .r32 (raw 32-bit), .png, or .bmp.  I did not have success with .jpg at least in the version of Opensim I was using.

Spin up Opensim (remember to run it as Administrator on Vista).  Once it spins up, issue the terrain load command.

terrain load <file path/filename>

Example:

terrain load c:\terrain\myterrain.png

Loading A Terrain Opensim CLI

Loading A Terrain Opensim CLI

You will see either a success message or some complaint.

Step 6 - Login to Opensim and see your results

Here I am flying around in the new terrain. 

Bryce Terrain Loaded in Opensim

Bryce Terrain Loaded in OpensimHere is the terrain from aerial view rendered in Bryce.Bryce Render - Aerial View

 And finally, an aerial view of the same terrain in Opensim.  Love the waves, love Windlight.

Aerial View in Opensim

Aerial View in Opensim

Would you like a tutorial on how you tune the textures on your new terrain?  If you’re an estate owner in Second Life, this may not be required.

Well I thought I would try publishing my first lively space to the blog. There are at the time of this writing 71 space “templates” available. I picked “Superhero Underwater Headquarters”. No, I never was a big fan of aqua-man, but this seemed the most interesting space after a quick browse.

I splattered in some seating arrangements, a clock, TV, found some cool purple lanterns that give off butterflies which I thought was a nice touch for an underwater lair. Drop in a check it out here:

My main gripes so far are as follows:

  • Lack of ability to create my own content, I found this one of the most fun aspects of SL, in Lively I feel more like a decorator
  • No basic keyboard movements keys WSAD please!
  • No ability to re-size objects at least that I could find, move and rotate only. Object orientation seems to also be automatically attempted. So placement and rotation and relative scale was tricky
  • The photo gadgets which would allow you to place any Internet image onto a surface are “off-line” per support. This could be a legal or porn issue, not sure but I have no real way of customizing my space with my own content other than You Tube video streaming which lacks even basic controls.

My first press article… ever

MIT Technology Review

http://www.technologyreview.com/article/21100/

 <<Previous Section     Tutorial Start

In part 5 of this tutorial, we will finally get Opensim running. After a few edits to some config files you will be able to fire up your first sim.  My apologies for the delay of this final installment which may have frustrated a few of you, I got caught up in the Google Lively launch.

Step 1 - Start the Opensim.exe application

Find the Opensim.exe in an explorer window.  Right click on the file and select “Run As Administrator”.  If you don’t do this, it won’t work.  A windows command shell will come up and you will see messages indicating Opensim is starting up.

Step 2 - Enter First Time Startup Data

The first time you do this you will either get errors or be prompted for some default information.  If you get errors it is likely that you did not configure the database settings properly or your firewall is hindering your progress.  Below are the prompts and what they mean.

DEFAULT REGION CONFIG

  • Region Name [Opensim Test]:
    • The name of the your new Sim, you can safely change this but keep it short and one or two words, I no evidence to suggest it would not work with a long sentence, but based on SL sim naming conventions I’m suggesting you adhere to this if you are not a developer.
  • Grid Location (X Axis) [1000]:
  • Grid Location (Y Axis) [1000]:
    • Starting location in the world for your avatar.  Keep defaults.
  • Internal IP Address for incoming UDP client connections [0.0.0.0]:
    • Should remain 0.0.0.0
  • Internal IP Port for incoming UDP client connections [9000]:
    • Modify only if you are planning to use a different port or expose your sim to the internet
  • External Host Name [127.0.0.1]:
    • Modify only if you plan to login to this sim from elsewhere
  • First Name of Master Avatar [Test]:
    • First name of your main avatar
  • Last Name of Master Avatar [User]:
    • Last name of your main avatar.  Yes, you can pick this in Opensim :-).
  • (Sandbox Mode Only)Password for Master Avatar Account [test]:
    • Password for your avatar

At this point the Opensim server should be up and running

Step 3 - Login with your SL Client

You can’t just login with your Second Life client because it has no way of knowing about your Opensim server.  You need to launch the SL client with some command line parameters to tell it to use Opensim vs. the SL grid.  Open a command window and navigate to the directory where you installed Second Life.  You should find SecondLife.exe  You can then type in “SecondLife.exe -loginuri http://localhost:9000/ -loginpage http://localhost:9000/?method=login“  Replace localhost:9000 with the server/port in question if you have modified the defaults above.

Start Building.  Or if you are so inclined learn how to create your own custom terrain here

<<Previous Section     Tutorial Start

 

Well it’s official Google has invited themselves to the virtual world party with Lively. Here are some early press links to explore along with thoughts from some of the technology leaders in the space:

<<Previous Section Tutorial Start Next Section>>

In part 4 of this tutorial, we will finally get into some Opensim s**t. After a few edits to some config files you will be ready login to your own sim.

Step 1 - Install (Unzip) Opensim

Installing Opensim is not really like installing a regular application at this point. There is no click though forehead installer. However, installation cannot be easier. Simply upzip/extract the zip file it comes in. For me the zip file I downloaded was opensim-bin-0.5.8. After extracting, I had a directory named opensimbin. Note, this was different from 0.5.5 where there was an opensim/bin directory structure.

Step 2 - Find and Rename the MySQL Connection Initialization file.

The first thing we need to do is tell Opensim where to find the MySQL database and how to connect to it. Find the file mysql_connection.ini.example.

NOTE: You may only see mysql_connection.ini. In reality this file is actually named mysql_connection.ini.example. You may not see the .example unless you have enabled file types. If you have not enabled file types in Vista then do so. To do this select the opensimbin folder and then from the Windows Explorer menu select “Organize” and then “Folder and Search Options” from the drop-down list. Go to the “View” tab and uncheck “Hide Extensions for Known File Types”.

We want to change this from an example to the real thing, so create a copy and rename it to “mysql_connection.ini”. Accept the change when Windows complains about changing the file type.

WARNING: Rename the mysql not mssql file. I’ve gotten the wrong one several times. Not mSsql file, rather mYsql.

Step 3 - Edit the mysql_connection.ini file

Now that you have created the mysql connection file let’s edit it and tell it how to reach our database. Open the mysql_connection.ini file using whatever editing program you like. I’d suggest wordpad as it deals with line wrapping pretty well. There are only a few lines to edit.

  • hostname=localhost
  • database=<name of your database, mine was opensimdb>
  • username=<name of your user, mine was opensimdbuser>
  • password=<password you set for this user>

Step 4 - Find and Rename the OpenSim Initialization File

The next part of the configuration is to tell Opensim to use MySQL vs. other databases. We need to copy and rename the example initialization file like we did in step 2. Find the file OpenSim.ini.example. Copy it and rename it to “OpenSim.ini”. Tell Windows to bug off and accept what you are trying to do.

Step 5 - Edit OpenSim.ini

There are several changes we want to make in this file. The main one is to tell Opensim to use MySQL as the datastore for everything. The second one is to enable the more sophisticated physics engine. If you don’t you won’t be able to walk on any prim, instead you will just walk through the prims.

Find and replace the following items:

  • Change the storage plugin from Null to MySQL
    • Change: storage_plugin = “OpenSim.Data.Null.dll”
    • To: storage_plugin=”OpenSim.Data.MySQL.dll”
  • Add a semi-colon to the following line (this comments the line out or tells Opensim to ignore it).
    • storage_connection_string=”URI=file:OpenSim.db,version=3″
  • Remove the semi-colon on the following line and add your database information.
    • ;storage_connection_string=”Data Source=localhost;Database=opensim;User ID=opensim;Password=*****;”;
    • storage_connection_string=”Data Source=localhost;Database=<your db>;User ID=<your user>;Password=<yourpassword>;”;
  • Comment out (add a semi-colon to the front of basic physics and uncomment out OpenDynamicsEngine). IT should look like this when you are done.
    • ; Choose one of the physics engines below
    • ;physics = basicphysics
    • ;physics = POS
    • physics = OpenDynamicsEngine
    • ;physics = modified_BulletX
  • Change the inventory plugin to MySQL and add a inventory_source string for MySQL. It should look like the following:
    • ; Inventory database provider
    • ; inventory_plugin = “OpenSim.Data.SQLite.dll”
    • inventory_plugin = “OpenSim.Data.MySQL.dll” <– Change to MySQL
    • ; inventory_plugin = “OpenSim.Data.NHibernate.dll” ; for nhibernate
    • ; Inventory Source NHibernate Example (DIALECT;DRIVER;CONNECTSTRING)
    • ; inventory_source = “SQLiteDialect;SqliteClientDriver;URI=file:Inventory.db,version=3″ <– Comment out by adding a semi-colon
    • inventory_source=”DataSource=localhost;Database=<your db>;User ID=<your user>;Password=<your password>;”; <– Added this line
  • Do the same thing for Asset and User sections (change the plugin and add the following lines

That’s it! Next, lets fire up that new server.

<<Previous Section Tutorial Start Next Section>>

<<Previous Section Tutorial Start Next Section>>

In part 3 of this tutorial, we will be installing and configuring MySQL and creating the database to house our Opensim virtual world. At this point, you no longer need to be connected to the Internet.

Step 1 - Install MySQL

Go to the location you downloaded MySQL and run the installer. In my case, mysql-essentials-5.0.51b-win32. Accept all the defaults and the installation will begin. Of course, inform Vista again that it is ok in fact to install something.

Leave the “Configure the MySQL Server now” checked and click “Finished”

Step 2 - Configure MySQL

For me, the MySQL configuration wizard never started, I’m not sure why. To configure MySQL, go to My Programs->MySQL->MySQL Server 5.0->My SQL Server Instance Configuration Wizard. Accept all defaults and make sure to remember the password you pick for root access to MySQL.

Step 3 - Install MySQL GUI Tools

Once MySQL is installed and up and running you can install the GUI tools which we will use to create our Opensim database. Go to the place on your harddrive where you saved the GUI tools download and run the installer. For me this was mysql-gui-tools-5.0.r12-win32.

Step 4 - Login to MySQL AdministratorMySQL Login Page

The next step is to login to the MySQL Administrator so you can create a user and database that the Opensim server will use to store all its data. Go to All Programs->MySQL->MySQL Administrator.

At the login screen type the following:

  • Stored Connection: <leave blank>
  • Server Host: localhost
  • Username: root
  • Password: <the password you entered in Step 2>



Step 5 - Create a User

On the left hand nav, select “User Administration”. In the lower right, click “Add new user” button. This will be the user that is used to access the database, not an Opensim user. I used “opensimdbuser”, but you can call it whatever you like (I suggest no spaces or odd chars though). Then pick a password. Click “Apply Changes”.

Step 6 - Create a Database

Back on the left hand nav, select “Catalogs”. Now the mystical part, to create a new database, you have to right click in a blank area below Catalogs in the section labeled “Schemata” and select “Create New Schema”. I called mine “opensimdb”.

Step 7 - Grant the User Access to the Database

The final step is to grant the user full access to the new database (schema). To do this, navigate back to “User Administration” and select the user you created in the lower left hand panel. The user properties will appear to the right. Select the “Schema Privileges” tab. On this tab are all the schemas. Select the “opensimdb”. You will see assigned privileges and available privileges. By clicking the double arrow button “<<” you can quickly assign all privileges to the user.

Make sure to hit “Apply Changes”. It should look something like this:

At this point, the database is ready to use, we just need to configure Opensim to use it.

<<Previous Section Tutorial Start Next Section>>

<<Previous Section Tutorial Start Next Section>>

In part 2 of this tutorial, we will download all the necessary components to setup and run a virtual world server all for free. We will be using the Opensim server on Windows Vista operating system with a MySQL database.

Step 1 - Preparing the List

You will need to download four things for this project:

  1. MySQL Community Edition
  2. MySQL GUI Tools (optional if you know MySQL well, recommended if you don’t)
  3. An Opensim Build
  4. A Second Life client (Any Linden Lab client should work)

Step 2 - Download MySQL

Ever since MySQL went commerical, the community tools are a bit obscurly located IMO and of course may move again by the time you read this. Go to http://www.mysql.com. Navigate to “Downloads” then to “MySQL Community Server”, then “Community Downloads”

For this tutorial, I used the MySQL 5.0 Community Server GA edition. Pick “Windows” assuming you are following along for a Vista install. What you want now is Windows Essential (x86). When I downloaded this, I was using MySQL 5.0.51b.

MySQL Download Page

Select “Pick a Mirror”. At this point you are asked to register, very sneaky! Look below all the registration graphics and you’ll find a link “No thanks, just take me to the downloads!”. Select this and you’re off and running. Select HTTP next two a mirror site close to you for best speed. Save the file to a download location on your PC.

Step 3 - Download MySQL GUI Tools

Next you want the GUI tools, these are optional and if you know how to use the MySQL command line interface feel free to skip this step. However, if you are new to MySQL, then I would suggest downloading these tools. The GUI Administrator will be used in this tutorial to setup the database.

Navigate back to MySQL 5.0 Downloads page. On the left hand nav, you’ll see the various versions of the MySQL Community Server. Look below these and you’ll see a link that says “GUI Tools”. Click on this and then select MySQL Administrator. Scroll down a little bit and you’ll find the Windows (x86) version with the same “Pick a Mirror” link. I used version 5.0-r12.

Follow the same download procedure you did for MySQL.

Step 4 - Download Opensim Server Build

Head over to the Opensim project web site. Select “Downloads” and mostly ignore the instructions as they are geared toward someone who is planning to get the source code and build the project.

Opensim Wiki

Scroll down a bit and select the offical builds, ZIP file. As I wrote this I picked Opensim 0.5.8 and just yesterday it was 0.5.5 so things are moving quickly on this project.

Step 5 - Download A Second Life Viewer

If you already have the Second LIfe client installed on your machine you don’t need to do anything. If you’ve never used Second Life before, than you may want to do so before proceeding with this project. To get the latest Second Life viewer go here. This tutorial assumes we are installing all components on one Vista laptop so get the Windows version.

<<<Previous Section Tutorial Start Next Section>>

If you’ve have ever wanted your own Second Life Island/Estate but didn’t want to pay the $1700 bucks plus $300/month fees for it, then this tutorial series is for you.  I will take you through downloading, installing, and configuring an Opensim standalone server on Windows Vista using the community edition of MySQL. It is all free of charge thanks to many others who are forging a freely available virtual world platform.
Freshly Spun-up OpenSim Server
If you are not a developer, no worries, we will not be building any source code, downloading any version of Visual Studio, or learning how to use subversion. You will have to edit a few config files though and create a database so roll-up your sleves and prepare to get a little dirty.  

All in all, I was pleasantly surprised by how quickly and easily it was to get a Sim up and running.  I’d estimate this process will take you a few hours.

If you are unfamiliar with Opensim project, then now is a good time to get acquainted with it.  Opensim is basically an open source virtual world platform that acts and behaves very much like Second Life.  The approach being used it basically to reverse engineer the Second Life backend given knowledge gained by Linden Lab open sourcing the Second Life viewer and the work done by a group called libSecondLife

An Opensim server is not connected to the Second LIfe grid, but there are various Opensim grids already coming into existence (some of these I’ll explore later).   You will not be able to export your Second Life objects/avatars and import them into your new sim, but you can re-build your objects and reuse your LSL scripts.  There are many limitations relative to SL like no currency/economy structure, however, for a cost free ability to experiment with a SL island/estate there is no better alternative.

This post will be updated with all the tutorials as I complete them:

When you are done you will have a whole sim to yourself along with your crispy new avatar, you’d better get building.

Please let me know if you encounter anything that is confusing, any new gottchas I should point out, or any inaccuracies and I will make updates.