Height map and terrain
Blitz3D Forums/Blitz3D Beginners Area/Height map and terrain
| ||
Hello, I just got a book on 3ds, but I see no chapter on height maps or terrains. How would I go about creating a height map or terrain? Do you guys know of any tutorials that demonstrates the creation of a height or terrain map? |
| ||
It's simple. The brighter Pixels are higher Places, the darker Pixels are the lower Places. Just take a black image, select the Airbrush in a Drawing App, make some bright Spots and Things, blur the image a lot and then save it and load it in Blitz using LoadTerrain(). The image must be a power of 2 square size, eg 8*8 or 16*16 or 256*256 or 128*128 or something like that. Power of two numbers are 2,4,8,16,32,64,128,256,512,1024... |
| ||
Does the height map have to be the size of the whole scene |
| ||
No, it does not have to be the size of the whole scene. There are different ways to handle the problem, but it's best to know what you are saying when you state "the whole scene" |
| ||
You should probably scale the Terrain to the size of the scene. maybe something like: terrain=loadterrain("hmap.bmp") Scaleentity terrain,10,70,10 |