2.4. Nodes

All data in Verse is arranged into nodes. Nodes group data according to it's character, and are optimized for storing one particular kind of data per node type. There are seven distinct node types defined: Object, Geometry, Material, Bitmap, Text, Audio and Curve.

Nodes are identified within a session through numbers assigned by the host. All node IDs are valid only inside that session; two clients running on the same physical machine but connected to the same host cannot directly exchange node IDs with each other and expect a sensible result. See below for a portable way to reference nodes, however.

As we shall see, most nodes have a lot of internal structure (layers, fragments, buffers, channels, et cetera), that are always also identified using numerical IDs. Unlike node IDs, these numbers can be shared as long as the context is also provided. So, if a host contains a geometry node that client A knows as node number 4096, and client B knows as node number 8999, the layer that A thinks is 4096.17 will be the exact same data as B sees as 8999.17. This is harder to explain in a simple way, than it is to actually understand, we hope.

2.4.1. Common Data

There are some data storage facilities shared by all nodes, regardless of the node's type. These are described below.

2.4.1.1. Name

All nodes have, in addition to the numerical ID mentioned above, a textual name. Unlike the IDs, the names are not session-specific but can be shared between sessions. Names should be unique across all nodes.

2.4.1.2. Tags

Tags provide a place where applications can store custom data associated with a node. This is handy for expressing things that do not fit straight into the data model, but are nevertheless required by applications for processing. Tags are like variables in a programming language; they have a name (and a numerical ID for reference, as always) and a value of a certain type. There are numerical and textual types, plus some more intricate ones.

To ease management, tags are collected into tag groups. Tag groups are simply named containers for tags, that allow related tags to be grouped together. Also, tag groups can be subscribed to which gives better subscription granularity than if individual tags could be. Tag groups do not nest, it is not possible to have groups within groups within groups.

These are the types of tag values supported:

NameDescription
VN_TAG_BOOLEANBoolean value, i.e. true or false only.
VN_TAG_UINT32Unsigned 32-bit integer value.
VN_TAG_REAL6464-bit floating point value.
VN_TAG_STRINGA textual string.
VN_TAG_REAL64_VEC3Vector of three 64-bit floating point values.
VN_TAG_LINKLink to another node.
VN_TAG_ANIMATIONLink to a curve node. Subject to change.
VN_TAG_BLOBUnstructured binary data ("binary large object").

A tag always has a value, which means that it always has exactly one type. It is possible to rename, delete, and change the type of tags, as well as create new tags of course. We will see later on how these actions are performed, in the system commands section.