Archived

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

GekkoCube

Expansive 3d Landscapes and problems with palettes!

Recommended Posts

1) I have a 3d terrain engine that generate landscape from an 8bit height map. It can use a color image or a grayscale image. Is there a difference between using a color map or a grayscale for heightmapping? Also, I am having problems with my images'' palettes. I tried to optimize my palettes using Paint Shop Pro, but it doesnt seem to do the trick! I basically want a full set of unique 256 colors in my palette (which im not getting now). How can I get a palette for my height map (0 being the lowest elevation and 255 being the highest).? 2) My terrain is very limited since its basically a square map. If I increase the terrain length and width scale, the less polygon-resolution the terrain will appear to have! Meaning the triangles get really big...resulting in less convincing terrain. How can i create a larger, more expansive terrain, while keeping the terrain convincing!?? thank you. ~ I am a DirectX to OpenGL convert! ~

Share this post


Link to post
Share on other sites
OK,

1) I think the only difference between using greyscale and colour heightmaps is that greyscale heightmaps are smaller in size (less bytes per pixel).

Sorry, I don''t know about your palette problem.


2) Your problem is probably more difficult than this, but if you want a bigger landscape without loosing the resolution of the polygons, why don''t you just use a bigger heightmap? This will result in more triangles and more strain on the processor, but it should give you a bigger landscape without loosing the resolution.

Hope this helps

-Weasalmongler

Share this post


Link to post
Share on other sites
1st - I dunno what API you''re using... but I use DX, and it seems like you can set the palette, in which case it seems like you should just increment up from 0 to 255 to get a series of greyscale values... (make sure you''re using a greyscale palatte in your paint program too)

Personally, I''m also making a Heightmap program. In mine I load a 24-bit Image and average the RGB values to get a grey value.

Also, if you''re using an 8-bit bmp file, you should have the palette in the file... I''m not exactly sure where, but its somewhere before the image data

2nd - As to the scaling of the width and length, the way I''m doing it is to have the width and length subdivided by two resolution values (one for width & one for length)

Then I take the length & width of my image, and take pixels at intervals to subdivide it the same amount.

This way, I can have a map that''s 100 x 50, and the resolution of the map can be as low as 1x1 or as high as the size of the image. (so a 256x256 image map can be 256 vertices x 256 vertices)

Dunno if any of this helps, but yeah... ok then

-Lonely

Share this post


Link to post
Share on other sites