| Terrain from Sheet|
By means of the terrain from sheet
element a terrain is created from a sheet
entered as the element's parameter. The terrain thus created has the same number of fields as the sheet. The terrain's dimensions in the X, Y and Z directions are 1, the X and Z coordinates ranging between -0.5 and +0.5, and the Y coordinate ranging between 0 and 1.
The terrain height is determined on the basis of numeric value 1
of the individual squares. Value 0 through 1000 is transformed to height 0 till 1 (in the Y axis direction). It is the upper left corner of the terrain square (as seen from above) that is set up. The last row and the last column of the terrain field vertices are set up in the same way as the first row and the first column (including the normals' accommodation), making it possible to connect several terrains to each other. If different terrains are to be connected to each other, it is recommended to use congruent terrain rims (having a width of 2 squares). Thus their smooth connection will be secured automatically.
Beside the height definition icon pictures are taken over from the sheet and used as the texture of individual squares. The icon pictures are put together to one resulting texture. For each icon the most frequent neighboring icons are found and stored into the texture together with the icon. For each icon the border of neighboring icons is used having a width of 1/2 of the square. Therefore, the definition of one icon occupies a space sized 2*2 squares (64*64 pixels) in the texture. In this way it is secured that, provided the texture filter is on, the square borders will be tied together properly. To secure a smooth connection of different icons, all neighboring icons should use a congruent border (having a width of at least 1 pixel). To prevent the mutual icon diffusion at a big distance (when the faraway texture filter
is on), the number of faraway textures
is set to 4 automatically. If the square texture is smoothed (by setting the smoothing of textures
to 2), then the texture number is to be limited to 3.
Full Html Context Help of The Peter - Gemtree Software & Children Programming