Zonja Capalini

Partial documentation for SceneObjectGroup serialization in XML2 format

Warning: This is a work-in progress. I’m publishing this article now to see whether it generates interest and which kind of feedback I get. The material published here is incomplete, and contains for sure errors, ommisions and inaccuracies. I plan on extensively modifying it during the following days. Please take that into account when reading it.

The XML2 format

The XML2 format is used in Opensim to serialize objects or linksets (called “SceneObjectGroups” in the Opensim parlance). XML2 dumps of objects can be obtained using the ‘save xml2’ or ‘save prims xml2’ console commands, and are used internally to serialize objects in Opensim Archive (OAR) and Inventory Archive (IAR) files. For example, OARs are gzipped tar files containing a directory called ‘objects’ with one XML2 file for each linkset in the region.

XML2 files are standard XML files using an ASCII encoding and no whitespace. This means that there’s no extra indenting or formatting between tags to make the file more pleasant to the eye. You can use any XML editor (including Internet Explorer) to display an XML2 file with some additional prettyprinting and formatting.

XML2 is practically undocumented, but the fact that it’s undocumented is itself (informally) documented :-), in comments scattered through the Opensim wiki and in the Opensim-dev and Opensim-users lists. Essentially, what this means is that the format is subject to change, but not much change: attributes (i.e., new tags) may be added to the format without breaking it — the developers program the classes taking this possibility into account and storing default values when an attribute is expected but not present (for example, if you’re loading an old OAR file which does not have the ‘AllowedDrop’ attribute into a newer installation which does have this attribute).

In this article I document partially the structure of XML2 files using a variant of the BNF notation. I include the productions for most of the format, interspersing comments wherever I have some idea of the meaning of the tag contents. I’ve obtained this information by manually looking at the XML2 files when developing the simple OAR editor I called ZOE and in recent modifications to that editor. I’ve also taken a look at the source code for Opensim and at the code for libopenmetaverse. There may be errors and there are for sure omissions; any kind of comment, addition, correction or clarification would be greatly appreciated.

The whole SceneObjectGroup/SceneObjectPart model is about to be heavily refactored to be able to include very cool things like hyerarchical objects or meshes, and this will most probably require a new format (XML3?) to serialize Opensim objects. I am writing this article as a way to teach myself, and I’m making it public in case somebody else can find its contents useful. Please keep in mind at all times that this is not official documentation :-) — that’s one of the reasons why this appears as a blog article instead as a page in the Opensim wiki, the other being that I’d prefer to get some feedback before writing such a complicated wiki page, in case it’s considered useful to have it.

Continue reading

January 25, 2010 Posted by | OpenSim, Tech News | , | 11 Comments

Mirror Worlds: a hypergridded eternal art exhib

0695 - Mirror Worlds - Update - Florence Babenco

In this long overdue post, I introduce “Mirror Worlds”, an eternal (I will explain what I understand by ‘eternal’ in a minute) art exhibition located in the Opensim-based, hypergrid accesible, Condensation Land grid. The exhibition features pictures from Florence Babenco, Monika Finchy, Shoshisn Shilova, and Senna (SennaSpirit) Coronet, and from the Condensation Land residents Ludmilla Writer, Mikil Tiki and myself. Shoshisn also has contributed several of her wonderful sculptures for the exhibition.

Art exhibitions of all sorts are very common in Second Life, but unfortunately they are more unusual in the Opensim-based worlds — and, in case they exist at all, they get little or no publicity. Which is a real pity, because, contrary to the general lack of content for avatar clothing and embellishment in Opensim, for example, there is nothing which prevents Opensim-based worlds from hosting beautiful exhibitions. Nobody will ask where did you take a picture, after all — and texture uploads can’t be cheaper :-)

In this post I’ll present the exhibition and explain some of its more unusual features.  I’ll also describe some of the difficulties that I encountered in my work as an amateur curator — some of these difficulties may be due to my inexperience at the task, but I think that the other ones may help as a diagnosis of some problems the Opensim movement is facing. Continue reading

January 17, 2010 Posted by | Mirror Worlds, OpenSim, SL Exodus | , , , , | 7 Comments

Using SQL to manipulate OARs

Introduction

As I noted in my previous post “Moving and rotating OARs“, offline editing of Opensim Archives (OARs) opens a lot of interesting possibilities. In this article I present the results of several simple tests I have made by extending my “Zoe” OAR editor so that it supports (a very simplified sub-dialect of) SQL. Even in a simplified form, SQL has a lot of expressive power and allows to perform a number of pretty neat operation on OARs, when it comes to selecting and deleting parts of a region. Updating OARs, though, is much more complicated, because there is no “natural” semantics to apply when using the standard SQL UPDATE statement. Some simple cases can be singled out, however, where “natural” semantics actually make sense — and in some other “interesting” use cases, a custom pseudo-SQL statement seems to be sufficient. Continue reading

January 1, 2010 Posted by | OpenSim, Tech News, ZOE | , , , , | 3 Comments