Chapter 2. Data Model

One core part of Verse is a data model for storing 3D data detailed enough to describe a "virtual world". The data model tries hard to allow for as much flexibility as possible in what can be stored, while also trying to be no larger than necessary. This section will describe this data model exhaustively, by presenting the the abstractions and structures used to represent data throughout Verse. We begin with the underlying idea, the almost-philosophical concept of perfect data.

Note

Throughout this section, sidebars labelled "API Link" appear, that reference you straight to the function(s) in the API chapter that deal with that particular aspect of the model.

2.1. Perfect Data

Verse's data model is designed around the philosophy of "perfect data". With this, it is meant that the data doesn't describe how to render the graphics, but more how the graphics should look. It is then up to each client to do a "best effort render" of the data. The idea is to support creation of datasets that are as easy as possible to use independently of the application.

The 3D geometry data is based around a single primitive: subdivided polygons. A subdivided polygon is an ordinary polygon that has been extended with information about its creases, allowing subdivision algorithms to intelligently split the single polygon into several to create a 3:rd degree curved surface that is smooth. This means that you may display the graphics as simple, planar, polygons, but you can also subdivide them to increase the smoothness of the surfaces. Subdivision is compatible with a lot of existing 3D software, since you can convert polygons, B-splines, patches and NURBS into subdivision surfaces without loss of precision.

The Verse data model has many features such as:

Verse can store text that lets each object be associated with scripts; these scripts can be read and executed by a client, which can run on the server side. This is a very flexible way of doing scripting, since engines can be written by anyone and for any language, making Verse language-independent. In addition to the text node and tags, object nodes can have generic method calls that can be passed between clients.