Zonja Capalini

Reverse-engineering OARs: Understanding parcel maps

Format 0.2 Opensim Archives (OARs) include, since Opensim version 3c271b, a “landdata” directory that stores parcel data. For each parcel in the region there is a file in XML format in the directory. Amost all objects in Opensim are associated with a unique uuid that identifies them, and parcels are not an exception to that rule. Files in the “landdata” directory use the uuid of the parcel as their filename and have a “.xml” extension.

What’s inside each one of these .xml files? Let’s take a peek at a sample one:

    <?xml version="1.0" encoding="utf-16"?>
    <LandData>
      <Area>6256</Area>
      <AuctionID>0</AuctionID>
      <AuthBuyerID>00000000-0000-0000-0000-000000000000</AuthBuyerID>
      <Category>-1</Category>
      <ClaimDate>1255170099</ClaimDate>
      <ClaimPrice>0</ClaimPrice>
      <GlobalID>bfbf7bd4-7d7b-4a35-aba0-c352201cddcf</GlobalID>
      <GroupID>00000000-0000-0000-0000-000000000000</GroupID>
      <IsGroupOwned>False</IsGroupOwned>
      <Bitmap>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
       AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
       AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
       AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
       AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
       AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
       AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
       AAAAP//fwAAAAAA//9/AAAAAAD//38AAAAAAP//fwAAAAAA//9/AAAAAAD//38AAAAAAP//f
       wAAAAAA//9/AAAAAAD//38AAAAAAP//fwAAAAAA//9/AAAAAAD//38AAAAAAP//fwAAAAAA/
       /9/AAAAAAD//38AAAAAAP//fwAAAAAA//9/AAAAAAA=</Bitmap>
      <Description />
      <Flags>505454667</Flags>
      <LandingType>0</LandingType>
      <Name>Arrabal Tango Club</Name>
      <Status>0</Status>
      <LocalID>4</LocalID>
      <MediaAutoScale>0</MediaAutoScale>
      <MediaID>00000000-0000-0000-0000-000000000000</MediaID>
      <MediaURL />
      <MusicURL>http://xx.xx.xx.xx:8000</MusicURL>
      <OwnerID>69af4428-cec0-48d8-a0d9-c05268facca5</OwnerID>
      <ParcelAccessList />
      <PassHours>0</PassHours>
      <PassPrice>0</PassPrice>
      <SalePrice>0</SalePrice>
      <SnapshotID>00000000-0000-0000-0000-000000000000</SnapshotID>
      <UserLocation>&lt;0, 0, 0&gt;</UserLocation>
      <UserLookAt>&lt;0, 0, 0&gt;</UserLookAt>
      <Dwell>0</Dwell>
      <OtherCleanTime>0</OtherCleanTime>
    </LandData>

That’s the xml file for Arrabal Tango Club in Condensation Land — I’ve only obscured the music URL and wrapped the part between the <Bitmap> and </Bitmap> tags, which originally used only one line, with no intervening blanks. This string encodes the shape and position of the parcel in the region. How do we know that? Well, the parcel map has to be stored somewhere, and it has to be quite large, so the only candidate is the “Bitmap” string :-) Most probably this long string is a text encoding of binary data.

Indeed this is the case: the string is using the Base64 encoding (you can find that quickly by browsing the Wikipedia). After decoding the string, we get a binary chunk of exactly 512 bytes. I checked that all the terrain files have strings of exactly the same length, so this number had to mean something. Continue reading

Advertisements

December 18, 2009 Posted by | OpenSim, Tech News, Tutorials, ZOE | , , , , , | 6 Comments

Hypergrid, or how to teleport between WORLDS using OpenSim

[Update 20090106: Corrected information about names after hypergrid tp, added two captures]

HyperGrid

This post presents a user experience with Hypergrid, a technology included in OpenSim that allows teleports between virtual worlds (or grids), and includes also a short tutorial so that you can try it yourself, link your virtual world with your friends’ worlds, etc. It assumes a minimal working knowledge of OpenSim, at the level described in my previous post. Yes, yes, I know, after a “Installing OpenSim” post there should come another titled “Saving our database” or “Our first Grid” — but I’m doing that for fun, ok? :-)

Why Hypergrid matters

Hypergrid represents a radical change in the model for 3D online OpenSim-compatible virtual worlds. Up to now, we’ve been used to big, monolithic worlds (like Second Life or OSGrid), modelled under the metaphor of a flat, grid-like world (hence the term grid). The world is made of pieces called islands or regions which occupy a place in the grid determined by two integer coordinates, and these in turn determine the visibility between islands. Thus, if island A is at (1000,1000) and island B is at (1001,1000), A and B share a border: the east of A is the west of B.

This “big world” model has several problems: big worlds don’t scale well, the data is in the hands of the service provider, not the customer, and it’s easy to for the service providers to scam their customers. Besides, if OpenSim has to become the 3D web, one doesn’t understand clearly why having some islands (= having a web) should imply having neighbours or occupying a position in a vaster plane — there’s no notion of “neighbour web” in the WWW.

Enter HyperGrid. HyperGrid allows us to work with a completely different model, what we could call a “small world” model. Everybody can have a world, a grid, in the same way that everybody can have a web. You, your community, your employer, whomever. And, as webs are linked using HTTP links, so grids are linked using HyperGrid. Easy, no?

Therefore HyperGrid matters. Indeed, it matters a lot. A hypergrided universe is a universe in which you can have your own world, take your own backups, create your own contents and save it to your HD, invite your friends… and still not be isolated.

To be fair, the technology has its problems. For example, DRM as we know it today cannot work, and there also are some security concerns. Anyway, these problems will most probably be tackled, one way or another.
Continue reading

January 5, 2009 Posted by | OpenSim, SL Exodus, Tutorials | , , | 12 Comments

Installing OpenSim in Windows XP with MySQL.

Update 20090201: Included instructions for Windows 64 bit as reported by Xen Zerbino (Thanks! :-)).

Update 20090123:Fixed a bug in OpenSim.ini detected by Alpha Runningbear. (Thanks!)

Update 20090105: Reworded step 6 to eliminate some tech-talk, added a fall-back for initial log-in, and describe the shutdown procedure in as per Vint Falken‘s suggestions 1 and 2 (thanks! :-)).

Note 1: OpenSim is considered to be alpha software. This means that many things you expect from your daily use of Second Life don’t work in the same way, or simply they don’t work at all. Development of OpenSim is very active, tho, so that we can only expect OpenSim quality and features to better with time.

Note 2: This is not for the faint of heart. :-) You’ve been warned! :-)

Note 3: All the information presented here was valid on January the 3rd, 2009. I’ll correct errors that are brought to my attention, but this post should not be taken as a substitute of the official OpenSim wiki.

The purpose of this post is to present a short, comprehensive, do-it-yourself tutorial for the installation of OpenSim in a Windows XP machine, using MySQL as a back-end for persistence. I’ve tried to write the tutorial in such a way that you can understand it even if you’ve got no previous exposure to OpenSim or to database concepts; however, some familiarity with the operating system is required, in particular you’re assumed to know how to 1) open a system prompt; 2) open a text editor and create a file (the “notepad” application will suffice). A step-by-step procedure follows; you’ll be asked to download some files; these files implement OpenSim and MySql.
Continue reading

January 3, 2009 Posted by | OpenSim, SL Exodus, Tutorials | , , , , | 48 Comments