Regions

From Open Metaverse Wiki

Introduction

Subjects related to regions.

Types of regions

Standard sized regions

The standard region size is a 256 meter square. This is the only size supported by Second Life.

Varregions

Open Simulator supports variable sized regions. These are usually (always?) multiples of 256 meters on a side.

Initial connection to a region

TBD

Login to the first region

The login process starts with an XMLRPC request to the login server. On a successful login, an XML set of key-value pairs is returned, which includes, at least:

seed_capability
the URL for the initial region used to query for more capability URLs.
secure_session_id
a unique UUID for the current session. Unclear what this is for.
circuit_code
a unique ID which identifies the UDP connection
sim_ip
the IP address of the initial region server. This is currently IPv4 only.
sim_port
UDP port, to be used with sim_ip, for receiving and sending UDP messages.
session_id
UUID of the current session.
agent_id
UUID of the avatar logging in. This is the avatar's permanent identity.
message
Message to display to the user at login. Usually a message of the day or some such.
first_name
First name of user/avatar.
last_name
Last name of user/avatar.
start_region [x, y]
world coordinates of the southwest (0,0) corner of the initial region.
look_at [x,y,z]
unit vector indicating the initial direction of view.

Note that this information does not contain the initial location of the avatar. That reaches the viewer via an object update to an object with the same UUID as the agent_id. An implication of this is that the viewer doesn't know where the avatar is at startup, yet it will have to send an agent update before it knows that. This causes a race condition in interest list updates.

Open Simulator logins for grids with varregions provide some additional info:

region_size_x
Region size, meters.
region_size_y
Region size, meters.

If these are absent, 256 is the default value.

Teleports

TBD

Adjacent regions

TBD

How viewers find out about adjacent regions

In both Second Life and Open Simulator, viewers are told about the regions adjacent to regions to which they are already connected. This information is sent over the event poller channel in LLSD format. At some time in the past it was sent as a UDP message (Enable Simulator, Low/151), but that message is now "blacklisted" in the Second Life UDP message_template.msg file.

The data sent in an EnableSimulator message is a subset of that in a login reply:

Handle
region origin in world coordinates, sent as a 64-bit region handle value, big-endian.
IP
IP address of simulator
Port
UDP port for simulator, sent as a 32-bit integer.
RegionSizeX
optional, Open Simulator only, region size in meters, sent as a 4-byte binary string, big-endian.
RegionSizeY
optional, Open Simulator only, region size in meters, sent as a 4-byte binary string, big-endian.

There is also an EstablishAgentCommunication message:

sim-ip-and-port
IP address and UDP port, in string format: "87.101.7.128:15272"
seed-capability
URL of the simulator's capability request server.
agent-id
UUID of agent involved

These fields all have the same meanings as in a login reply.

Once both of these messages have arrived, it is possible to begin talking to an adjacent region's simulator.

Region crossings

TBD