fullseye

displacement_band_weights — 3D terrain op

使い方

Per-octave, per-vertex band gate (K, N) in [0,1]: 1 where the mesh can carry the

wavelength as geometry, 0 where it would alias.

A vertex with local edge length e (mean incident edge, :func:mesh_edge_lengths, or local_edge (N,) if given) carries wavelength λ only when λ ≥ nyquist·e; the gate rises linearly from 0 at λ = nyquist·e to 1 at λ = (nyquist+fade)·e (fade=0 → hard cut). Used two ways by the Itokawa pipeline: (i) on the rendered mesh to decide which octaves may be displaced (the rest go to bump normals); (ii) on the source model to measure which wavelengths the real data already carries — the complement 1 − gate is the synthetic-relief weight (0 where the data are fine, 1 where they are coarse), so dense regions are not double-textured. Deterministic.

計算は ratio = λ_k / e_i に対し、fade == 0 なら gate = (ratio ≥ nyquist) の 二値、それ以外は gate = clip((ratio − nyquist) / fade, 0, 1)。返り値は float64 (K, N)(K = 波長数、N = 頂点数)。

mesh_displace_spectrum は内部でこの関数を呼ぶので、通常は直接呼ぶ必要はない。直接 使うのは、元データが既に担っている波長を測って 1 − gateweights として渡す (細かい所に合成起伏を二重に載せない)ときと、bump_normals_fbm へ回す残りを 決めるとき。

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

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

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

fuse_to_voxel

同カテゴリ(terrain)

mesh_displace_fbm · terrain_region_mask · mesh_scatter_boulders · mesh_edge_lengths · mesh_subdivide · 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.