Jump to content

  • Log In with Google      Sign In   
  • Create Account


Heightmap steps


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 viper110110   Members   -  Reputation: 569

Like
0Likes
Like

Posted 05 November 2013 - 10:42 AM

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.



Sponsor:

#2 mark ds   Members   -  Reputation: 1086

Like
0Likes
Like

Posted 05 November 2013 - 01:08 PM

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, 05 November 2013 - 01:08 PM.


#3 N.I.B.   Members   -  Reputation: 1027

Like
2Likes
Like

Posted 05 November 2013 - 01:19 PM

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.

#4 Hawkblood   Members   -  Reputation: 722

Like
0Likes
Like

Posted 06 November 2013 - 05:23 PM

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.






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS