• Advertisement
Sign in to follow this  

Heightmap steps

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

I have an issue with my heightmap where any gentle slopes aren't saved with enough detail to reproduce the same gentle slope. Since its only greyscalemy range is 0-255. When it goes across several pixels to drop down, it creates a staircase type effect where it is flat and then drops suddenly to the next level. I can't really decrease my vertical scale since I want the mountains to be high enough, and I don't know what tool I can use to create a 24 or 32 bit heightmap. I also don't have time to make my own. Is there a way in code to smooth it out? I was thinking about influencing each point by the ones near it.

Share this post


Link to post
Share on other sites
Advertisement

Any image editor (like Photoshop or Gimp) should allow you to create 16-bit greyscale images, which are ideal for heightmaps.

 

Is your original heightmap just 8-bit? If it is, what I try doing would be to convert to 16 bit, up-res to 400%, apply a tiny amount of blur, then down-res back to the original size. This should introduce a lot of new values which aren't on 8-bit boundaries.

Edited by mark ds

Share this post


Link to post
Share on other sites

I was thinking about influencing each point by the ones near it.

Use linear filtering. It uses average of 4 nearest texels, you shouldn't see any staircase effect.

Share this post


Link to post
Share on other sites

First, how are you creating the height-map?

 

If you are making it within a third party editor, you are stuck with their limitation (as referenced by mark ds).

 

If you are "generating" it within your game, you don't have to limit it to any particular scale-- I'd use floats or doubles in an array.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement