Jump to content
  • Advertisement
Sign in to follow this  
Alundra

Terrain Smooth

This topic is 1476 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 all,

For my terrain I have a smooth tool which uses a radius.

Actually I average using 8 pixels around each pixel in for loop.

Is it better to use another algorithm to smooth a terrain part using a radius ?

Is it better to take only the center pixel and average based on the radius of the tool ?

Thanks for the help

Edited by Alundra

Share this post


Link to post
Share on other sites
Advertisement
that depends on what you want to achieve, but usually terrain is very similar to image filtering, so it's worth to take a look at those algorithms.

Averaging 8 surrounding pixels sounds ok, you could weight that average against the center pixel to have some kind of smoothing-intensity.
One step further would be gaussian blur, it should do a good job to smooth the pixels in general.
if you want to preserve edges but smooth noisy areas, you could implement a bilateral filter.
in case you want to get rid of some 'peaks' e.g. when some procedural noise generated the terrain, you could try a median-filter.

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!