Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Phrantik

Extracting Info from Bitmaps for Landscapes

This topic is 6919 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement
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

Share this post


Link to post
Share on other sites
Thanks! I was probably having trouble reading in the data because I had read it in as a texture.. =)

Share this post


Link to post
Share on other sites
Yeah, OpenGL protects it''s textures once you''ve loaded them, and you can''t get access (this keeps it as compatible as possible).

Morgan

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!