height maps

Blitz3D Forums/Blitz3D Programming/height maps

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


I haven't used Blitz terrains in a long time, but have you tied scaling the terrain vertically? It might be that it simply has a max height of 1 until you scale it.

okay, that worked, thanks.

While on the topic of height maps:
I'm going to use terragen to do them properly, and I find it's texturing functions to be quite amazing. So is there a way to actually export the texture maps produced in terragen?

For want of not pimping my own software... check out terrain shader in projects on my site.

The problem with terragen texturing is that there is a massive amount of detail, something that blitz terrains can't handle.