cast_shadow — 3D render op

Data kinds: mesh × vectorimage2d

Call: import fullseye as fs; fs.ledger.cast_shadow(V, F, light, *, pose=None, intrinsics=None, width: 'int' = 256, height: 'int' = 256, directional: 'bool' = True, penumbra: 'float' = 0.0, samples: 'int' = 16, shadow_res: 'int' = 512, bias=None, pcf: 'int' = 0) -> 'np.ndarray' (to call the implementation directly, import render_shadow; render_shadow.cast_shadow(V, F, light, *, pose=None, intrinsics=None, width: 'int' = 256, height: 'int' = 256, directional: 'bool' = True, penumbra: 'float' = 0.0, samples: 'int' = 16, shadow_res: 'int' = 512, bias=None, pcf: 'int' = 0) -> 'np.ndarray'; from the registry, ops3d.get("cast_shadow"))

Usage

Compute a mesh's cast / soft shadows and return a visibility map (H,W) ∈ [0,1].

> The detailed description below is the original text — the summary and the headings are translated.

`1=完全に照らされる / 0=完全な影。受光面が無い背景画素は 1.0`。

引数:

• `V, F` 頂点 (N,3) と三角形 (M,3)。空メッシュは影を落とせないので拒否。

• `light (3,) ベクトル。directional=True` なら平行光の方向(シーン→光源)、

`False` なら点光源のワールド位置。

• `pose/intrinsics カメラ。省略時は render3d.auto_view` で補完。

• `penumbra` 面光源の角半径(度)。0 でハード影、増やすほど半影が広がる。

• `samples 半影サンプル数(penumbra>0` のときのみ使用、Fibonacci ディスク)。

• `shadow_res` shadow map の一辺解像度。

• `bias 影判定の深度バイアス(ワールド単位)。None` なら texel サイズと

傾斜から自動設定(acne / peter-panning を抑制)。

• `pcf` shadow map を引くときに混ぜる近傍の半径 [texel]

`0(既定)は最近傍 1 点 = 従来どおり。1` なら 3x3 の

判定を平均する(深度を平均するのではない —— 深度の平均は

手前と奥をならして存在しない面を作る)。境目が texel に

量子化されて階段になるのを、shadow map を上げずに緩和する。

手法は shadow mapping(Williams 1978): 光源から `render_mesh` で深度を取り、カメラ側の

受光面点を光源空間へ射影して深度比較する。fail-closed: 退化メッシュ・不正光源・非正の

サイズ/解像度は `ValueError`。

Background guides (the physics and conventions behind this op)

blender_interop — Blender との併用 — 形を作って fullseye で測る(軸・単位・正解データの罠)

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)

render_beautypy -3.11 examples_3d/render_beauty.py

render_shadowpy -3.11 examples_3d/render_shadow.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 · phong_shade · matcap_shade · supersample_mesh


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