mesh_displace_fbm — 3D terrain op

• Data kinds: mesh → mesh

• Call: import fullseye as fs; fs.ledger.mesh_displace_fbm(V, F, amplitude: 'float', *, scale=None, octaves: 'int' = 4, lacunarity: 'float' = 2.0, gain: 'float' = 0.5, seed: 'int' = 0) (implementation को सीधे call करना हो तो import render3d; render3d.mesh_displace_fbm(V, F, amplitude: 'float', *, scale=None, octaves: 'int' = 4, lacunarity: 'float' = 2.0, gain: 'float' = 0.5, seed: 'int' = 0), registry से लेना हो तो ops3d.get("mesh_displace_fbm"))

उपयोग

seeded fBm noise से vertices को उनके normals के साथ खिसकाकर mesh को खुरदुरा बनाता है → (V, F)।

amplitude mesh की अपनी units में अधिकतम displacement है (Itokawa STL km में है, इसलिए 0.003 = 3 m); हर vertex अधिकतम amplitude तक ही हिलता है (|fBm| ≤ 1, tests से assert किया गया)। scale base wavelength है (default = bounding-box diagonal / 12); octaves/lacunarity/gain spectrum का आकार तय करते हैं (multifractal ridges default 4 octaves से आते हैं)। दिए गए seed के लिए deterministic; amplitude=0 input को बिना बदले लौटाता है। displaced mesh के face normals में उसी के अनुरूप shading perturbation होता है (अलग से कोई नकली bump map नहीं बनाया जाता)। degenerate meshes / non-finite arguments पर fail-closed।

हर vertex x_i को उसके area-weighted vertex normal n_i की दिशा में x_i + amplitude · fBm(x_i) · n_i तक ले जाता है। fBm fbm_noise है (fixed seed वाला lattice value noise; octaves स्तरों को lacunarity गुना frequency और gain गुना amplitude पर जोड़कर, amplitude के योग से भाग देकर [-1, 1])। face array F नहीं बदलता; return value (V' (N,3) float64, F की copy) है।

• amplitude: mesh units में अधिकतम displacement (0 या उससे ज़्यादा)। negative या non-finite पर ValueError; 0 पर input की copy वैसी ही लौटाई जाती है (noise की गणना नहीं होती)।

• scale: noise की base wavelength (mesh units)। None = bounding-box diagonal / 12। 0 या उससे कम पर ValueError।

• octaves ∈ [1, 16], lacunarity > 0, gain ∈ (0, 1]; range से बाहर ValueError।

• normals faces के winding order से बनते हैं, इसलिए लगातार बाहर की ओर oriented mesh माना जाता है। शून्य area के कारण जिन vertices का normal तय नहीं होता, वे +Z की ओर हिलते हैं (_vertex_normals का वैकल्पिक मान)।

हर wavelength के लिए amplitude देना हो या coarse mesh पर aliasing से बचना हो तो mesh_displace_spectrum (band-limited) इस्तेमाल करें। roughness को geometry में न डालकर सिर्फ़ shading में डालना हो तो bump_normals_fbm।

संदर्भ (sample data, साहित्य)

• Sample data catalog (DL URL / license) — 2-D के लिए skimage.data (BSD/public) + synthetic, 3-D के लिए real data sources (Stanford/PDS आदि) के DL URL।

• Operators का स्रोत और संदर्भ — इस op family के मूल research/methods के स्रोत।

चलाए जा सकने वाले उदाहरण (verified samples जो सच में यह op call करते हैं)

• itokawa_regolith_hero — py -3.11 examples_3d/itokawa_regolith_hero.py

वे अगले ops जिनसे type जुड़ता है (mesh को input के रूप में लेते हैं)

mesh_to_voxel · mesh_to_points · to_points · fuse_to_voxel · ambient_occlusion · cast_shadow · supersample_mesh · render_beauty

इसी category के (terrain)

terrain_region_mask · 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 note tools/opdocs.py md से अपने-आप generate होता है (हाथ से edit न करें)।*

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