Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/virtualw/public_html/Resources/Hosted/Resource.php on line 9
ActiveWorlds: The Cell-Grid
Not a member yet? Register for full benefits!

Username
Password
ActiveWorlds: The Cell-Grid

The ActiveWorlds3D virtual environment is governed by a cell grid, which is evenly spaced across the landscape. Each cell is ten metres square, and is itself a square, arranging the grid like a visual representation of a 2D array. The cells themselves are not flat 2D, but are instead great columns, rising from 350 metres 'below ground' up to 350 metres straight up in the air. No objects may be placed outside these limits, and they mark the upper and lower boundaries of the world.

All objects and property in a world are organised into the cells, with any object that has its origin point within a given cell ' belonging' to that cell. Each cell has a maximum number of objects and/or script data it can contain. Once that limit is reached, no more content can be placed in that entire vertical column until some is removed. In this way, worlds 'fill up' as cell limits are reached. Because scripts are seen as the same as object data, the more interactive a world is, the less objects the cells can contain.

The cell grid can be activated visually at any time, by pressing F10. F10 a second time hides the grid, so it does not interfere visually with the world. When activated, the cell grid displays as a green wireframe grid overlaid on the world at altitude zero. Any object selected whilst the grid is visible, shows which cell it is part of, by turning the cell wireframe red.


Figure 1 depicts an ActiveWorld cell grid, the texture divisions clearly visible

Cells are far more important than just container markers. Each holds a 10m x 10m section of the floor of the world, as the example above shows. Each cell's floor section always directly connects the sections around it, and each has a texture file assigned to it, allowing the world-floor to contain grass, paths, junctions, regal stonework, sand, or mountain climates as the situation calls for - all in 10x10 metre blocks. There is a maximum of just 63 separate terrain texture files allowed for the world, irrespective of size. (Actually there are 64, but the last is a special case). So, with up to 4,290,250,000 cells per world, the decision to use additional textures cannot be taken lightly.

Terrain

Terrain elevation was introduced to ActtiveWorlds from version 3.3 onwards. It allows a flowing, sculpted terrain, rather than just a flat expanse at zero elevation. Using terrain, worlds can have mountains, valleys, rivers, hills, sloping meadows, waterfalls and downs, shaped however the owner of the world pleases. Terrain adds more data to the cell grid. To be specific, it adds an elevation grid alongside it. This is a 10x10 grid, of elevation data that precisely matches the cell grid, every point on the elevation grid matching the corner of a cell. Pull the elevation up or down, and the four cells that share that corner will deform.

Terrain elevation is stored in centimetres and can range from -32,700 to +32,700 centimetres - the same as objects. This allows for a wide range of terrain structures. Unfortunately, because the system is based on elevation points, folds and outcroppings in the base terrain are not possible - flat bumps only. If you desire a cave, it has to be done with a hole, and objects.


Figure 2: Terrain is controlled by an elevation grid, working at the corners of the cells

Do not forget that the shapes you see on figure two, above, are not the actual cells themselves, and the cells are actually columns, 700 metres high - the height of the world - with these terrain elevation points passing through them. Any elevation is possible; you can have a +350m spike next to a -350m valley. It will look horrible, but it is possible.

Holes

A hole is basically a cell whose terrain square has been made invisible and non-solid. Its still there, but for all intents and purposes it has vanished - you can see through it, you can walk through it, fly through it or fall through it.

Working with Cells

To actually work with, and modify cells, you need to have caretaker rights, or use a bot - autonomous agent program - that will do it for you. The use of bots is beyond the scope of this tutorial, as use depends on the bot's individual interface.

to edit a cell, simply turn the visible cell grid on (F10) and then click on the cell you desire. The cell will turn red, and the following dialog box will appear:


Figure 3: The cell dialog

Use of this box is simple enough, and mostly self explanitory, however, to refresh, we will quickly go through it here:

  • Elevation is in centimetres. you can increase or decrease it by 1cm at a time, or 350m at a time, the amount is up to you.

    HOWEVER when you increase or decrease this value, you only change the height value of one corner of the cell. To change the others, you must change the height values on the surrounding cells as well.

  • Texture can be any number from 0 to 63. This corresponds to terrain0.jpg - terrain63.jpg on the server. These files can contain any image you fancy, howeverthey must use these exact names.

  • Hole can cause confusion:

To create a hole, simply check this box, and the cell will 'vanish'. To bring it back, uncheck it.

However, if you already have a hole, you cannot click the hole to bring the dialog back up, as there is nothing to click - so you right-click the cell next door, and use the arrow keys to move to the hole once the dialog is up - then uncheck the hole box.

Data Limits

As stated above, each cell has a finite data limit, which is expressed in the number of characters it can take. This number is calculated literally in the number of characters in the filenames of any objects plus any descriptive text on those objects, plus every character of sctipting. Thus the more extra effects added to an object, or the more fancy the model's filename, the less any given cell can hold.

Cell limits are as follows:

Normal 1400 characters
Large 2000 characters
Huge 4000 characters
Mega 5000 characters

Note these limits are for ALL characters, so if for example you have a model:

  Characters Character Length
Filename s-hut-door3 11
Description Door curtain 12
Action Scripting create solid off 16
  Total 39 characters

The result, is 39 characters out of the cell limits. This is radically more than most people would expect, and numbers climb quickly as more and more data goes in.

Note that the SIZE ofthe models is irrelevant - they can be 1m x 1m or 300m long. It makes no difference. Only the number of characters in the cell is relevant.

Thus, a tiny model with the name "red_blanket_for_beds" will use 20 characters straight away, whereas three massive floorplan models with the name "plan1" will only use 15 between them. With this in mind, careful naming of files becomes more important than number of models.

Setting Terrain

As covered above, each cell is bordered by four terrain points; one at each corner. However, only the elevation point at the cell's south eastern corner will be effected by resetting the terrain in that cell. The three other points will be ignored, as they belong to the south-eastern corners of three other cells.

This does mean of course that you cannot have terrain elevation along the northernmost, and westernmost edges of your world, unless you use a bot or scripting file to generate terrain - which will place terrain beyond the edges of the cell grid, and beyond the scope of this document.

Staff Comments

 


.
Untitled Document .