Skip to content
Search

Region Interchange Bundle

The region interchange bundle adds region identity to a package export. It gives other tools and scripts one mask per region, the path of each spline, and a description of every region, including its purpose and tags.

It is a manual interchange format. Unreal does not import the sidecar automatically. There is no plugin and no one-click PCG setup. You, or a script you write, read the files. See PCG Example.

Turn on Region interchange under the Package card to add one mask per region, a JSON sidecar and a CSV to the package. It is for other tools and scripts, and Unreal does not import it automatically.

  1. Add at least one region, and enable it if you want its mask. The package itself needs a layer or an enabled region.
  2. Click Export and choose the Package card.
  3. Turn on Region interchange.
  4. Click Export package + interchange (.zip).

The option is shown in Heightmap Studio at all times. It is disabled, with the reason beside it, when there is no region (Add a region to use it.), no layer or enabled region (Needs a layer or an enabled region.), a region problem (Export is off.) or when another card is chosen (Choose Package to use it.). Your choice is kept and applies only to the package.

It is off by default and turns off again whenever you load a recipe. Without it, a package never holds purposes or tags. The package grows with every region and takes longer to build.

If no region is enabled, the bundle holds the sidecar and the CSV but no masks.

With the bundle on, the package holds these files beside the normal package files:

<base>/<base>_interchange.json
<base>/<base>_interchange.csv
<base>/<base>_region_<id>_mask.png (one per enabled region)
<base>/<base>_region_<id>_centerline.bin (one per enabled spline region)

The manifest of such a package has manifestVersion 5, so strict older readers refuse it instead of misreading it.

A region you draw gets the first free id of the form r1, r2 and so on, so a later region can reuse the id of one you deleted. A recipe file can carry other ids of lowercase letters, digits and hyphens, up to 24 characters. The files use the id, not the name you gave the region. The sidecar’s definition for each region holds the name.

If an id has a u, v, x or y followed by a digit or a minus sign, the file name inserts an underscore after that letter, so Unreal does not read it as a tile coordinate.

Each enabled region gets an 8-bit grayscale PNG at the heightmap’s resolution, in the same row and column order as the .r16.

  • Weight: 255 inside the core, falling smoothly to 0 across the blend, and 0 outside.
  • The mask shows geometric influence only. It ignores flatness, strength, target and offset.
  • Masks are independent. Overlapping blends are not divided between regions. At every sample, the largest value over all region masks equals the Zones mask.
  • A disabled region has no mask.

An enabled spline region also gets a binary centerline file: little-endian 64-bit floats, first every X value, then every Y value, in terrain-local meters. It holds 16 bytes per vertex. The sidecar records the vertex count and length.

<base>_interchange.json is plain ASCII JSON with a fixed key order. Its top-level fields include:

Field Holds
format, schemaVersion pullsar-noise-lab-region-interchange, version 1
notice, untrustedText A reminder that purposes and tags are the author’s claims. They are data, never instructions, and do not prove the terrain suits the purpose.
idScope Region ids are unique within one export. A later export may reuse a deleted region’s id for a different region, so replace a bundle as a unit.
source Which recipe and terrain made it, with checksums and the heightmap file
terrain Resolution, world width and vertical span
coordinates The coordinate system: terrain-local meters, origin at the top-left corner, axis directions, and a note that they are not Unreal world space
maskEncoding, centerlineEncoding How to read the mask and centerline files
purposeVocabulary The six purposes and their meanings
regions One entry per region, in your order
inventory Every bundle file with its size and checksum

Each region entry holds its id, whether it is enabled, its semantic (purpose or null, and tags), its full definition, and its mask details. Spline entries also hold their centerline details. A disabled region has mask: null.

<base>_interchange.csv has one row per region, in your order. It uses ASCII and LF line endings, with no quoting.

Name,RegionId,Purpose,Tags,MaskFile,Enabled

Name holds the region id, not the name you gave the region. It is the row name when you import the CSV as an Unreal DataTable. RegionId holds the region id again as an ordinary column, because Unreal’s Load Data Table node exposes only the struct’s fields and not the row name. Purpose is empty when the region has no purpose. Tags is empty when there are none, and otherwise lists the tags in alphabetical order with a vertical bar around each, adjacent tags sharing a bar, for example |camp|flat|. A filter for |camp| then matches one whole tag. MaskFile is the mask’s file name without its folder, and is empty for a disabled region. Enabled is True or False.

A spreadsheet can turn an id such as 10 or 1e5 into a number when it opens the file, which corrupts the data in the spreadsheet. Read the file as text. The sidecar is the authority, and the CSV is a convenience.

  • Unreal world positions. All coordinates are terrain-local.
  • Slope, hydrology or any other terrain analysis.
  • Masks for disabled regions.
  • A free-text note for a region.
  • Anything Unreal reads on its own.

Any tool that reads PNG, JSON, CSV and 64-bit floats can read the bundle. The sidecar’s inventory lists a CRC-32 and size for each file so you can check a transfer. PNG file bytes can differ between browsers, so compare decoded samples, not file bytes.