Image bm787.GIF Terrain from Picture
By means of the terrain from picture element a terrain is created from a height map. The height map is a picture entered as an element's parameter. The brightness of the individual pixels determines the height of the terrain surface in the range from 0 to 1 (in the Y axis direction). The black color represents the 0 height, the white color is height 1. The terrain thus created has dimension 1 in the X, Y, and Z directions, the coordinates lying in the range between -0.5 and +0.5 in the X and Z directions, and in the range between 0 and 1 in the Y direction. The terrain surface has been smoothed according to current setting of the smoothing of textures element. Thus this element must be set before terrain creation. The texture is mapped onto the terrain surface by repeating after every 4 terrain fields. Therefore the size of the terrain picture should be a multiple of 4. The terrain thus created is formed so that the terrain beginnings and ends may be connected (both by height and by normal). Several terrains can be assembled next to one another without the boundary being distinguishable. If it is necessary to connect different terrains to each other, it is recommended to use congruent terrain rims (having a width of at least 4 pixels). The element returns the identification number of the created terrain.

Full Html Context Help of The Peter - Gemtree Software & Children Programming