Importing Leveller heightfields into Unreal Engine

Unreal Engine landscape import

It's always been possible to get Leveller heightfields into an Unreal Engine project by exporting to 16‑bit PNG or to Raw Binary using unsigned 16‑bit integers with little-endian byte order and no header nor scanline padding. After importing, one would then work out the scaling of the landscape actor by hand. Needless to say, the process could be smoother.

Using the Leveller import plug-in

An import plug-in for Unreal Engine 5.5 is available (it may work with other versions); you can download It from this GitHub repository. Installation instructions are available in the plug-in's README file.

In the UE Editor, whether you import into a new landscape actor or into an existing one, the Import Heightmap dialog should offer the "Daylon Leveller" file type choice.

file types

Note: Leveller files using a geographic coordinate system are currently unsupported; please use a local or raster coordinate system.

UE expects you to adjust the landscape actor's size manually by filling out the values in the Scale field. If you want to use the actual size and elevation span, use a local coordinate system and follow these steps:

For best quality, the plug-in will map the heightfield's elevation span to the entire 16‑bit range used by UE. This reduces terracing (quantization) artifacts in gently sloping areas. However, if you want to edit the landscape in UE and dig lower than the lowest point or raise an area higher than the highest point, the results will be clipped. If you need less of the 16‑bit range used so that you have some sculpting "wiggle room", export the heightfield from Leveller using PNG or Raw Binary format and specify a subrange, and then import again using the format you exported.

Which heightfield resolution should I use?

UE will resample imported heightfields to your landscape actor's resolution, but if you want to avoid that, you'll need to use the same resolution in Leveller. It's recommended to plan your landscape actor first, since the resolution in UE depends on various settings such as section size, sections per component, etc.

Once you have the actor's resolution, you can set up a Leveller document to match it, and when it comes time to import, no resampling will be needed. If you can't match resolutions and you have fine details in your Leveller file that you don't want resampled, you can try cropping or padding the heightfield before importing.

Since UE has a small list of section sizes, this table lists common landscape actor resolutions and the settings that they're based on:

Resolution Quads/section  Sections/component  Total components
8129 x 81291274 (2 x 2)1024 (32 x 32)
4033 x 403363 4 (2 x 2)1024 (32 x 32)
2017 x 201763 4 (2 x 2)256 (16 x 16)
1009 x 100963 4 (2 x 2)64 (8 x 8)
1009 x 100963 1 (1 x 1)256 (16 x 16)
505 x 505 63 4 (2 x 2)16 (4 x 4)
505 x 505 63 1 (1 x 1)64 (8 x 8)
253 x 253 63 4 (2 x 2)4 (2 x 2)
253 x 253 63 1 (1 x 1)16 (4 x 4)
127 x 127 63 4 (2 x 2)1 (1 x 1)
127 x 127 63 1 (1 x 1)4 (2 x 2)

If you're new to Unreal Engine and wondering why the resolutions aren't the more typical powers of two e.g. 8192 or 4096 etc. it's because landscape sections overlap using duplicated vertices. For more information, please visit this page.

Unreal and its logo are registered trademarks of Epic Games, Inc.