GeotiffLandscape - UE4 Plugin
==============================
Adds geotiff files as UE4 Landscape height/weight map file type and custom data asset type. This can be used to generate real scale UE4 maps from existing locations. Geotiff digital elevation models (DEM) contain information about geo coordinates of the map and information about maximum and minimum elevation. With this information 1:1 scale Landscapes can be created using this Plugin. Also geotiff land cover files from the [S2GLC](http://s2glc.cbk.waw.pl/) can be imported to named landscape layers.
- [Features](#features)
- [Cutbacks](#cutbacks)
- [Building](#building)
- [Usage](#usage)
- [Landscape import](#landscape-import)
- [Landscape Heightmap import](#landscape-heightmap-import)
- [Landscape Weightmap import](#landscape-weightmap-import)
- [Single layer weightmap](#single-layer-weightmap)
- [Multi layer weightmap](#multi-layer-weightmap)
- [DataAssets](#dataassets)
- [Geotiff Heightmap DataAsset](#geotiff-heightmap-dataasset)
- [S2GLC Weightmap DataAsset](#s2glc-weightmap-dataasset)
## Features
* Landscape Heightmap Fileformat Geotiff
* Landscape Weightmap Fileformat Geotiff
* Landscape Weightmap Fileformat S2GLC
* Layered Landscape Material Example for S2GLC Layers
* GeotiffHeightmap Asset with 16bit of height in red and green channels of a Texture
* S2GLC Weightmap Asset with 12 gracscale layer maps
*WARNING: This is experimental research code that **will** be subject of change.*
This example was generated using a DEM from [Opentopography](https://www.opentopography.org/) and the corresponding section from S2GLC around this coordinates: 50.959057,14.061609.
![alt text](Resources/example0.png "Overview over the map.")
![alt text](Resources/example1.png "Example Rendering from close to ground.")
Landscape textures in the screenshots are from [CC0textures](https://cc0textures.com/) and [FreePBR](https://freepbr.com/). Foliage assets from [NaturePackage](https://unrealengine.com/marketplace/en-US/product/nature-package) (was free for April 2020 in UE4 Marketplace) and [PN_FoliageCollection](https://www.unrealengine.com/marketplace/en-US/product/interactive-foliage-collection).
## Cutbacks
DEMs are usually not available at high resolutions. The popular NASA SRTM GL1 data provides an average resolution of 30 meter per pixel while UE4 usually uses 1 pixel per meter for Landscapes. The low resolution geotiff texture is therefore scaled up using bi-linear interpolation to reflect their geo-spatial extends in UE4 scale (1 heightmappixel -> 1 meter of landscape). However artifacts of the low resolutions remain visible.
UE4 Landscapes usually support height differences of 655.33 meter. When the height difference of the geotiff is larger, the full range will be used to map the height values and a small yellow warning sign besides the filename suggest a Z-Scale to correct the scaling factor. This scale is best entered into the landscape z scale box before importing.
## Building
This plugin uses [GeoReference](https://github.com/iwer/GeoReference), [UnrealGDAL](https://github.com/TensorWorks/UnrealGDAL), [ue4cli](https://github.com/adamrehn/ue4cli) and [conan-ue4cli](https://github.com/adamrehn/conan-ue4cli) to build and manage the required GDAL libraries.
* Download a Release of UnrealGDAL and place it in the Plugins directory or clone and follow instructions to build UnrealGDAL from source.
## Usage
Add GeotiffLandscape to `.uproject` or `.uplugin`
```json
"Plugins": [
{
"Name": "GeotiffLandscape",
"Enabled": true
}
]
```
Add build dependencies to your modules
```csharp
PublicDependencyModuleNames.AddRange(
new string[]
{
"GeotiffLandscape",
"GeotiffLandscapeEditor"
}
);
```
## Landscape import
### Landscape Heightmap import
In Landscape mode when importing a heightmap you will notice a new filetype "DEM Heightmap .tif files". Several checks are performed to ensure the file can be imported. In theory all projected geo coordinate systems with coordinates in meter containing a single Int16 or Float32 rasterband layer of gray-scale values in meters should work fine. Although it really does not make much sense to generate a landscape from a spherical projection it is also possible to import WGS48 references heightmaps. This can be usefull when geographic accuracy is not that important to avoid the effort of converting material.
### Landscape Weightmap import
TIF files can be interpreted in two ways for weightmap generation.
#### Single layer weightmap
The obvious interpretion of the grayscale values is as one weightmap. The grayscale values are mapped to a range of 0 to 1 that represent the layer weight.
#### Multi layer weightmap
[S2GLC](http://s2glc.cbk.waw.pl/) provides huge landcover geotiffs for europe. Using the geo reference of the heightmap we can crop the area of interest into a smaller file. This is currently done in [QGIS](https://www.qgis.org/) but may be integrated in the import process later. The gray scale values in this image represent 15 classes of landcover:
* Clouds
* Artificial
* Cultivated
* Vineyards
* Broadleaf
* Coniferous
* Herbaceous
* MoorsHeath
* Sclerophyllous
* Marsh
* Peatbog
* Natural
* Snow
* Water
* NoData
For every class a landscape layer can be created (The layers are automagically created when using the LMT_S2GLCExample material for the landscape (*except NoData and Clouds atm.*)). This material also shows how to implement landcover dependent foliage using the Landscape Grass Tool. When importing the weightmap into the layer, the name of the layer has to match one of the landcover classes to select the grayscale from the S2GLC geotiff.
A special implementation interpretes distinct grayscale values as distinct weightmaps. The resulting weightmaps have a weight of 1 where the TIF pixel has the matching grayscale value and 0 where it has not.
To enable UE4 to distinguish between regular TIF weightmaps and S2GLC weightmaps, this plugin introduces the file extension *.s2glc. This is basically a *.tif file that is supposed to only have the 15 S2GLC grayscale values.
## DataAssets
If you want to use render targets to generate the landscape at runtime you'll need all the height- and weightdata as textures and the geo reference metadata. For this purpose Geotiff heightmaps and S2GLC files can also be imported as DataAssets.
### Geotiff Heightmap DataAsset
Geotiff heightmap assets contain the geo information and a texture2D where the 16 bit height values are split into the red and green channel of the texture. Because .tif files can also be imported as Texture without the geo reference information it is important to select the file type "Geotiff File (.tif)" when importing an asset into the content browser otherwise the pure texture import will be auto-selected.
### S2GLC Weightmap DataAsset
S2GLC DataAssets contain a texture for each of the 15 layers (*except NoData and Clouds*) and the geo reference information.
按剑四顾
- 粉丝: 28
- 资源: 4622
最新资源
- 基于Go-micro微服务的秒杀系统详细文档+优秀项目+全部资料.zip
- 基于golang实现在线客服系统,包含用户端(h5,微信小程序),客服端(PC),方便跟已有的系统整合。适用于小程序自带的客服系统无法满足或有多端业务需求的情况详细文档+优秀项目+全部资料.zip
- 基于gorillawebsocket封装的websocket库,实现基于系统维度的消息推送,基于群组维度的消息推送,基于单个和多个客户端消息推送详细文档+优秀项目+全部资料.zip
- 基于Go-Zero + Vue3 + TypeScript + Element-Plus开发的简单高效权限管理系统详细文档+优秀项目+全部资料.zip
- 基于Go-Zero Nestjs + Vue3 + TypeScript + Element-Plus开发的简单高效权限管理系统详细文档+优秀项目+全部资料.zip
- linux常用命令大全.txt
- 基于go-zero的影票售卖系统详细文档+优秀项目+全部资料.zip
- 基于Go-Zero + vue-element-admin的前后端分离微服务管理系统的前端模块详细文档+优秀项目+全部资料.zip
- 基于go-zero 框架实现的电商系统的后端服务详细文档+优秀项目+全部资料.zip
- 基于go-zero实现的网盘系统详细文档+优秀项目+全部资料.zip
- 基于go-zero框架数据中台系统详细文档+优秀项目+全部资料.zip
- 基于go-zero和gorm开发的分布式微服务后端权限管理系统脚手架。十分合适新手入手go-zero、gorm、casbin、jwt等。详细文档+优秀项目+全部
- 基于Go的WebSocket直播间推送系统详细文档+优秀项目+全部资料.zip
- 基于Go和GraphQL的微型进销存系统:服务器端(基于Golang,GraphQL,GORM,jwt-go等开发)详细文档+优秀项目+全部资料.zip
- 基于go的自托管博客系统详细文档+优秀项目+全部资料.zip
- 基于go开发的分布式高并发web电商系统详细文档+优秀项目+全部资料.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈