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' (to call the implementation directly, 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'; from the registry, ops3d.get("brdf_hapke"))

Usage

Shade a normal map with the Hapke reflectance law (opposition effect + multiple scattering + macroscopic roughness θ̄) and return I/F (H, W).

The defaults are typical S-type values for Itokawa (Kitazato et al. 2008): w=0.42, g=−0.35, B0=0.87, h=0.01, θ̄=26°. The phase angle is computed from light/view as a constant (parallel-light, orthographic approximation).

fail-closed: any parameter out of range or a bad normal shape raises ValueError.

A thin wrapper of model='hapke' of brdf_shade: it passes each pixel's μ0 = clip(N·L,0,1), μ = clip(N·V,0,1) and the phase angle g = arccos(L·V) (radians), constant over the whole image, to hapke_reflectance, and returns I/F = π·r. r is (w/4π)·μ0e/(μ0e+μe)·[(1+B(g))P(g) + H(μ0e)H(μe) − 1]·S, and the multiple-scattering term H is always on.

• normals: float (H, W, 3), length 0 = background (output 0). Normalisation is done internally.

• light / view: directions surface→light source and surface→viewpoint (normalised internally; zero length raises ValueError).

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

• g: Henyey-Greenstein asymmetry parameter, open interval (−1, 1). Negative means back-scattering.

• B0 / h: amplitude and angular width of the opposition effect (opposition surge). B0 > 0 with h == 0 raises ValueError. B0 = 0 means no opposition effect.

• roughness_deg: macroscopic roughness θ̄ given in degrees (converted to rad internally). 0 means no roughness correction (μ0e=μ0, μe=μ, S=1). Negative or non-finite raises ValueError.

Returns the I/F as float64 (H, W), not normalised to [0,1] (negative values are clipped to 0). Shadows (occlusion by other faces) are not included, so if needed multiply by the visibility map of cast_shadow / shadow_raycast (render_regolith combines it with shadow_raycast). Pixels where μ0 or μ is 0 or less are 0.

Background guides (the physics and conventions behind this op)

• blender_interop — Using Blender alongside — build the shape, measure it with fullseye (pitfalls: axes, units, ground truth)

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 image2d as input)

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

Same 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. 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.