how do you make height maps work? I'm trying to load a terrain into my scene, but it just appears flat. The image size is 1024 x 1024 and it is a proper height map made in total terrain (and viewing it in paint, it is made up of many different shades of gray).
Graphics3D 800,600
SetBuffer BackBuffer()
;load in the height map for the 3d scene
Global terrain = LoadTerrain("worldmap_1.bmp")
TerrainDetail terrain,4000,True
TerrainShading terrain,True
;load a texture for the height map
terrain_Tex = LoadTexture("textures\grass_painted.bmp")
ScaleTexture terrain_Tex,1024,1024
EntityTexture terrain,terrain_Tex
;create the water DO THIS NOW!!!!
;set ambient light
AmbientLight 150,150,150
;create a point light (the sun... Just to simulate very basic shading)
;maybe make it rotate with time in the future
;sun = CreateLight(2)
;LightColor sun,200,150,150
;PositionEntity sun,100,200,100
;create the camera
cam = CreateCamera()
PositionEntity cam,500,40,500
CameraFogMode cam,1
CameraFogColor cam,150,150,150
CameraFogRange cam,300,1024
While Not KeyDown(1)
TurnEntity cam,MouseYSpeed(),MouseXSpeed(),0
RenderWorld
Flip
Wend
End
|