Jump to content
  • Advertisement
Sign in to follow this  
Alessandro Pozzer

Best technique to generate procedural terrain

This topic is 499 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 guys, looking around I saw that the most common technique to generate procedural terrain is by using height maps stored in PNG files. Is it the best technique though? Wouldn't it better to just generate a grid and then transform the y coordinates according to a chosen function? Could the perlin noise algorith be used to modify the y axis only?

Thank you for your help.

Share this post


Link to post
Share on other sites
Advertisement

Perlin noise is fine for this kind of thing. It generates a scalar value which you can use to modify the y coordinate.

So I do not need to create a height map? and how can this method work if the perlin noise would return only a scalar value?

Thanks

Share this post


Link to post
Share on other sites

Well, if you can just iterate the vertices of your height geometry and set each one directly, then you don't need a heightmap. Just iterate the vertices and set Y based on the value returned by the noise function. Many engines facilitate setting from a heightmap, though, so in that case it might just be easier to generate a heightmap from the noise function first, then set heights from that.

Share this post


Link to post
Share on other sites

a heightmap function can be handy.   given a set of world coordinates (x,z), it returns the y value (ground height) at that point in the game world. internally it can use heightmaps or procedural functions or both to determine y.  this can be used to generate ground meshes, set the drawing height of characters and objects, check falling collisions with the ground, steep_rise_ahead() and steep fall_ahead() functions, etc, etc.

Share this post


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

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!