render op• 데이터 종류: normalmap → image2d
• 호출: 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'(구현을 직접 호출하려면 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', 원장에서 가져오려면 ops3d.get("phong_shade"))
Phong 반사 모델로 법선 맵에 음영을 넣습니다(환경광 + 확산 + 정반사). → (H, W).
각 전경 화소에서 단위 법선 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: 형상 부정·비유한·길이 0 방향·양이 아닌 shininess·음의 계수는 ValueError.
• blender_interop — Blender와 함께 쓰기 — 형상을 만들고 fullseye로 측정(축·단위·정답 데이터의 함정)
• 샘플 데이터 카탈로그(DL URL / 라이선스) —— 2-D 는 skimage.data(BSD/public)+ 합성, 3-D 는 실데이터 소스(Stanford/PDS 등)의 DL URL.
• 연산자의 내력·참고문헌 —— 이 연산자 족의 바탕이 된 연구/기법의 출처.
• render_beauty — py -3.11 examples_3d/render_beauty.py
• render_shade — py -3.11 examples_3d/render_shade.py
image2d 를 입력으로 받는 것)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 연산자 레지스트리. 이 op 노트는 tools/opdocs.py md 가 자동 생성합니다(직접 편집하지 마세요).*
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.