terrain_region_mask — 3D terrain op

• Data kinds: mesh → signal

• Call: import fullseye as fs; fs.ledger.terrain_region_mask(V, F, *, smooth_fraction: 'float' = 0.3, method: 'str' = 'neck', seed: 'int' = 0) -> 'np.ndarray' (to call the implementation directly, import render3d; render3d.terrain_region_mask(V, F, *, smooth_fraction: 'float' = 0.3, method: 'str' = 'neck', seed: 'int' = 0) -> 'np.ndarray'; from the registry, ops3d.get("terrain_region_mask"))

Usage

Per-face terrain weights (M,) in [0,1]: 0 = smooth regolith "sea", 1 = rough highland.

method='neck' (default, Itokawa-motivated): the sea is the band of faces around the narrowest cross-section along the principal (long) axis — MUSES-C Regio sits in the neck between head and body — widened until it covers smooth_fraction of the surface area. method='noise': low-frequency seeded fBm thresholded at the area-weighted smooth_fraction quantile (generic patches). method='slope': faces are ranked by local slope (angle between face normal and the smoothed neighbourhood normal); the flattest smooth_fraction of the area is sea. Deterministic; fail-closed on bad input.

Returns a float64 (M,) per face whose values are binary, 0 or 1 (no intermediate values). The procedure builds 1 score per method, accumulates area from the faces with the smallest score, and makes everything up to smooth_fraction of the total area "sea" (0).

• 'neck': along the area-weighted principal axis of the face centroids (1st SVD component), the 20 to 80 % interval of the principal-axis coordinate is cut into 24 bins, the centre of the bin with the smallest 90th-percentile radius is taken as the "neck", and the distance from the neck plane is the score. Bins with fewer than 8 faces are ignored. seed is not used.

• 'noise': the score is fbm_noise at the face centroids (wavelength = bounding-box diagonal / 3, 2 octaves, seed).

• 'slope': the score is the angle (radians) between the face normal and "the mean of the 3 vertex normals". seed is not used.

smooth_fraction is in [0, 1] (out of range or non-finite raises ValueError). With 0 all faces are 1 immediately, with 1 all faces are 0. Any other method raises ValueError. The resulting weights are meant to be passed as region_weights of mesh_scatter_boulders / sample_boulders so that no boulders are placed in the sea.

References (sample data, literature)

• Sample-data catalog (download URLs / licences) — 2-D uses skimage.data (BSD/public domain) plus synthetic images; 3-D lists download URLs for real data sources (Stanford, PDS, …).

• Operator provenance and references — the sources of the research/methods this op family came from.

Runnable examples (verified samples that actually call this op)

• itokawa_regolith_hero — py -3.11 examples_3d/itokawa_regolith_hero.py

Ops the type connects to (they accept signal as input)

fuse_to_voxel

Same category (terrain)

mesh_displace_fbm · mesh_scatter_boulders · mesh_edge_lengths · mesh_subdivide · displacement_band_weights · mesh_displace_spectrum · bump_normals_fbm


*Provenance: render3d.py — 3D operator registry. This per-op note is generated by tools/opdocs.py md (do not hand-edit).*

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.