matcap_shade — 3D render op

• Data kinds: normalmap × image2d → image2d

• Call: import fullseye as fs; fs.ledger.matcap_shade(normals, matcap) -> 'np.ndarray' (implementation को सीधे call करना हो तो import render_shade; render_shade.matcap_shade(normals, matcap) -> 'np.ndarray', registry से लेना हो तो ops3d.get("matcap_shade"))

उपयोग

MatCap: view-space normals को lit-sphere texture पर map करके material का रूप transfer करता है। → (H, W[, C])।

view space के unit normal (nx, ny) ([-1,1]) को texture coordinates पर map करता है (u = (nx+1)/2, v = (1−ny)/2, row दिशा में y उलटकर), और matcap image को bilinear interpolation से पढ़ता है। lighting की गणना के बिना, sphere पर प्रकाश डालकर ली गई 1 photo का material रूप किसी भी आकृति पर सीधे चिपकाया जा सकता है (धातु, मिट्टी, toon आदि)।

matcap लगभग वर्गाकार lit-sphere texture है:

• grayscale (h, w) → output (H, W)

• colour (h, w, C) (C कोई भी) → output (H, W, C)

background (लंबाई 0 वाले normal) 0 है। texture coordinates किनारों पर clamp होते हैं (sphere के बाहरी किनारे के normal |(nx,ny)|→1 texture के किनारे की ओर इशारा करते हैं)।

fail-closed: अमान्य shape, non-finite मान और बहुत छोटी (h,w < 2) texture पर ValueError।

पृष्ठभूमि guides (इस op के पीछे की physics और conventions)

• blender_interop — Blender के साथ उपयोग — shape बनाएँ, fullseye से मापें (सावधानियाँ: axes, units, ground truth)

संदर्भ (sample data, साहित्य)

• Sample data catalog (DL URL / license) — 2-D के लिए skimage.data (BSD/public) + synthetic, 3-D के लिए real data sources (Stanford/PDS आदि) के DL URL।

• Operators का स्रोत और संदर्भ — इस op family के मूल research/methods के स्रोत।

चलाए जा सकने वाले उदाहरण (verified samples जो सच में यह op call करते हैं)

• render_shade — py -3.11 examples_3d/render_shade.py

वे अगले ops जिनसे type जुड़ता है (image2d को input के रूप में लेते हैं)

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

इसी category के (render)

project_points · render_point_depth · render_volume_projection · render_shaded · ambient_occlusion · cast_shadow · phong_shade · supersample_mesh


*Provenance: render_shade.py — 3D operator registry. यह per-op note tools/opdocs.py md से अपने-आप generate होता है (हाथ से edit न करें)।*

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.