Advertisement Jump to content
Sign in to follow this  

Terrain Smooth

This topic is 1573 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
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, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!