render op• Data kinds: normalmap → image2d
• Call: import fullseye as fs; fs.ledger.phong_shade(normals, view=(0.0, 0.0, 1.0), light=(0.0, 0.0, 1.0), ambient: 'float' = 0.1, diffuse: 'float' = 0.8, specular: 'float' = 0.5, shininess: 'float' = 32.0, clip: 'bool' = True) -> 'np.ndarray' (to call the implementation directly, import render_shade; render_shade.phong_shade(normals, view=(0.0, 0.0, 1.0), light=(0.0, 0.0, 1.0), ambient: 'float' = 0.1, diffuse: 'float' = 0.8, specular: 'float' = 0.5, shininess: 'float' = 32.0, clip: 'bool' = True) -> 'np.ndarray'; from the registry, ops3d.get("phong_shade"))
Shade a normal map with the Phong reflection model (ambient + diffuse + specular). → `(H, W)`.
> The detailed description below is the original text — the summary and the headings are translated.
各前景画素で単位法線 `N に対し、光源方向 L を N` で鏡面反射した理想反射方向
`R = 2(N·L)N − L を求め、視線 V` との一致で鏡面項を作る::
I = ambient + diffuse * max(N·L, 0) + specular * max(R·V, 0)^shininess
鏡面項は光の当たる面(`N·L > 0)にのみ乗る。render_lambertian` に鏡面ローブを
足したもので、ハイライトのピークは拡散最大(`N=L`)ではなく 半角方向
`N = normalize(L+V) に立つ(このとき R=V で R·V=1`)。
背景(長さ 0 の法線 = `render3d.render_mesh の空画素)は 0。clip=True` で出力を
`[0, 1] にクリップ(表示向き)、clip=False で生の加算強度を返す(argmax` で
ハイライト位置を厳密に取りたいときはこちら — 飽和で頂点が同点にならない)。
引数:
• `normals : float (H, W, 3)` 法線マップ(視空間、視点向き。長さ 0 = 背景)。
• `view : 面→視点の方向(既定 (0,0,1) = render3d` の視点)。
• `light` : 面→光源の方向。
• `ambient/diffuse/specular` : 各項の係数(有限・非負)。
• `shininess`: 鏡面ローブの鋭さ(> 0。大きいほど鋭い/小さいほど広い)。
• `clip : [0,1]` にクリップするか。
fail-closed: 形状不正・非有限・ゼロ長方向・非正の `shininess・負係数は ValueError`。
• blender_interop — Blender との併用 — 形を作って fullseye で測る(軸・単位・正解データの罠)
• 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.
• render_beauty — py -3.11 examples_3d/render_beauty.py
• render_shade — py -3.11 examples_3d/render_shade.py
image2d as input)fuse_to_voxel · fit_poly_surface · eval_poly_surface · surface_form_error · background_flatten · polar_unwrap · fit_zernike · matcap_shade
render)project_points · render_point_depth · render_volume_projection · render_shaded · ambient_occlusion · cast_shadow · matcap_shade · supersample_mesh
*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.