brdf_hapke — 3D render op

• Data kinds: normalmap → image2d

• Call: import fullseye as fs; fs.ledger.brdf_hapke(normals, light=(0.0, 0.0, 1.0), view=(0.0, 0.0, 1.0), w: 'float' = 0.42, g: 'float' = -0.35, B0: 'float' = 0.87, h: 'float' = 0.01, roughness_deg: 'float' = 26.0) -> 'np.ndarray' (implementation को सीधे call करना हो तो import render_shade; render_shade.brdf_hapke(normals, light=(0.0, 0.0, 1.0), view=(0.0, 0.0, 1.0), w: 'float' = 0.42, g: 'float' = -0.35, B0: 'float' = 0.87, h: 'float' = 0.01, roughness_deg: 'float' = 26.0) -> 'np.ndarray', registry से लेना हो तो ops3d.get("brdf_hapke"))

उपयोग

Hapke reflectance law (opposition effect + multiple scattering + macroscopic roughness θ̄) से normal map को shade करता है और I/F (H, W) लौटाता है।

default values Itokawa के S-type के typical मान हैं (Kitazato et al. 2008): w=0.42, g=−0.35, B0=0.87, h=0.01, θ̄=26°। phase angle light/view से एक स्थिर मान के रूप में निकाला जाता है (parallel light, orthographic approximation)।

fail-closed: किसी parameter के range से बाहर होने या normal का shape गलत होने पर ValueError।

यह brdf_shade के model='hapke' का पतला wrapper है: हर pixel का μ0 = clip(N·L,0,1), μ = clip(N·V,0,1) और पूरी image में स्थिर phase angle g = arccos(L·V) (radian) hapke_reflectance को देकर I/F = π·r लौटाता है। r (w/4π)·μ0e/(μ0e+μe)·[(1+B(g))P(g) + H(μ0e)H(μe) − 1]·S है, और multiple-scattering term H हमेशा चालू रहता है।

• normals: float (H, W, 3), length 0 = background (output 0)। normalisation अंदर होता है।

• light / view: surface→light source और surface→viewpoint की दिशा (अंदर normalise; शून्य length पर ValueError)।

• w: single-scattering albedo (0, 1]।

• g: Henyey-Greenstein का asymmetry parameter, open interval (−1, 1)। negative का मतलब back-scattering।

• B0 / h: opposition effect (opposition surge) का amplitude और angular width। B0 > 0 होते हुए h == 0 पर ValueError। B0 = 0 पर कोई opposition effect नहीं।

• roughness_deg: macroscopic roughness θ̄ को degree में दें (अंदर rad में बदला जाता है)। 0 पर कोई roughness correction नहीं (μ0e=μ0, μe=μ, S=1)। negative या non-finite पर ValueError।

return value float64 (H, W) का I/F है, [0,1] पर normalise नहीं होता (negative values 0 पर काटी जाती हैं)। shadow (दूसरे faces से छिपना) शामिल नहीं है, इसलिए ज़रूरत हो तो cast_shadow / shadow_raycast के visibility map से गुणा करें (render_regolith इसे shadow_raycast के साथ जोड़ता है)। जिन pixels में μ0 या μ 0 या उससे कम है वे 0 होते हैं।

पृष्ठभूमि guides (इस op के पीछे की physics और conventions)

• blender_interop — Blender के साथ उपयोग — shape बनाएँ, fullseye से मापें (सावधानियाँ: axes, units, ground truth)

संदर्भ (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 जुड़ता है (image2d को input के रूप में लेते हैं)

fuse_to_voxel · fit_poly_surface · eval_poly_surface · surface_form_error · background_flatten · polar_unwrap · fit_zernike · matcap_shade

इसी category के (render)

project_points · render_point_depth · render_volume_projection · render_shaded · ambient_occlusion · cast_shadow · phong_shade · matcap_shade


*Provenance: render_shade.py — 3D operator registry. यह per-op note tools/opdocs.py md से अपने-आप generate होता है (हाथ से edit न करें)।*

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