百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
T

TerrainPrettifier

> 编程语言
开源

这是一款基于 GPU 的小型组件,旨在帮助在 Unity 中直接清理和优化基于卫星/DEM 的地形。

197 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

这是一款基于 GPU 的小型组件,旨在帮助在 Unity 中直接清理和优化基于卫星/DEM 的地形。

Terrain Prettifier

What is this?

Terrain Prettifier is a small component designed to clean and improve satellite/DEM based terrains directly inside of Unity. I started working on it because I was frustrated with how cumbersome the process of working with multiple terrain tiles in external programs was, where often I just wanted to add some higher resolution detail to an already existing height map. It can also be used to upscale and add detail to low-resolution terrain height maps.

It is entirely GPU based and so runs at interactive framerates. Additionally, it uses a ray-marched preview renderer which allows you to instantly see the results of your settings and only applies the modifications to the actual terrain height map once you are happy with the results.

Height map filtering

Denoiser

Applies a bilateral blur filter to the heightmap before further processing. Useful for filtering noisy input data without destroying important features.

Ridge Maker

Sharpens ridges. Useful if your DEM data is overly smooth. Also useful for upscaling low-resolution data.

Erosion

Adds hydraulic erosion-like features to slopes. It should be noted this is not an actual hydraulic simulation, but rather uses a gradient-aligned noise algorithm which looks like erosion. Very useful for adding detail to slopes, and in particular for upscaling low-resolution data.

Satellite map filtering

Shadow Removal

Identifies shadows based on pixel luminosity and replaces them with adjacent features.

Cavity Filter

Burns cavity (concave/convex) features into the color map. Should be used with care since it easily makes the resulting color map look like crap.

Usage

Drop the Assets/TerrainPrettifier directory into your Assets folder to install. To apply to a terrain, add the TerrainPrettifier component.
Once you are happy with the results, press "Apply to Terrain" and "Save Processed Texture" respectively.
The resolution of the output is based on that of the input. As such, if you wish to upscale a low-resolution terrain, you first need to increase the height map resolution on the terrain itself to your desired target resolution.
The preview renderer is only active while the terrain is selected. To turn it off, simply uncheck it in the component.
It is an editor-only script and can not be used at runtime. The component does nothing if included in a build.

Limitations

Does not take neighbouring terrain tiles into account. This is a planned feature but I can't promise it will be added anytime soon.

Acknowledgements & further reading

Bilateral filter by mrharicot: https://www.shadertoy.com/view/4dfGDH
Erosion noise by Clay John: https://www.shadertoy.com/view/MtGcWh
Gavoronoise by S.Guillitte: https://www.shadertoy.com/view/llsGWl
Ray-marching terrain by Inigo Quilez: https://www.iquilezles.org/www/articles/terrainmarching/terrainmarching.htm

Can I use this code for X/what license applies to the code?

Check the sources above for what license applies to the individual parts of the project. Besides this, consider any of my code in the repository as public domain.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

C#

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言