Orrery Terrain · OrreryTerrainEditor module · member function
UOrreryTerrainHeightmapImport::
ImportHeightmapFile
Editor onlyImport a 16-bit greyscale PNG or a RAW16 file with its sidecar into a tile store.
Declaration
static bool ImportHeightmapFile(const FString& Path, UOrreryTerrainTileStoreAsset* Store, const FOrreryHeightmapImportOptions& Options,
FOrreryHeightmapImportReport& Report);- Header
#include "OrreryTerrainHeightmapImport.h"- Module
PublicDependencyModuleNames.Add("OrreryTerrainEditor");in an editor module’s Build.cs: an editor module, not in packaged games.- Stability
- Stable: changes within a major version only add.
- Thread
- Game thread, editor only.
Description
Sets the store's origin and base cell from the sidecar, builds it, records the GeoOrigin and the provenance (Input Heightmap, the file names, the input hash) and dirties the package. Does not save it.
Ground-class rasters: a "ground_class" raster becomes the store's natural ground class (field 1, H5b), one class per base post, which Channels::GroundClass starts from and the bake's batter reads; paint strokes of the class override it. Level-0 tiles of class 0 only store nothing, and a raster of class 0 only gives a store without field 1. A value of 8 or more, the hole class 255 included, is refused: holes come only from tunnel openings.
Parameters
| Name | Type | Default | Meaning |
|---|---|---|---|
Path | const FString& | — | Absolute path of the .png, .r16, .raw or .bin heightmap. |
Store | UOrrery | — | The asset to fill. Its grid origin and base cell are overwritten; its resident level and edit subdivision are kept. |
Options | const FOrrery | — | Mip depth, memory budget and compression. |
Report | FOrrery | — | Counts and the hash, or the reason for a refusal. A refusal leaves Store as it was. |
Returns
false for a missing or unreadable file, 8-bit or colour PNG, a size that is not square or disagrees with the sidecar or the file's byte count, a missing, malformed or contradictory sidecar, an extra raster of another size or with values outside its range, an input over the memory budget, or a failed build.
Game thread, editor only. Peak memory is the estimate in Report.WorkingBytes plus the builder's.