render_shaded — 3D render op

• Data kinds: normalmap → image2d

• Call: import fullseye as fs; fs.ledger.render_shaded(normals_img, light=(0, 0, 1), ambient=0.1) (to call the implementation directly, import match3d; match3d.render_shaded(normals_img, light=(0, 0, 1), ambient=0.1); from the registry, ops3d.get("render_shaded"))

Usage

Normal map (H,W,3) + light direction → a Lambertian shaded image (appearance-sample generation, the bridge to optics).

Returns I = ambient + (1 − ambient)·clip(n·L̂, 0, 1) as (H, W) float64 with range [0, 1]. light is normalised internally (a zero vector gives NaN from division by 0), but normals are not normalised (pass unit normals; the outputs of estimate_point_normals / normals_from_depth are unit). Keep the component order of the normals and of light consistent (the default (0,0,1) follows the convention that the 3rd component = toward the camera is front lighting). Faces turned away from the light get the value ambient. The last axis is taken as the normal, so it also works with per-point normals of shape (N,3). There is no specular highlight (do it separately with fresnel_reflectance / reflect).

Uses: cross-checking photometric_stereo (normals → image, the forward direction), synthetic samples for visual inspection.

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)

• render_ao — py -3.11 examples_3d/render_ao.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 · ambient_occlusion · cast_shadow · phong_shade · matcap_shade · supersample_mesh


*Provenance: match3d.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.