   terrain from bitmap
  I would like to build a terrain depending on the brightness of the bitmaps pixels. That means, a white pixel is y=100.0f and a black y=0.0f and a grey y=50.0f for the height values. My problem is, I don''t know how I can get the brightness-values of a bitmap.I use the type BITMAP and use HBITMAP LoadBitmap(.....) to load the bitmap,then I get the object with GetObject(....). But then I don''t know how I can read the bitmap-data.   
  Hi there!I wouldn''t use the BITMAP structure... just read it fread(); the pixel data starts at offset 58the x coordinate is at 0x12 (4 bytes)the y coordinate is at 0x16the colordepth if you''re interested at 0x1C.then read in one byte for each Y koorinate...hope that helped..cya,Phil    Visit  Rarebyte!  and no!, there are NO kangaroos in Austria (I got this questions a few times over in the states 