Extracting Info from Bitmaps for Landscapes
Hi everyone!
I'm trying to code a landscape in OpenGL that's generated from a bitmap. At the moment i'm trying to load the bitmap in as a texture to memory and then read the bitmap information, but i'm not having much luck! I want to use the bitmap pixel/colour info as a heightfield map for the landscape. Has anyone any advice?
- Phrantik
Edited by - Phrantik on 5/14/00 4:33:57 AM
..:: Phrantik ::..
I''m not a guru with this kind of thing, but most people use a greyscale bitmap and use varying degrees of white to build up height, after you''ve loaded the bitmap into memory (you do not need to make it an OpenGL texture) read back information from the data pointer and use the increasing values of white to correspond to a y coordinate in the world.
It''s just an idea, not sure how well it would work.
-Mezz
It''s just an idea, not sure how well it would work.
-Mezz
Thanks! I was probably having trouble reading in the data because I had read it in as a texture.. =)
..:: Phrantik ::..
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement