class

FTerrainOffsetField

Per-texel XZ displacement of the render grid, in meters — UE5's landscape XY-offset map. The heightfield stays a regular grid; this says where each of its samples actually SITS in the world, which is the whole trick behind Retopologize: a cliff sampled on a regular XZ lattice spends almost all its triangles on the flat ground above and below it and almost none on the face, because uniform XZ spacing is non-uniform 3D spacing the moment the surface tilts. Sliding samples toward the steep parts spends the same triangle budget where the silhouette is.

Module
Game
Header
#include "Terrain/TerrainRetopo.h"
Namespace
Mowo

Heights are never rewritten. A displaced sample's height is the field sampled AT the displaced position, so the surface is unchanged and only the tessellation moves along it — that is what makes the tool non-destructive and what the tests measure.

Public functions

ReturnsNameDescription
voidInit
voidClear
boolIsValid
uint32_tGetWidth
uint32_tGetHeight
floatGetOffsetXZero for any out-of-range texel, so a caller never has to bounds-check before asking where a sample went.
floatGetOffsetZ
voidSetOffset
floatMaxMagnitudeLargest |offset| in the field, in meters.
const std::vector<float>&Data
std::vector<float>&Data

Function details

Init

C++
void Init(uint32_t width, uint32_t height)

Clear

C++
void Clear()

IsValid

C++
bool IsValid() const

GetWidth

C++
uint32_t GetWidth() const

GetHeight

C++
uint32_t GetHeight() const

GetOffsetX

C++
float GetOffsetX(uint32_t x, uint32_t y) const

Zero for any out-of-range texel, so a caller never has to bounds-check before asking where a sample went.

GetOffsetZ

C++
float GetOffsetZ(uint32_t x, uint32_t y) const

SetOffset

C++
void SetOffset(uint32_t x, uint32_t y, float offsetX, float offsetZ)

MaxMagnitude

C++
float MaxMagnitude() const

Largest |offset| in the field, in meters. Zero means the grid is still regular and nothing downstream has to consider offsets at all.

Data

C++
const std::vector<float>& Data() const

Data

C++
std::vector<float>& Data()
Generated from Terrain/TerrainRetopo.h via game.json · Nov 5, 2026Version 1.0.0