fullseye

terrain_region_mask — 3D terrain op

使い方

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.

返り値は面ごとの float64 (M,) で値は 0 か 1 の二値(中間値は出ない)。手順は method ごとにスコアを 1 つ作り、スコアの小さい面から面積を累積して全面積の smooth_fraction に達するまでを「海」(0)にする。

smooth_fraction は [0, 1] (範囲外・非有限は ValueError)。0 なら全面 1、1 なら 全面 0 を即返す。method が上記以外なら ValueError。得た重みは mesh_scatter_boulders / sample_bouldersregion_weights に渡して海に岩を 置かないようにする用途。

参考(サンプルデータ・文献)

実行できる例(この op を実際に呼ぶ検証済みサンプル)

型が繋がる次の op(signal を入力に取れる)

fuse_to_voxel

同カテゴリ(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. この per-op ノートは tools/opdocs.py md が自動生成(手編集しない)。

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