shadow_raycast — 3D render op

• Data kinds: mesh × vector → image2d

• Call: import fullseye as fs; fs.ledger.shadow_raycast(V, F, light, *, pose=None, intrinsics=None, width: 'int' = 256, height: 'int' = 256, angular_diameter_deg: 'float' = 0.0, samples: 'int' = 1, grid=None, bias=None) -> 'np.ndarray' (to call the implementation directly, import render_shadow; render_shadow.shadow_raycast(V, F, light, *, pose=None, intrinsics=None, width: 'int' = 256, height: 'int' = 256, angular_diameter_deg: 'float' = 0.0, samples: 'int' = 1, grid=None, bias=None) -> 'np.ndarray'; from the registry, ops3d.get("shadow_raycast"))

Usage

Cast rays directly at the mesh and return the sunlight visibility (H,W) ∈ [0,1] (no shadow map).

1=fully lit / 0=full shadow. Background pixels are 1.0. light is the direction of the parallel light (scene→Sun). angular_diameter_deg is the apparent angular diameter of the light source (the Sun = 0.53°); with 0 the shadow is hard, with a positive value samples directions are scattered over the disc of that angular radius and averaged -- the penumbra width follows the geometry "distance to the occluder × tan(diameter/2)" (on an asteroid scale a few cm = hard shadow). Pixels whose normal faces away from the light (self-shadow) are 0. bias is how far the ray origin is lifted along the normal (default = scene diagonal × 1e-5, to avoid self-intersection). grid is the number of cells per side of the 2-D grid in light space (default None = auto_grid from the face count. The result does not depend on the grid; only the speed changes).

honest: intersection is Möller-Trumbore (double-sided), acceleration is 2-D binning (parallel light only; for point lights use cast_shadow). Transparency, multiple reflections and coloured shadows are not handled.

fail-closed: a degenerate mesh, invalid light, non-positive size, negative angular diameter/sample count raise ValueError.

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