Advertisement Jump to content


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


Heightfield Woes...

This topic is 6332 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

Hey, I have a video buffer thingy that looks like this: UCHAR *buffer; This liitle guy basically has a bitmap file loaded on to him. I was wondering how I could get a 2-d heightmap out of it... ie. heightmap[x][y] = color_on_image[x][y] = buffer-whatever, I realize this may not make much sense, but if it does, please try to help. My voxel engine is just weeks away from completion. I basically want to just turn bitmap into heightfield. Also, does anyone know if it is possible to get a similar 2-d array out of a directdrawsurface and how''d one go about doing that? Thanks, -Jesse

Share this post

Link to post
Share on other sites
I don't completely understand your question, but I could give you a few tips. This may or may not be helpful. I don't know of anything directx does to speed up voxel engines. I would use a general bitmap structure. You may want to match height with color. if you are using 8-bit color mode, you may wan't to give it a special palette for height. Even in 32-bit mode, you may want to color code height with random variability if you want. I'm sure I haven't really answered most of your question, but I would like to commend you on doing voxel graphics. Even though there is so much you can do with them, and they lose speed to low-polygon terrain, they have pretty consistent quality and can be faster and better than terrain having enough polygons to make all terrain edges virtually unnoticable.

Edited by - rudy2 on September 21, 2001 11:27:01 PM

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. 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!