Landscapes¶
The Landscapes setting picks how landscapes are exported:
| Option | Result |
|---|---|
| Mesh (default) | Mesh chunks with the landscape's colour baked in. Works in any supported Godot version. |
| HTerrain | HTerrain terrains you can keep sculpting and painting. Needs Godot 4.6 or newer. |
| Terrain3D (Experimental) | Terrain3D terrains you can keep editing and painting. Needs Godot 4.5 or newer. |
| None | Landscapes are left out. |
Mesh¶
Each landscape becomes a Node3D named after it, holding one MeshInstance3D per chunk of 255 x 255 quads.
- Heights and holes (the visibility layer) carry over. Normals are seamless across chunk edges.
- The landscape material's final colour is captured from above into a JPEG texture per chunk, at 4 times Max texture size (8192 px with 2048, at most 8192), so painted layers show as they do in Unreal. A chunk spans about 255 m, so at a material's own size the ground came out blurred.
- Mesh compression and Generate LODs apply to the chunks as they do to static meshes, and any Collision gives each chunk its exact shape. Chunk edges keep every vertex when reducing, so neighbouring chunks don't crack apart at any LOD.
Landscape LODs¶
How the chunks are given their LODs (Generate LODs) and reduced (Mesh compression Reduced or Minimal):
| Option | |
|---|---|
| Fast (default) | Each LOD keeps every other vertex row and column of the one before, so it has about a quarter of its triangles. This takes almost no time. Flat and steep ground are thinned alike, so distant LODs lose ridges and cliffs sooner than with Quality, and holes widen to the LOD's grid. Reduced and Minimal both keep every other row and column (about a quarter of the triangles). |
| Quality (slower) | The simplifier used for static meshes. It removes triangles where the ground is flattest first, keeping ridges and cliffs, and holes keep their shape. It does far more work per chunk, so large landscapes take much longer. |
If a landscape export is slow, build_report.json shows where the time went: see
Build report.
- Chunks are built in the landscape's own frame, so rotated, tilted and scaled landscapes keep their placement.
- The files are under <level>_data/terrain/<landscape>/: a mesh (.res), a material (.tres), a colour texture
and, with collision, a collision shape per chunk.
The chunks use a plain StandardMaterial3D with only the colour texture, so the surface has no normal map or detail
textures up close. Swap in your own material if you need them.
HTerrain¶
Each landscape becomes one HTerrain node, placed like the mesh chunks, so rotated and scaled landscapes keep their placement.
- Heights and holes carry over. Normals are computed from the heights, as HTerrain does.
- When the landscape material uses Layer Blend nodes, up to 4 layers carry over with their textures and paint weights (HTerrain's Classic4 shader). Otherwise (no Layer Blend, or more than 4 layers, with a warning) the material's colour is captured from above into the terrain's colour map.
- Paint feather softens the edges between the painted layers (see Paint feather).
- HTerrain's maps are at most 4097 pixels a side. A larger landscape keeps every 2nd (or 4th, ...) vertex, and the Output Log says so.
- Collision turns on HTerrain's collider. It doesn't know about holes, so the ground under a hole stays solid.
- The files are under
<level>_data/terrain/<landscape>/:data/holds the HTerrain data (data.hterrain, the height, normal, splat and colour maps) andtex/the layer textures, withtexture_set.tres.
The HTerrain addon¶
The HTerrain addon 1.8 (MIT, licence included) is copied into the project at res://addons/zylann.hterrain and
turned on for you. It is only copied when HTerrain is chosen. If the project already has addons/zylann.hterrain,
its version is used instead.
HTerrain is a separate project by Marc Gilleron, not part of Godot or UE2GD. Its documentation covers sculpting, painting and detail layers in Godot.
Terrain3D (Experimental)¶
- Heights, paint layers and holes carry over.
- Layer textures are used when the landscape material uses Layer Blend nodes. Otherwise the material's colour is baked into the terrain's colour map.
- Paint feather softens the edges between the painted layers (see Paint feather).
- Landscapes are rendered into tiles in Unreal and written as Terrain3D region files, so Godot has nothing to convert.
- Terrain3D terrains are always level and aligned to the world axes. A tilted landscape is sampled straight down.
- Very large landscapes, or landscapes far from the world origin, can be beyond what Terrain3D can hold at their resolution. They are skipped with a warning. Turn on Reset world origin (see Reset world origin) or export them as meshes instead.
This mode is experimental: check the result, and use Mesh if it doesn't hold up for your level.
The Terrain3D addon¶
The Terrain3D addon (MIT, licence included) is copied into the project at res://addons/terrain_3d and turned on for
you. It is only copied when Terrain3D is chosen. If the project already has addons/terrain_3d, its version is used
instead.
Terrain3D is a separate project by its authors, not part of Godot or UE2GD. Its documentation covers editing and painting the terrain in Godot.
Layer textures¶
With HTerrain or Terrain3D, UE2GD finds each paint layer's textures by following the landscape material from its Landscape Layer Blend nodes. It follows material functions (with the textures handed to them), material attributes and the active side of static switches, with the material instance's values. For each layer it takes:
- the colour texture, with the layer's colour tint multiplied in (a vector parameter named like Tint or Color);
- the normal map;
- the roughness texture, or the roughness channel (green) of a packed ORM/ARM texture;
- a height texture, when there is one.
Both addons pack height into the colour texture's alpha and roughness into the normal map's alpha. A layer without one of them gets a neutral value, so all layers keep the same format. The Output Log lists what each layer uses.
Layer texture tiling¶
With HTerrain or Terrain3D and layer textures, each layer's texture repeats as often as in Unreal. UE2GD follows the
UVs that reach the layer's texture in the landscape material: Landscape Layer Coords (its Mapping Scale), Texture
Coordinate (its tiling), World Position, and Multiply or Divide by constants and scalar parameters (with the material
instance's values). The Output Log says how often each layer repeats. When the UVs can't be worked out, the texture
repeats once per landscape quad, with a note in the Output Log; change the tiling in Godot if it looks off (HTerrain:
the node's u_ground_uv_scale_per_texture shader parameter, map pixels per repeat; Terrain3D: each texture
asset's UV Scale, repeats per metre).
Paint feather¶
With HTerrain or Terrain3D and layer textures, the layers blend by their paint weights. Paint with a hard brush in Unreal makes a sharp line between two textures, which Unreal's material often hides better than HTerrain's and Terrain3D's shaders do. Paint feather (m) (default 1) blurs the weights before they are written, so a hard edge fades over about that many metres. 0 keeps the paint exactly as it is in Unreal. Grass always follows the exact paint, as in Unreal. Mesh landscapes and the captured colour maps are not affected: they show Unreal's own blend.
Landscape grass¶
With Landscape grass on (the default), the landscape material's grass (Landscape Grass Types) is placed as Unreal
would place it and saved with the scene, under a <landscape> Grass node. See
Foliage and landscape grass.
Landscape splines¶
The meshes along landscape splines are exported like other spline meshes, and with a Splines + Path3D choice each landscape spline gets a Path3D. See Splines.
Checking placement¶
The Output Log lists each landscape's location, rotation, scale and component count when the level is scanned
(UE2GD: landscape <name>: location ...). If a landscape lands in the wrong place, compare these with the landscape
actor in Unreal.