Learning From the Web; Building an Open Virtual World

The time of Virtual Worlds might just be upon us. Technology has come far enough that it's now possible for clients to render complex 3D environments and to transfer a good amount of data over the network.

You only have to look at online gaming to see that we've been in this position for some time for a small portion of society, but now with faster and cheaper hardware we're finally reaching the point where many people's everyday desktop is perfectly capable of offering a 3D massively multiuser virtual environment.

The Walled Garden

So what do we have out there today? In 2003 Linden Labs launched Second Life and There Inc. launched There, both are closed worlds run completely by their parent companies. There are a number of other 3d worlds that have appeared since, many aimed at children and teenagers, but all of which are closed. This limits the their usefulness and cuts them off from the factors that made the Web the successful tool it is today.

The Lessons of the Web

So can we build an open 3D world, a 3D Web if you want to call it that, based upon the things we've learnt from the Web?

Sure we can, but first lets look at what it is that has made the Web what it is:

So with that in mind, what parts do we need to build a 3D Web?

Application protocol

If we want our 3D world to be part of the Web, or at least a close cousin of the Web, it makes sense for us to use HTTP to move data from server to client. HTTP is great, it does it's job really well and is one of the three pillars of the Web.

So it makes perfect sense use HTTP to move the representations of our 3D world to our clients, but what formats should our representations take?

Content description language

There are two major 3D description formats, X3D and 3DMLW.

X3D is the 3rd evolution of the original VRML project started in 1994. It is a full blown 3D modelling language able to be generated by 3D modelling software, it's big and quite scary.

3DMLW is a lighter weight format, it simply describes a 3D space and allows you to place objects within it. These objects can either be 3D primatives defined in the source file itself or 3D models in a number of existing common 3D formats.

The thing I like about 3DMLW is that it mirrors HTML in structure, being a simple document structure that links in more complex media via hypermedia (the power of the URL).

Code on demand

Javascript, Lua

Hypermedia

XHTML, Xlink

<?xml version="1.0"?>
<document>
    ...
    <content3d id="content" x="0" y="0" width="100" height="100">
        ...
        <object xlink:href="another.3dmlw" x="1659.999878" y="-17.869379" z="18" pitch="0" yaw="0" roll="0" />
    </content3d>
</document>

Presence and chat

XMPP, IRC

<?xml version="1.0"?>
<document presence="irc://irc.example.org:194/#example">
    ...
</document>
PRIVMSG #example :LOC -2.958862 13.826897 13.263217 48
LOCATION #example :-2.958862 13.826897 13.263217 48