Creates an object from a specified .raw or .dat height map, useful for making terrain. The file should be in raw 16-bit data. If you use extension ".dat" in szFilename it will expect that this is a GameGuru 32-bit raw height map and convert that to 16-bit. If the file is not a GameGuru height map then you must change the extension to ".raw". If you convert a GameGuru height map (.dat) file, rawWidth and rawHeight should always be set to 1024. The object will have a single UV channel with the range 0 to 1 mapped to the entire terrain. If you wish to modify this then you can use SetObjectUVOffset and SetObjectUVScale, or use a shader that multiplies the UV coordinates by a specified amount. A shader can also be used to create multiple UV channels from this single channel by applying different scale factors to each. Normally when using 16-bit data you don't need to set a smoothing value, but if its not already been smoothed adjust as necessary. The split value lets you create multiple meshes which can improve performance, as unseen meshes will not be drawn. The split value specifies how many meshes to create along each edge, for example a split value of 5 will create 5x5 = 25 meshes in total. Unlike other objects collision data is not generated by default on this object as it can consume a lot of memory, use SetObjectCollisionMode if you want to turn it on. For terrains greater than 1024x1024 this is not recommended on mobile devices, and you should use GetObjectHeightMapHeight instead if possible. Turning on physics for this object will use even more memory and is not recommended on terrains greater than 1024x1024 on any platform.
integer CreateObjectFromRawHeightMap( szFilename, width, height, length, smoothing, split, rawWidth, rawHeight)
CreateObjectFromRawHeightMap( objID, szFilename, width, height, length, smoothing, split, rawWidth, rawHeight )